I'm impressed with your project and I'm considering repurposing some of its code to create a compile-time lexer. From my observation, to transition from the PCRE grammar to a PEG grammar, it appears that only the .gram file needs modifications.
Could you guide me on this? Here's an example I'd like to discuss:
start = expression;
expression = term ( ("+" / "-") term )*;
term = factor ( ("*" / "/") factor )*;
factor = NUMBER / "(" expression ")";
NUMBER = [0-9]+ ("." [0-9]+)?;
Hello,
I'm impressed with your project and I'm considering repurposing some of its code to create a compile-time lexer. From my observation, to transition from the PCRE grammar to a PEG grammar, it appears that only the
.gram
file needs modifications.Could you guide me on this? Here's an example I'd like to discuss:
Thank you for your time!