bison/src scan-gram.l
Paul Eggert <[email protected]>
| Newsgroups | gmane.comp.parsers.bison.cvs |
|---|---|
| Message-ID | <[email protected]> |
CVSROOT: /cvsroot/bison Module name: bison Changes by: Paul Eggert <[email protected]> 02/12/24 02:46:49 Modified files: src : scan-gram.l Log message: (handle_dollar, handle_at): Now takes int token_type, not braced_code code_kind. All uses changed. (SC_PRE_CODE): New state, for scanning after a keyword that has (or usually has) an immediately-following braced code. (token_type): New local var, to keep track of which token type to return when scanning braced code. (<INITIAL>"%destructor", <INITIAL>"%lex-param", <INITIAL>"%parse-param", <INITIAL>"%printer, <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE instead of returning a token type immediately. (<INITIAL>"{"): Set token type. (<SC_BRACED_CODE>"}"): Use it. (handle_action_dollar, handle_action_at): Now returns bool indicating success. Fail if ! current_rule; this prevents a core dump. (handle_symbol_code_dollar, handle_symbol_code_at): Remove; merge body into caller. (handle_dollar, handle_at): Complain in invalid contexts. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/bison/bison/src/scan-gram.l.diff?tr1=1.50&tr2=1.51&r1=text&r2=text