https://github.com/virresh/plsql-sample
Sample Visitor for PLSQL (grammar from datacamp, parser from ANTLR4)
https://github.com/virresh/plsql-sample
antlr4 plsql visitor-pattern
Last synced: 8 months ago
JSON representation
Sample Visitor for PLSQL (grammar from datacamp, parser from ANTLR4)
- Host: GitHub
- URL: https://github.com/virresh/plsql-sample
- Owner: virresh
- Created: 2019-08-15T13:58:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-15T13:59:30.000Z (over 6 years ago)
- Last Synced: 2025-03-12T15:15:52.590Z (about 1 year ago)
- Topics: antlr4, plsql, visitor-pattern
- Language: Python
- Size: 443 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sample Visitor for PLSQL grammar
This repo contains
├── generated
│ ├── plsqlLexer.py
│ ├── plsqlParser.py
│ └── plsqlVisitor.py
├── main.py
├── sample_files
│ └── create_tables_samples.sql
└── source_grammar
└── plsql.g4
main.py - File that contains code for modified Visitor
source_grammar - Contains grammar for plsql (courtesy: https://github.com/datacamp/antlr-plsql)
sample_files - Contains a sample file with plsql code (courtesy: https://github.com/antlr/grammars-v4)
generated - Contains code generated using ANTLR4 from the forementioned grammar
Generated using: `antlr4 -visitor ./simple_source/plsql.g4 -no-listener -o generated/ -Dlanguage=Python3 -Xexact-output-dir`
# Usage
Command: `python main.py ./sample_files/create_tables_samples.sql`