The location tracking mechanism is precious for parse error
authorAkim Demaille <akim@epita.fr>
Mon, 2 Oct 2000 10:20:59 +0000 (10:20 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 2 Oct 2000 10:20:59 +0000 (10:20 +0000)
commit89cab50df11c5f02d719db0239eabc0fb6095ec8
tree66863cc19c29d581e0890f2062cc62eb486a0a9a
parentd6c2cba06d7c3c86f98713c498c0d142d45b86be
The location tracking mechanism is precious for parse error
messages.  Nevertheless, it is enabled only when `@n' is used in
the grammar, which is a different issue (you can use it in error
message, but not in the grammar per se).  Therefore, there should
be another means to enable it.
* src/getargs.c (getargs): Support `--locations'.
(usage): Report it.
* src/getargs.h (locationsflag): Export it.
* src/lex.c (percent_table): Support `%locations'.
* src/reader.c (yylsp_needed): Remove this variable, now replaced
with `locationsflag'.
* doc/bison.texinfo: Document `--locations' and `%locations'.
Sort the options.
* tests/calc.m4: Test it.
For regularity of the names, replace each
(nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
(no_lineflag, token_tableflag, rawflag, no_parserflag): this.
In addition replace each `flag' with `_flag'.
13 files changed:
ChangeLog
doc/bison.texinfo
src/conflicts.c
src/files.c
src/getargs.c
src/getargs.h
src/lex.c
src/output.c
src/print.c
src/reader.c
src/reduce.c
src/vmsgetargs.c
tests/calc.m4