- Added parser support for @entities, by merely allowing them to exist as
  terminals.
- Added sample entities.
- Extended grammar to test entities.
This commit is contained in:
Paul Beckingham 2013-08-30 12:15:30 -07:00
parent 60336d6f6a
commit ef4d318276
3 changed files with 15 additions and 9 deletions

View file

@ -191,7 +191,8 @@ void Parser::checkConsistency ()
// Undefined value - these are definitions that appear in token, but are
// not in _rules.
for (unsigned int i = 0; i < notDefined.size (); ++i)
throw std::string ("definition '") + notDefined[i] + "' referenced, but not defined.";
if (notDefined[i][0] != '@')
throw std::string ("definition '") + notDefined[i] + "' referenced, but not defined.";
// Circular definitions - these are names in _rules that also appear as
// token 0 in any of the alternates for that definition.