https://github.com/kokorinilya/parser-generator
Simple parser and lexer generator for LL(1) grammars
https://github.com/kokorinilya/parser-generator
code-generation lexical-analysis lexical-analyzer parsing recursive-descent
Last synced: 11 months ago
JSON representation
Simple parser and lexer generator for LL(1) grammars
- Host: GitHub
- URL: https://github.com/kokorinilya/parser-generator
- Owner: KokorinIlya
- Created: 2018-12-03T21:58:09.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-26T14:41:09.000Z (over 7 years ago)
- Last Synced: 2025-04-03T09:31:52.470Z (about 1 year ago)
- Topics: code-generation, lexical-analysis, lexical-analyzer, parsing, recursive-descent
- Language: Scala
- Homepage:
- Size: 2 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# parser-generator
Simple parser and lexer generator for LL(1) grammars
**Table of contents**
* [Lexer and parser generation](#lexer-and-parser-generation)
* [Grammar description](#grammar-description)
## Lexer and parser generation
To create lexer and parser, run the following code.
```scala
val gen = new Generator(
pathToGrammar,
pathToDirectoryForCode
)
gen.generate()
```
Where ```pathToGrammar``` is a path to file with grammar description (see [Grammar description](#grammar-description) section for details), and ```pathToDirectoryForCode``` is a path do directory, where generated code (lexer, parser and tokens description) will be placed.
## Grammar description
TODO