]> ocean-lang.org Git - ocean/commit
parsergen: require all terms to be declared if any are.
authorNeilBrown <neil@brown.name>
Thu, 7 Oct 2021 00:13:44 +0000 (11:13 +1100)
committerNeilBrown <neil@brown.name>
Thu, 7 Oct 2021 00:13:44 +0000 (11:13 +1100)
commit7643c19409c4d3c6d94412a85d0dc048a6e8a68f
tree8720b26da5210c99ee2d5da54d7b09e04c3a132c
parent9da671b6631e648e82b07c323bfa9315c6c8c5f2
parsergen: require all terms to be declared if any are.

The previous implementation only required all terms used for the first
time after a $TERM declaration to be declared.  That isn't really
useful.

So change it to only set the default symbol type of Term after all the
grammar is parsed, and then only if not $TERM declarations were found.

This highlights that various terminals in ocean weren't declared, so
declare them now.

Signed-off-by: NeilBrown <neil@brown.name>
csrc/oceani.mdc
csrc/parsergen.mdc