Changeset 3966


Ignore:
Timestamp:
Oct 15, 2008, 9:34:56 PM (12 years ago)
Author:
orlov
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/java/refal/refal/plus/XML.rf

    r3964 r3966  
    4242  '<![CDATA[' e.cdata ']]>';
    4343
    44 $func? GetTag s.stream = e.text (e.tag);
     44$func? SplitTag s.stream = e.text (e.tag);
    4545
    46 GetTag s.stream =
     46SplitTag s.stream =
    4747  <GetDelims s.stream '<'> :: e.text,
    4848  //<Get_Delim s.stream '<'> : e.text '<',
    4949  <Ungets s.stream '<'>, {
    5050    <GetXMLFormat s.stream> : '<?' e.format '?>',
    51       e.text ((XML_FORMAT) e.format) <GetTag s.stream>;
     51      e.text ((XML_FORMAT) e.format) <SplitTag s.stream>;
    5252    <GetComment s.stream> : '<!--' e.comment '-->',
    53       e.text ((COMMENT) e.comment) <GetTag s.stream>;
     53      e.text ((COMMENT) e.comment) <SplitTag s.stream>;
    5454    <GetCDATA s.stream> : '<![CDATA[' e.cdata ']]>',
    55       e.text ((CDATA) e.cdata) <GetTag s.stream>;
     55      e.text ((CDATA) e.cdata) <SplitTag s.stream>;
    5656    e.text (<GetDelims s.stream '>'> '>');
    5757    //e.text (<Get_Delim s.stream '>'>);
     
    8383  '<' e.name '>' =
    8484    <SplitName e.name> :: (e.name) e.attrs,
    85     <GetTag s.stream> $iter e.text <ReadTag s.stream e.tag> <GetTag s.stream> :: e.text (e.tag),
     85    <SplitTag s.stream> $iter e.text <ReadTag s.stream e.tag> <SplitTag s.stream> :: e.text (e.tag),
    8686    e.tag : '</' e.name '>',
    8787    (<ToWord e.name> ((ATTRIBUTES) e.attrs) e.text);
    8888};
    8989
    90 $public $func? Read s = e;
     90$public $func? Read s.stream = e.text_then_XML_tag;
    9191
    92 Read s.stream = <GetTag s.stream> : e.text (e.tag), e.text <ReadTag s.stream e.tag>;
     92Read s.stream = <SplitTag s.stream> : e.text (e.tag), e.text <ReadTag s.stream e.tag>;
     93
     94$public $func? GetAttribute t.tag s.attrName = s.attrValue;
     95
     96GetAttribute (s ((ATTRIBUTES) e (s.attrName s.attrValue) e) e) s.attrName = s.attrValue;
     97
     98$public $func? GetTag t.tag t.innerTagName = t.innerTag;
     99
     100GetTag (s t e t.tag e) t.tagName, t.tag : (t.tagName e) = t.tag;
     101
    93102
    94103$func Main = e;
Note: See TracChangeset for help on using the changeset viewer.