EBNF externsion

65 views
Skip to first unread message

Andrzej Borucki

unread,
Jan 6, 2013, 3:54:02 AM1/6/13
to antlr-di...@googlegroups.com
We have list of terms which is begin and end with term and separate by delimiter, for example
ident , ident, ident, ident
statement ; statement ; statement ; statement
In ANTLR grammar we must write:
ident (',' ident)*
statement (';' statement)*
How simplify it? One proposal is:
ident || ','
statement || ';'

Juancarlo Añez

unread,
Jan 6, 2013, 10:49:57 AM1/6/13
to antlr-di...@googlegroups.com
Andrezj,

It is very easy to build an ANTLR parser for whatever variation of ANTLR or EBNF grammar description languages you want. It helps that grammar description languages are very small  (although ANTLR's is a bit large).


--
 
 



--
Juancarlo Añez
tel:+58(414)901-2021
skype:juancarloanez
Reply all
Reply to author
Forward
0 new messages