Develop a syntax checker for yy grammars
The grammar checker should check at least the following:
-------
- give a warning in case a grammar rule is defined more than once
- whenever the name of a grammar rule is mentioned outside of it's own definition it must be surrounded by spaces
- There must be a either <file begin> or a ',' in the line before the definition of a grammar rule may start with the next line
- The last of a grammar rule definition must end with ';' . No other line of a grammar rule definition must end with ';'
- All lines of a grammar rule definition except the first (TBD?) and the last one must end with '|'.
- Start of a grammar rule definition is <line begin><rule name>:
- there should be a warning for every ':' which is not part of the start of a grammar rule definition
- Well formed PERL language blocks regarding opening and closing brackets like '[','{','('
Attention: This cannot be applied to the SQL fragments.
- Give a warning or an error in case a grammar rule tries to redefine some of RQG's builtin rules like '_table'
- to be extended
Background:
It's too easy to get a grammar into a state where
- the RQG test itself does not abort because of PERL errors caused by the grammar
- the generated SQL is nearly 100% free of unexpected syntax errors
- not all intended scenarios are generated
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Medium
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- New
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by