import y_tab
import sys
-lex_yy.piece_append('<root><AST ref=\"0\"><AST_Section1>')
+lex_yy.piece_append('<root>\n <AST ref=\"0\"><AST_Section1>')
y_tab.yyparse()
-while lex_yy.flexscan():
- pass
-lex_yy.piece_append('</AST></root>\n')
+lex_yy.piece_append('</AST>\n</root>\n')
sys.stdout.write(''.join(lex_yy.piece))
sectnum = 3
BEGIN(SECT3_NOESCAPE if state.no_section3_escape else SECT3)
#outn('/* Begin user sect3 */')
- piece_pack()
piece_append('</AST_Section2>')
- piece_escape(yytext)
- piece_pack()
+ piece_flush(len(yytext))
piece_append('<AST_Section3>')
- # first EOF, we will call scanner until it's returned EOF twice
- return ~YY_NULL
}
"["({FIRST_CCL_CHAR}|{CCL_EXPR})({CCL_CHAR}|{CCL_EXPR})* {
"'"{NAME}"'" |
"<"{NAME}">" {
BEGIN(SECT2)
- piece_flush(1)
piece_pack()
+ piece_flush(1)
piece_append('<RegexGroupName_Text>')
piece_flush(len(yytext) - 1)
piece_append('</RegexGroupName_Text>')
- piece_pack()
piece_flush(1)
+ piece_pack()
return ~y_tab.NAME
}
/* Nick extra rules for action groups */