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/07 01:14:27 Modified files: src : scan-gram.l Log message: Include "files.h". (YY_USER_INIT): Initialize scanner_cursor instead of *loc. (STEP): Remove. No longer needed, now that adjust_location does the work. All uses removed. (scanner_cursor): New var. (adjust_location): Renamed from extend_location. It now sets *loc and adjusts the scanner cursor. All uses changed. Don't bother testing for CR. (handle_syncline): Remove location arg; now updates scanner cursor. All callers changed. (unexpected_end_of_file): Now accepts start boundary of token or comment, not location. All callers changed. Update scanner cursor, not the location. (SC_AFTER_IDENTIFIER): New state. (context_state): Renamed from c_context. All uses changed. (id_loc, code_start, token_start): New local vars. (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all processing of Yacc white space and equivalents here. (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER instead of returning ID immediately, since we need to search for a subsequent colon. (<INITIAL>"'", "\""): Save token_start. (<INITIAL>"%{", "{", "%%"): Save code_start. (<SC_AFTER_IDENTIFIER>): New state, looking for a colon. (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>): BEGIN context_state at end, not INITIAL. (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'", <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>): Return correct token start. (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when the start of a character, string or multiline comment is found. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/bison/bison/src/scan-gram.l.diff?tr1=1.47&tr2=1.48&r1=text&r2=text