https://github.com/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.
https://github.com/melchisedech333/lex-yacc-experiments
bison bison-grammar bison-parser bison-yacc compiler-development language-development lex lex-example lex-yacc-parser lexical-analysis lexical-analyzer parser-generator parsing semantic-analysis syntactic-analysis tokenization tokenizer-parser yacc yacc-example yacc-lex
Last synced: 2 months ago
JSON representation
: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.
- Host: GitHub
- URL: https://github.com/melchisedech333/lex-yacc-experiments
- Owner: melchisedech333
- License: bsd-3-clause
- Created: 2022-03-26T22:41:27.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-17T19:23:07.000Z (over 2 years ago)
- Last Synced: 2025-02-03T10:33:39.312Z (4 months ago)
- Topics: bison, bison-grammar, bison-parser, bison-yacc, compiler-development, language-development, lex, lex-example, lex-yacc-parser, lexical-analysis, lexical-analyzer, parser-generator, parsing, semantic-analysis, syntactic-analysis, tokenization, tokenizer-parser, yacc, yacc-example, yacc-lex
- Language: Yacc
- Homepage:
- Size: 283 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme-pt.md
- Funding: .github/FUNDING.yml
- License: license
Awesome Lists containing this project
README
![]()
Language: EN-US
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, sendo elas lex, yacc e bison.
**Se algum código foi útil para você, considere [ser um patrocinador](https://github.com/sponsors/melchisedech333) :blue_heart:**
:bookmark_tabs: Sumário
-----
* [Instruções](#hammer_and_wrench-instruções)
* [Autor](#smiley-autor)
* [Licença](#scroll-licença)
-----
:hammer_and_wrench: Instruções
---Cada diretório é equivalente a um teste específico. E para compilar execute o arquivo compile-and-run.sh passando o nome do diretório como parâmetro.
```bash
./compile-and-run.sh "2 - filter tokens"
```Após a compilação, basta executar o arquivo gerado com o nome parsing e digitar o input.
```bash
./parsing
```Para este exemplo em questão (usando o 2 - filter tokens), uma entrada válida pode ser:
```
10 20 30 A
```Para esta entrada, a saída será:
```
type: INTEGER
token: 10type: INTEGER
token: 20type: INTEGER
token: 30type: UNKNOWN
token: A
```É importante mencionar que dentro de cada diretório existe um arquivo chamado input.txt, que contém uma (ou mais) entradas de exemplo possíveis.
:smiley: Autor
---Patrocinar: [melchisedech333](https://github.com/sponsors/melchisedech333)
Twitter: [Melchisedech333](https://twitter.com/Melchisedech333)
LinkedIn: [Melchisedech Rex](https://www.linkedin.com/in/melchisedech-rex-724152235/)
Blog: [melchisedech333.github.io](https://melchisedech333.github.io/)
:scroll: Licença
---[ BSD-3-Clause license](./license)
## Lembre-se de deixar
uma linda estrelinha :star_struck: