What do people do with parsers like antlr javacc?

Out of curiosity, I wonder what people can do with parsers, how they are applied, and what people usually create with it.

I know that it is widely used in the programming industry, but I think this is just a tiny part of it, right?

+3
source share
6 answers

Besides special languages, my most ambitious use of the parser yet (with the good old yacc back to C, and then later with pyparsing in Python) was to extract, verify, and possibly modify specific meta-information from SQL queries - Correct SQL analysis is a real problem (especially if you hope to support more than one dialect!), the parser generator (and the lexer that it sits on top of) at least remove this part of the job! -)

+3
source

They are used to parse text ....

To give a more concrete example where I work, we use lexx / yacc to parse the strings following the sockets.

, javacc ( java-!)

+1

, snipits .

+1

, . , ( VPN) IPSec . IP- .

, . .

+1

, Clipper +/- 800 PRG, Alaksa Xbase 32.

+1
source

You can use it to expand your favorite language by getting a definition of your language from your repository, and then adding what you always wanted. You can pass regular syntax to your application and handle the extension in your own program.

+1
source

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


All Articles