[Commit] mint/grammars lolgram.mnt,NONE,1.1
Bart Massey
commit at keithp.com
Thu Jan 13 01:24:50 PST 2005
- Next message: [Commit] mint/src astprint.5c, 1.1, 1.2 lexer_generator.5c, 1.1,
1.2 lexer_runtime.5c, 1.1, 1.2 mint-parser.5c, NONE,
1.1 parser_runtime.5c, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: bart
Update of /local/src/CVS/mint/grammars
In directory home.keithp.com:/tmp/cvs-serv6459/grammars
Added Files:
lolgram.mnt
Log Message:
Fixed up the import structure a bit.
Added mint-parser.5c: provides an autoimport-able namespace
containing a routine to parse a file given parser and lexer
tables.
Added lolgram.mnt, grammar for LOL in MerryMINT.
--- NEW FILE: lolgram.mnt ---
#
# Grammar for LOL predictive LL(1) parser generator
# Bart Massey 2005/1
#
tokens:
token nonterm /[A-Za-z][A-Za-z0-9_]*/
token term /<[A-Za-z][A-Za-z0-9_]*>/
token colon /:/
token pipe /\|/
token semi /;/
skip ws /[ \t\n]/
skip comment /#[^\n]*/
precedence:
rules:
rule (grammar : grammar_none) ->
rule (grammar : grammar_some) ->
(nonterm : symbol) colon (prods: alts) semi
(grammar : rest)
rule (prods : prods) -> (prod : first) (opt_prods : rest)
rule (opt_prods : opt_prods_none) ->
rule (opt_prods : opt_prods_some) -> pipe (prods : rest)
rule (prod : prod_none) ->
rule (prod : prod_term) -> (term : symbol) (prod : rest)
rule (prod : prod_nonterm) -> (nonterm : symbol) (prod : rest)
- Next message: [Commit] mint/src astprint.5c, 1.1, 1.2 lexer_generator.5c, 1.1,
1.2 lexer_runtime.5c, 1.1, 1.2 mint-parser.5c, NONE,
1.1 parser_runtime.5c, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Commit
mailing list