|
| 1 | +<p align='center'> |
| 2 | + <img src="extras/images/Parse_Tree_Derivations.svg" width="500" > |
| 3 | +</p> |
| 4 | + |
| 5 | +<p align="center"> |
| 6 | + <img src="https://img.shields.io/github/languages/count/melchisedech333/lex-yacc-experiments?style=for-the-badge" > |
| 7 | + <img src="https://img.shields.io/github/repo-size/melchisedech333/lex-yacc-experiments?style=for-the-badge" > |
| 8 | +</p> |
| 9 | + |
| 10 | +<br> |
| 11 | + |
| 12 | +Language: <a href="readme.md">EN-US</a> |
| 13 | + |
| 14 | +Aqui estão meus códigos, estudos e experimentos em geral, que realizei usando as ferramentas para análise de gramática livre de contexto. As ferramentas que utilizei são <b>lex</b>, <b>yacc</b> e <b>bison</b>. |
| 15 | + |
| 16 | +**Se algum código foi útil para você, considere [ser um patrocinador](https://github.com/sponsors/melchisedech333) :blue_heart:** |
| 17 | + |
| 18 | +<br> |
| 19 | + |
| 20 | +:bookmark_tabs: Sumário |
| 21 | +----- |
| 22 | +* [Instruções](#hammer_and_wrench-instruções) |
| 23 | +* [Autor](#smiley-autor) |
| 24 | +* [Licença](#scroll-licença) |
| 25 | +----- |
| 26 | + |
| 27 | +<br> |
| 28 | + |
| 29 | +:hammer_and_wrench: Instruções |
| 30 | +--- |
| 31 | + |
| 32 | +Each directory is equivalent to a specific test. And to compile run the file <b>compile-and-run.sh</b> passing the directory name as a parameter. |
| 33 | + |
| 34 | +```bash |
| 35 | +./compile-and-run.sh "2 - filter tokens" |
| 36 | +``` |
| 37 | + |
| 38 | +After compiling, just run the generated file with the name <b>parsing</b>, and type the input. |
| 39 | + |
| 40 | +```bash |
| 41 | +./parsing |
| 42 | +``` |
| 43 | + |
| 44 | +For this example in question (using the <b>2 - filter tokens</b>), a valid input could be: |
| 45 | + |
| 46 | +``` |
| 47 | +10 20 30 A |
| 48 | +``` |
| 49 | + |
| 50 | +For this input, the output will be: |
| 51 | + |
| 52 | +``` |
| 53 | +type: INTEGER |
| 54 | +token: 10 |
| 55 | +
|
| 56 | +type: INTEGER |
| 57 | +token: 20 |
| 58 | +
|
| 59 | +type: INTEGER |
| 60 | +token: 30 |
| 61 | +
|
| 62 | +type: UNKNOWN |
| 63 | +token: A |
| 64 | +``` |
| 65 | + |
| 66 | +It is important to mention that within each directory there is a file called <b>input.txt</b>, which contain one (or more) possible example entries. |
| 67 | + |
| 68 | +<br> |
| 69 | + |
| 70 | +:smiley: Autor |
| 71 | +--- |
| 72 | + |
| 73 | +Patrocinar: [melchisedech333](https://github.com/sponsors/melchisedech333)<br> |
| 74 | +YouTube: [Melchisedech](https://www.youtube.com/channel/UC4Sh4wxncr5arnydpUfWPKw)<br> |
| 75 | +Twitter: [Melchisedech333](https://twitter.com/Melchisedech333)<br> |
| 76 | +Blog: [melchisedech333.github.io](https://melchisedech333.github.io/)<br> |
| 77 | +LinkedIn: [Melchisedech Rex](https://www.linkedin.com/in/melchisedech-rex-724152235/) |
| 78 | + |
| 79 | +<img src="https://github.com/melchisedech333.png?size=200" height="100" /> |
| 80 | + |
| 81 | +<br> |
| 82 | + |
| 83 | +:scroll: Licença |
| 84 | +--- |
| 85 | + |
| 86 | +[ BSD-3-Clause license](./license) |
| 87 | + |
| 88 | + |
0 commit comments