[CEqEA] MIG grammars
Brought to you by:
renevestergaard
|
From: Rene V. <ve...@ja...> - 2011-05-06 10:08:57
|
Hi, I've made BNF-style grammars of the MIG specification language available as .html-files at https://sourceforge.net/projects/ceqea/files/ They can also be found at - ftp://ftp.jaist.ac.jp/pub/sourceforge/c/project/ce/ceqea/symbols.html - ftp://ftp.jaist.ac.jp/pub/sourceforge/c/project/ce/ceqea/syntax.html - ftp://ftp.jaist.ac.jp/pub/sourceforge/c/project/ce/ceqea/modalities.html The first of these defines how characters are combined into tokens, i.e., the words of the language. The second file defines the main syntax, based on the tokens in the first file; this amounts to the sentences of the language. The third file defines the modality-specific syntax, which is glossed over in the second file in order to separate concerns. The second file defines where modality-specific tokens may appear in the main syntax, while the third files defines exactly how modalities may be written. The grammars are written as BNFs enriched with regulation-expression operators. For example RuleName : option1* | (option2a | option2b)+ | option3a? option3b ; defines RuleName to be - either 0, 1, or more occurrences of option1-syntax (defined elsewhere) - or 1 or more occurrences of option2a and/or option2b - or 0 or 1 occurrences of option3a followed by an option3b. Please let me know whether this way of presenting the language is helpful. The presentation is precise and is intended for reference purposes, rather than for learning the language from scratch. Cheers, Rene |