Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wqweto/vbpeg
PEG parser generator for VB6
https://github.com/wqweto/vbpeg
grammar parser parser-generator peg vb6
Last synced: 6 days ago
JSON representation
PEG parser generator for VB6
- Host: GitHub
- URL: https://github.com/wqweto/vbpeg
- Owner: wqweto
- License: mit
- Created: 2018-02-05T11:48:32.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-05T14:45:47.000Z (almost 6 years ago)
- Last Synced: 2025-01-15T23:37:11.197Z (12 days ago)
- Topics: grammar, parser, parser-generator, peg, vb6
- Language: Visual Basic
- Homepage:
- Size: 4.93 MB
- Stars: 14
- Watchers: 5
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## VbPeg
PEG parser generator for VB6### Description
VbPeg is a simple parser generator for VB6 that can be used to build interpreters, compilers and other tools that need to match and process complex input data.
VbPeg generates recursive-descent parsers from Parsing Expression Grammars (PEG) [[Ford 2004]](http://bford.info/pub/lang/peg.pdf) and is currently based on the original Ford syntax with some additions for 'semantic actions' as implemented by Ian Piumarta's [peg/leg](http://piumarta.com/software/peg/) project.
VbPeg is self-hosted, meaning it can produce it's own parser in `src\cParser.cls` from the grammar in `VbPeg.peg` in root.
### Sample usage
- Generate a private VB6 class from PEG grammar in VbPeg.peg
```
c:> VbPeg.exe VbPeg.peg -o src\cParser
```
### Command-line
```
Usage: VbPeg.exe [options]Options:
-o OUTFILE write result to OUTFILE [default: stdout]
-tree output parse tree
-ir output intermediate represetation
-set NAME=VALUE set or modify grammar settings
-q in quiet operation outputs only errors
-nologo suppress startup banner
-allrules output all rules (don't skip unused)
-trace trace in_file.peg parsing as performed by %1.exeIf no -tree/-ir is used emits VB6 code. If no -o is used writes result to console.
```