package xtc.parser; header { import xtc.util.Utilities; import xtc.tree.Attribute; } class PParser; option location,debug,mainMethod; top text; String text = x:text1 Anything { yyValue="(" + " text-1=" + x + ")"; }; String text1 = x:Three { yyValue="(" + " Three=" + x + ")"; }; String Three = x:One a:(c:Spaces d:Two { yyValue = c + d; })? y:Two b:Spaces? z:One { yyValue="(" + " One=" + x + " Spaces=" + a + " Two=" + y + " Spaces=" + b + " Three=" + z + ")"; }; String One = "One"; String Two = "Two"; String Anything = .*; String Spaces = x:Space+ { yyValue = "(" + x.list().toString() + ")"; }; String Space = ' ' / '\t' / '\n' / '\r' ;