telamon
telamon copied to clipboard
Report errors during Telamon-gen parsing
trafficstars
Currently, Telamon-gen generates a backtrace when it encounters a user error. This makes it hard to use. It should report errors with line and column numbers instead.
Remaining actions:
- [x] Separate declaration and definition
- [ ] Sets type checking and declaration
- [ ] Generic choices type checking
- [ ] Enum type checking and declaration
- [ ] Integer type checking and declaration
- [ ] NumericSet type checking and declaration
- [ ] Counter type checking and declaration
- [ ] Constraint type checking and declaration
- [ ] Trigger type checking and declaration
- [ ] Quotient sets type checking and delclaration
Here are my comments on the current error checking:
- many function could be factorized between IntegerDef, EnumDef and CounterDef. All three statements define a new choice so it makes sense. Moreover, the names of IntegerDef must not collide with the names of EnumDef and CounterDef.
- Choice parameters should only be checked once sets are defined. Indeed the set may be defined after the enum in the input file.
- the name
parametricis used where it should beparameter - Some structures could be made private
- Add doc comments to structures and enum variants