Hi,
I am struggling with some semicolon rules for some time now. In this
language (TTCN3) statements end with an mandatory semicolon, except
there is a curly bracket around. Example:
// -------------8<-------------[SNIP!]
{
var integer a;
var integer b[2] := { 23, 5 }
var integer c
}
// ------------->8-------------[SNAP!]
Declaration for variable b does not require a terminating semicolon,
due to closing bracket of its initialization. Also declaration of
variable c needs no semicolon due to the closing block.
TTCN3's grammar is already quite complex, therefore I made semicolon
_always_ mandatory and patched the lexer to `inject' semicolons when
they were expected by bison. This turned out to be quite hacky, so I am
a little clueless here. Perhaps you have some ideas how to solve this
nicely?
Cheers!
Matthias
_______________________________________________
help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison