telamon icon indicating copy to clipboard operation
telamon copied to clipboard

Report errors during Telamon-gen parsing

Open ulysseB opened this issue 7 years ago • 1 comments
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

ulysseB avatar Mar 29 '18 17:03 ulysseB

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 parametric is used where it should be parameter
  • Some structures could be made private
  • Add doc comments to structures and enum variants

ulysseB avatar Jun 15 '18 07:06 ulysseB