How to implement optional semicolon rules

2014-11-15 Thread Matthias Simon
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 }

Re: How to implement optional semicolon rules

2014-11-15 Thread Hans Aberg
> On 15 Nov 2014, at 15:25, Matthias Simon wrote: > 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!] >{ >

Re: How to implement optional semicolon rules

2014-11-15 Thread Derek Clegg
I’m certainly no bison expert, but something like the following might be a starting point: start: semicolon_terminated_statements ; semicolon_terminated_statements: /* empty */ | semicolon_terminated_statements semicolon_terminated_statement | semicolon_terminated_statements block ; b