https://github.com/melchisedech333/antlr4-demonstration-project
:wrench: Demonstration of using ANTLR4 (with runtime for C++) in projects for context-free grammar processing. The ANTLR4 (Java) package is included, and the project is configured to compile on Linux.
https://github.com/melchisedech333/antlr4-demonstration-project
antlr antlr-development-environment antlr-grammar antlr4-grammar grammar-checker grammar-parser grammar-rules grammars grammars-utility language-development language-processors semantic-analysis semantics syntax syntax-analysis syntax-analyzer syntax-tree tokenization tokenizer tokenizer-parser
Last synced: 3 months ago
JSON representation
:wrench: Demonstration of using ANTLR4 (with runtime for C++) in projects for context-free grammar processing. The ANTLR4 (Java) package is included, and the project is configured to compile on Linux.
- Host: GitHub
- URL: https://github.com/melchisedech333/antlr4-demonstration-project
- Owner: melchisedech333
- License: bsd-3-clause
- Created: 2022-03-27T18:21:30.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-17T19:18:26.000Z (almost 3 years ago)
- Last Synced: 2025-03-29T00:28:14.606Z (7 months ago)
- Topics: antlr, antlr-development-environment, antlr-grammar, antlr4-grammar, grammar-checker, grammar-parser, grammar-rules, grammars, grammars-utility, language-development, language-processors, semantic-analysis, semantics, syntax, syntax-analysis, syntax-analyzer, syntax-tree, tokenization, tokenizer, tokenizer-parser
- Language: C++
- Homepage:
- Size: 2.8 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme-pt.md
- Funding: .github/FUNDING.yml
- License: license
Awesome Lists containing this project
README
Language: EN-US
Este é um projeto de demonstração de como utilizar o ANTLR4 com a C++ runtime.
Os arquivos do projeto são os mesmos disponíveis no projeto oficial do ANTLR4, em seu diretório de demonstração. Também preservei os mesmos arquivos Lexer e Parser utilizados no repositório oficial.
Este projeto está configurado para ser usado em sistemas Linux.
Obs: o arquivo de parser em C++ está localizado em project/demo/Linux/main.cpp.
**Se meu código te ajudou em algo, considere [me patrocinar](https://github.com/sponsors/melchisedech333) :blue_heart:**
:bookmark_tabs: Sumário
-----
- [:hammer_and_wrench: Instalação](#hammer_and_wrench-instalação)
- [:link: Referências e Links](#link-referências-e-links)
- [:smiley: Autor](#smiley-autor)
- [:scroll: Licença](#scroll-licença)
-----
:hammer_and_wrench: Instalação
---Requisitos:
- Java: openjdk 11.0.13 2021-10-19
- Pacote Java ANTLR4 (ele já está incluído no diretório /project/demo/antlr-4.9.2-complete.jar)
- Have CMAKE installed, version used: 3.16.3
Instruções para compilar o projeto:
- Dê permissões para os arquivos:
```bash
chmod +x clean.sh
chmod +x clean-and-compile.sh
chmod +x re-compile.sh
```
- Execute o arquivo clean-and-compile.sh:
```bash
./clean-and-compile.sh
```Após a compilação terminar, vai ser gerado um arquivo binário no diretório: project/build/demo/antlr4-demo. No entanto o script de compilação sempre copia o arquivo binário para o diretório em questão, renomeando-o para parsing.
Descrições dos arquivos:
- clean.sh - Limpa todos os arquivos temporários e gerados na compilação.
- clean-and-compile.sh - Limpa todos os arquivos e recompila o projeto.
- re-compile.sh - Limpa os arquivos temporários e compila o projeto, mas não precisando recompilá-lo inteiramente.
- project/ - Diretório que contêm os arquivos do projeto.
- project/demo/TLexer.g4 - Arquivo Lexer.
- project/demo/TParser.g4 - Arquivo Parser.
- project/demo/Linux/main.cpp - Arquivo C++ de controle do parser.
:link: Referências e Links
---- https://github.com/antlr/antlr4/blob/master/doc/cpp-target.md
- https://github.com/antlr/antlr4/blob/master/runtime/Cpp/demo/README.md
- https://github.com/antlr/antlr4/blob/master/runtime/Cpp/README.md
: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: