melchisedech333 / lex-yacc-experiments

:wrench: My studies involving context-free grammar analysis. The analyzers were built using familiar tools such as YACC, Lex and Bison. Topics covered include token filtering, simple variable manipulation, and arrays.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool




Language: PT-BR

Here are my codes, studies and experiments in general, which I performed using the tools for context-free grammar analysis. They are lex, yacc and bison.

If my code has helped you, please consider sponsoring me πŸ’™


πŸ“‘ Table of Contents



πŸ› οΈ Instructions

Each directory is equivalent to a specific test. And to compile run the file compile-and-run.sh passing the directory name as a parameter.

./compile-and-run.sh "2 - filter tokens"

After compiling, just run the generated file with the name parsing, and type the input.

./parsing

For this example in question (using the 2 - filter tokens), a valid input could be:

10 20 30 A

For this input, the output will be:

type: INTEGER
token: 10

type: INTEGER
token: 20

type: INTEGER
token: 30

type: UNKNOWN
token: A

It is important to mention that within each directory there is a file called input.txt, which contain one (or more) possible example entries.


πŸ˜ƒ Author

Sponsor: melchisedech333
Twitter: Melchisedech333
LinkedIn: Melchisedech Rex
Blog: melchisedech333.github.io


πŸ“œ License

BSD-3-Clause license



Remember to give me
a beautiful little star 🀩

About

:wrench: My studies involving context-free grammar analysis. The analyzers were built using familiar tools such as YACC, Lex and Bison. Topics covered include token filtering, simple variable manipulation, and arrays.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Yacc 55.5%Language:Lex 42.8%Language:Shell 1.6%