How to create an antlr grammar for given bnf notation?
760 views
Skip to first unread message
divya.div...@gmail.com
unread,
Jan 27, 2013, 2:23:41 AM1/27/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to antlr-di...@googlegroups.com
I am noew to antlr and have no idea about the grammar syntax/rule etc. Though i have a salesforce SOQL BNF notation/rule syntax for which i want,the antlr to generate a grammar.Please let me know how do i proceed?
Juancarlo Añez
unread,
Jan 29, 2013, 8:59:53 AM1/29/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to antlr-di...@googlegroups.com
You write an ANTLR grammar for the BNF notation, and use it to translate BNF grammars to ANTLR grammars.
See attached a grammar I created for one BNF variation. It produces an AST that is in turn used by a small program to generate an ANTLR grammar through a depth-first visit to the tree.
I am noew to antlr and have no idea about the grammar syntax/rule etc.
Though i have a salesforce SOQL BNF notation/rule syntax for which i want,the antlr to generate a grammar.Please let me know how do i proceed?