Parser
Ben Jones
fake at fake.fake
Thu Jun 15 15:27:15 UTC 2023
On Wednesday, 14 June 2023 at 09:28:57 UTC, Cecil Ward wrote:
> I’m thinking that I might had to end up writing a partial,
> rather rough parser for parts of the D language. Could I get
> some suggestions for help that I might find in the way of
> software components? D has a very powerful regex module, I
> believe.
A couple of pointers for general parsers:
The Pegged library:
https://github.com/PhilippeSigaud/Pegged/tree/master is pretty
popular for building general parsers
I have a rough implementation a similar idea here:
https://github.com/benjones/autoparsed (definitely less polished
and probably buggier than pegged). In mine you annotate your
types with their syntax and can then call parse!MyType on a token
stream to get a MyType.
More information about the Digitalmars-d-learn
mailing list