https://github.com/wlan0/antlr-play
Antlr pretty printing example for the Go runtime
https://github.com/wlan0/antlr-play
antlr go pretty-print
Last synced: about 2 months ago
JSON representation
Antlr pretty printing example for the Go runtime
- Host: GitHub
- URL: https://github.com/wlan0/antlr-play
- Owner: wlan0
- License: apache-2.0
- Created: 2018-08-01T20:18:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-01T20:33:16.000Z (over 7 years ago)
- Last Synced: 2024-11-13T15:24:49.839Z (over 1 year ago)
- Topics: antlr, go, pretty-print
- Language: Go
- Size: 128 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# antlr-play
Antlr pretty printing example for the Go runtime
To use it
```bash
$ go get github.com/wlan0/antlr-play && cd $GOPATH/src/github.com/wlan0/antlr-play
$ ./build.sh Test.G4
$ ./antlr-play input
(expression
(expression
(expression
(expression 'a1')
'*'
(expression '('
(expression
(expression
(expression
(expression 'a2')
'+'
(expression 'a3')
)
'+'
(expression 'a4')
)
'-'
(expression
(expression 'a5')
'^'
(expression
(expression 'a6')
'^'
(expression '('
(expression
(expression 'a8')
'+'
(expression
(expression 'a9')
'/'
(expression 'a10')
)
)
')')
)
)
)
')')
)
'*'
(expression 'a11')
)
'*'
(expression 'a12')
)
```