juodaspaulius / ClaferGrammar

Repository to support development of experimental Clafer grammar
0 stars 0 forks source link

ClaferGrammar

This repository is created to support development of experimental Clafer grammar.

Currently repository includes syntax checker tool which checks if test models conform to experimental grammar.

Grammar is defined in clafer.cf and follows BNFC format.

ClaferSyntaxer

Building Clafer syntax checker

Building the tool follows same steps as Clafer Compiler. Just issue:

Using Clafer syntax checker

Clafer syntax checker does not support any options and simply expects model files as argument.

Generating parser after changing grammar

After changing grammar (clafer.cf) it is necessary to generate new parser, lexer and other supporting files. Custom BNFC tool is required.

Command to generate parser and other files:

Clafer References

Clafer is a general-purpose lightweight structural modeling language developed by GSD Lab, University of Waterloo, and MODELS group at IT University of Copenhagen.