SdfDetgen: a Deterministic Grammar Generator
These tools is used for extend a grammar so as to have a deterministic one.
The main tool is "det-gen". Note that you can fix the main module name of the non-deterministic grammar with the -m option.
An example of an input grammar file to give to det-gen:
definition
module Blah
imports BlahImp
exports
lexical syntax
".*." CHARS ".*." -> LAYOUT
context-free syntax
%% a simple production
"::" Foo -> Bar {dettag("a"), cons("a")}
%% will give determi:
%% ".*.[a].*." "::" Foo ".*.[!a].*." -> Bar
%% {pp(H hs=0[KW[".*.[a].*."] KW["::"] _1 KW[".*.[!a].*."]]), cons("a")}
%% but you can fix the non-terminal symbol to add the markups to:
"blah" Foo "(" Body ")" -> Bar {dettag("c",1), cons("c")}
Own marks-up
You can specify to "det-gen" and "detgen"
--begin and
--end options so as to set mark-up style.
If you want to have xml style marks-up, you can use
--begin "<%>"= ==--end "%>".
Installation
Requirements
Downloads
Coming soon.
Installation
$ ./configure --with-xt=<PATH> --with-boxedsdf=<PATH>
$ make
$ make install
--
ValentinDavid - 30 Jan 2004
to top
Transformers.SdfDetgen moved from Projects.SdfDetgen on 21 Dec 2004 - 17:11 by ClementVasseur? -
put it back