I am using nearley and moo to come up with a rather complex grammar. It seems to be working fine EXCEPT for my whitespace requirements. I need to require whitespace when needed and allow it when not while keeping the grammar unambiguous.
For…
I'm using the nearley.js grammar (and parser) with the moo.js tokeniser. My grammar.ne file is the following:
@{%
const moo = require('moo')
let lexer = moo.compile({
number: /[0-9]+/
});
%}
@lexer lexer
trig -> "sin"…
I am trying to find something that will parse very large files (PGN files, basically.) I started using antlr4, but even though they claim that their classes are "streams", they aren't. antlr4 takes my 5,457,518 game test file and tried to load the…