G'day
Thanks to Peter I have a grammar that works:
%%
Sections : Lines
| Sections Section
;
Section : HOST Lines
;
Lines :
| Lines Line
;
Line : ID EQ arg
| ID SLASH ID EQ arg
;
arg : ID { do_arg (yytext); }
| STRING { do_str (yytext); }
;
%%
In Line I want to capture the value of ID either as a key or as a path/key
Despite everything I can learn and try from
http://www.cs.utah.edu/dept/old/texinfo/bison/bison.html#SEC48
I cannot do so. Without hacking flex to save the tokens, what is the correct
way to grab ID.
Many thanks (the answer must be trivial, but boy it alludes me)
James
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html