mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Grammar: Validates the presence of a start rule
This commit is contained in:
parent
eb6932c81a
commit
d1e19d3171
1 changed files with 3 additions and 0 deletions
|
@ -172,6 +172,9 @@ std::string Grammar::dump () const
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void Grammar::validate () const
|
void Grammar::validate () const
|
||||||
{
|
{
|
||||||
|
if (_start == "")
|
||||||
|
throw std::string ("There are no rules defined.");
|
||||||
|
|
||||||
std::vector <std::string> allRules;
|
std::vector <std::string> allRules;
|
||||||
std::vector <std::string> allTokens;
|
std::vector <std::string> allTokens;
|
||||||
std::vector <std::string> allLeftRecursive;
|
std::vector <std::string> allLeftRecursive;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue