Closed athas closed 1 year ago
Nice! I was looking into parallel lexical analysis [1] today and it did not seem that difficult if I understand it correctly. Would it not be more ideal to use this method?
[1] Hill, J.M.D., Parallel lexical analysis and parsing on the AMT distributed array processor, Parallel Computing 18 (1992) 699-714.
Yes, but I wanted to put together a quick demo first.
I can not get the example you send to work because of "=" and it does not seem like I can extend the regex like so "atom = [=a-z0-9]+;" is this intended?
Right, the =
should be eq
or something. Error detection is not really happening.
The lexemes must be completely disjoint, such that by observing a single character we can immediately decide which terminal (if any) it belongs to.
Whitespace is hardcoded.
This obviously needs significantly more work, but it's actually enough to parse Lisp expressions such as
which with the sexp.cg grammar gives