Here is the grammar which I want to use:
a_file := v_file | o_file ;
o_file := file - v_file ;
v_file := { a_directive } ;
file := { directive } ;
a_directive := v_directive | o_directive ;
o_directive := directive - v_directive ;
v_directive := "00" ;
directive := "00" | "11" ;
I don't know how to rewrite this grammar for Pliant (with cosmetic-only changes), because "-" operation in Eto.Parse is not the same as in ISO EBNF. In Eto.Parse the "-" operation have some different semantic. Rule matches left operand greedely, but resulting match should not contain the right operand.
It is also not the same as negative or positive lookahead of Perl regexp's.
I propose to define and describe the own syntax of Pliant and add there an "^" operation which will have this semantic (this way it will be possible to use "-" as in ISO EBNF).
Here is the grammar which I want to use:
a_file := v_file | o_file ; o_file := file - v_file ; v_file := { a_directive } ; file := { directive } ; a_directive := v_directive | o_directive ; o_directive := directive - v_directive ; v_directive := "00" ; directive := "00" | "11" ;I don't know how to rewrite this grammar for Pliant (with cosmetic-only changes), because "-" operation in Eto.Parse is not the same as in ISO EBNF. In Eto.Parse the "-" operation have some different semantic. Rule matches left operand greedely, but resulting match should not contain the right operand.
It is also not the same as negative or positive lookahead of Perl regexp's.
I propose to define and describe the own syntax of Pliant and add there an "^" operation which will have this semantic (this way it will be possible to use "-" as in ISO EBNF).