A class for the parser .. just like a Regex class for regular expressions

I find the Regex in.net class extremely useful (for matching and matching / replacing). There are several patterns that cannot be specified in regular expressions, but a little grammar is needed. Is there a library for parsers that do NOT require code generation (e.g. ANTLR) ... but where can I specify the syntax in my code on the fly?

+3
source share
1 answer

It may be helpful to understand what you are trying to achieve. Would you like to declare your grammar at runtime and then have the text parse text at runtime according to the grammar? I'm not sure if you get this grammar library, I assume you need token and grammar identifiers.

I have not used it, but you can take a look at: http://www.devincook.com/goldparser/

0
source

Source: https://habr.com/ru/post/1721307/


All Articles