-
Notifications
You must be signed in to change notification settings - Fork 28
Home
Jörg Liebig edited this page Nov 21, 2015
·
10 revisions
FeatureHouse's (FH) examples and case studies are in separate git repository. To get them also, run git submodule init
and git submodule update
.
After cloning the project, the only thing You need to adapt is the execution of the build.xml file in subproject fstgen.
There are a couple of run scripts in fstcomp and fstmerge for convenience.
To add a new language to the FH framework, the following steps have to be performed:
- Add an appropriate grammar (JavaCC) to the fstgen subproject (folder test). If You start with a new fresh grammar, there is a large number of examples already available (Java, C, Haskell, ...).
- To generate a parser from the grammar specification, extend the ant build.xml script with a new build target. The best way is to copy and edit one of the existing rules. Afterwards select the new build target from the context menu and run ant. To simplify grammar development, each grammar usually comes with a test (as part of the build process using ant or in the form of dedicated JUnit tests). We encourage developers of new languages to the FH framework to add test cases for the generated parsers. They will be checked automatically as part of continuous integration (see travis-ci website).
- Within the fstcomp (for language composition) and the fstmerge (for language merging), You need to add builder and printer classes for the new language. Finally, You need to register the new language in the FSTGenProcessor class.
Good luck. In case of problems contact someone of us.