[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bison/src scan-gram.l
From: |
Paul Eggert |
Subject: |
bison/src scan-gram.l |
Date: |
Sat, 07 Dec 2002 01:14:27 -0500 |
CVSROOT: /cvsroot/bison
Module name: bison
Changes by: Paul Eggert <address@hidden> 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
- bison/src scan-gram.l,
Paul Eggert <=
- bison/src scan-gram.l, Paul Eggert, 2002/12/11
- bison/src scan-gram.l, Paul Eggert, 2002/12/13
- bison/src scan-gram.l, Paul Eggert, 2002/12/24
- bison/src scan-gram.l, Paul Eggert, 2002/12/30
- bison/src scan-gram.l, Paul Eggert, 2002/12/30
- bison/src scan-gram.l, Paul Eggert, 2002/12/30