Very old tool using Wirth's EBNF notation in a parser generator, primarily for LL(1) grammars
GAP Yacc Standard ML Makefile
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
sample-grammars SLED in SML and Icon Jun 29, 2015
smlnj-support
.gitignore
LICENSE
README.md BSD license! Apr 9, 2016
charname.nw
check.nw
commafy.nw
ebnfint.nw
ebnflex.nw do not automatically pass thorugh #line Jun 24, 1997
ebnflex.sml
emitc.nw Initial revision May 27, 1993
emiticn.nw
emitml.nw
emitprec.nw
flatten.nw
gtoks.nw
images.nw Initial revision May 27, 1993
ll1.nw
lricon.nw
lrxform.nw up to date at UVa Jun 24, 1997
main.nw
makefile
mkfile
mkfile.iconc
openfile.nw
pushtrace.nw
readgram.nw added %type Jun 25, 1997
slr1.nw
subgram.nw
tex.nw
tick.nw
write.nw

README.md

EBNF: Extended Backus-Naur Form

This is a hobby project from the early 1990s that got out of hand. It provides LL(1) parser generation for Icon, C, and Standard ML. It does some SLR(1) for Icon only, and it will also rewrite grammars for yacc or mlyacc.

The main advantage over other parser generators is that it uses Wirth's EBNF notation, so sequence, optional, and alternation (with parenthetical brackets) are all built in. Also, you can use a reserved word just by quoting it---EBNF takes care of the rest.

The main advantage over something like parsing combinators is that EBNF computes first and follow sets, and given something like the -picky option, will error exit if it detects an ambiguity.

Licensing

The software is open source under the BSD2 license.

Installation

Requires Andrew Hume's mk; look for the plan9port version at https://swtch.com/plan9port/unix/. With luck it will build.

Sample command

BLKSIZE=4000000 STRSIZE=4000000 ./ebnf -slr grammar.gr > grammar.icn