Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate EBNF from ANTLR

Tags:

antlr

ebnf

Anybody know of a tool, that generates EBNF from ANTLR? ANTLR is already close to EBNF, but for documentation purpose I would like to have a clean EBNF description (without the Code in between).

With antlrworks and this its already nice to get the syntax diagrams:

java -cp antlrworks-1.1.4.jar org.antlr.works.Console -f yql.g -o output/ -sd eps

but it would like to have a bare textual description, preferable text, tex, html, xml, or similar.

like image 669
flolo Avatar asked Mar 29 '12 08:03

flolo


1 Answers

I have an online tool that converts foreign grammars to W3C grammar notation. It has an ANTLR3 grammar parser, so maybe this gets close to what you were looking for. W3C notation is also useful for generating syntax diagrams.

like image 144
Gunther Avatar answered Oct 01 '22 01:10

Gunther