[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
? Ignore tokens blank;
I can't ignore blanks as I'm expecting to. I'd think that these 2
strings would parse the same with the grammar given below, but the
the first gives:formfile.parser.ParserException: [1,8] TString expected
(WINDOW "System" 699 180 475 457 0 NIL
(WINDOW"System"699 180 475 457 0 NIL
Here's the grammar (or rather, the relevant fragment. The rest is
fromminibasic.txt)
Ignored Tokens
blank;
Productions
form = {regwin} l_par window [formid]:string
[top]:number [left]:number [x]:number
[y]:number [formtype]:number
[model]:stringornil r_par cells*;
Where can I learn more about the grammar files?
2 other questions:
1) why does this break w/ "blank undefined"?
Tokens
new_line = cr | lf | cr lf;
blank = ' '*;
whitespace = (blank | new_line)*;
2) Can I put comment lines in a grammar?
Any help would be appreciated
John Atwood