Open incud opened 6 years ago
Try adding klabels to your lists. The automatic klabel generation doesn't look for collisions and in this case krun gets confused.
syntax ListA ::= List{Int, ","} [strict, klabel(IntList)]
syntax ListB ::= List{String, ","} [strict, klabel(StringList)]
Consider the language which parses a list of integer followed by a list of strings. Here the code (lists.k)
and the following example file (example.lists)
The code compiles correctly with
kompile lists.k
. When executing it withkrun example.lists --debugger
you can see this stateWhile the
.ListA
after number 4 is correct, the.ListA
after"d"
is not. It should be.ListB
. Obviously they will also match different rules. Here the code: lists.tar.gz