]> git.saurik.com Git - bison.git/commit
Allow %start after the first rule.
authorJoel E. Denny <jdenny@ces.clemson.edu>
Sun, 20 Aug 2006 03:10:18 +0000 (03:10 +0000)
committerJoel E. Denny <jdenny@ces.clemson.edu>
Sun, 20 Aug 2006 03:10:18 +0000 (03:10 +0000)
commit4d7370cb4fe960032afd4a42293b6d55e02237fe
tree5b2c4feb4631daa82d4a6fa3739635baa17a8cb3
parent6d0ef4ec2078687dc9217ae51eea397ce7443a3d
Allow %start after the first rule.
* src/reader.c (grammar_current_rule_begin): Don't set the start symbol
when parsing the first rule.
(check_and_convert_grammar): Search for it here after all grammar
declarations have been parsed.  Skip midrules, which have dummy LHS
nonterminals.
* src/symtab.c (symbol_is_dummy): New function.
* src/symtab.h (symbol_is_dummy): Declare it.
* tests/input.at (%start after first rule): New test.
ChangeLog
src/reader.c
src/symtab.c
src/symtab.h
tests/input.at