Consider the (wrong but reasonable) declare-term-types form:
(declare-term-types
; Declare the 'universal grammar' to be used in the Semgus problem
((E 0))
( ; <-- missing (
($1) ; Leaf node 1
($x) ; Leaf node variable x
($+ (e1 E) (e2 E)) ; Production: E -> E + E
) ; <-- missing )
)
It's missing an additional list around the constructors for E. Instead of being useful, the parser prints the following error:
error: .\max-exp-i.sem:11:5: Cannot convert SymbolToken [$1] to ConstructorDecl[] while converting list.
error: .\max-exp-i.sem:11:5: Cannot convert ConsToken [($1)] to IList`1[ConstructorDecl] while converting list.
Consider the (wrong but reasonable)
declare-term-types
form:It's missing an additional list around the constructors for
E
. Instead of being useful, the parser prints the following error:We should do better than this.