DavidKinder / Inform6

The latest version of the Inform 6 compiler, used for generating interactive fiction games.
http://inform-fiction.org/
Other
199 stars 32 forks source link

Omit grammar table entries which have no verb, with a warning #206

Closed erkyrath closed 1 year ago

erkyrath commented 1 year ago

See issue https://github.com/DavidKinder/Inform6/issues/205 .

To support this, we add two fields to the verbt structure: a flag for whether the verb is used, and the source location where the verb was originally declared.

The flag is set late in compilation, in the locate_dead_grammar_lines() function. We generate warnings at this time. The flag is then checked during game file generation in tables.c.

Miscellaneous changes:

erkyrath commented 1 year ago

Testing: there's a trim-grammar branch in https://github.com/erkyrath/Inform6-Testing/tree/trim-grammar .