BLD.grm
|
// FILE. . . . . /home/hak/ilt/src/ilog/rif/BLD.grm // EDIT BY . . . Hassan Ait-Kaci // ON MACHINE. . 4j4zn71 // STARTED ON. . Tue Apr 01 13:17:21 2008 // Last modified on Wed Oct 01 09:36:10 2008 by hak //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// %access public // Declare the Java package for the parser generated from this grammar: %package ilog.rif.bld; // Include the javadoc documentation for this grammar: %include BLD_doc.grm // Include the BLD condition and rule languages' reserved keywords: %include Keywords.grm // Include java Code for setting params and showing xml serialization: %include ParserCode.grm // Declare the grammar start symbol to be 'RifDocument': %start RifDocument // Declare other parse %roots ... // Declare the 'rif', 'xsi', and 'xs' XML namespaces: %xmlns "rif" "http://www.w3.org/2007/rif#" %xmlns "xsi" "http://www.w3.org/2001/XMLSchema-instance" %xmlns "xs" "http://www.w3.org/2001/XMLSchema#" // Define the XML tree root element to be 'rif:document': %xmlroot "Document" // Terminals:
The terminal symbols are:
Important Notes:
|
%token OPENPAR CLOSEPAR OPENBRA CLOSEBRA %token GROUP EXTERNAL LEXSPACE COLON %token OR AND FORALL EXISTS %token IF ARROW EQUAL MEMBER SUBCLASS %token VARIABLE STRING IDENTIFIER // Define the XML serialization info for terminal symbol 'VARIABLE': %xmlinfo VARIABLE [ L:"Var" C:($VALUE) ] // Define the XML serialization info for terminal symbol 'IDENTIFIER': %xmlinfo IDENTIFIER [ L:"Id" C:($VALUE) ] // Define the XML serialization info for terminal symbol 'STRING': %xmlinfo STRING [ L:"Str" C:($VALUE) ] %% //////////////////////////////////////////////////////////////////////// // Grammar Rules: //////////////////////////////////////////////////////////////////////// // Including grammar for the BLD Rule Language: %include BLR.grm // Including grammar for the BLD Condition Language: %include BLC.grm
Root grammar rule for Basic Logic Dialect (BLD): |
RifDocument : OuterDocument { showXml(); } // show the XML tree ; OuterDocument : Group [ L:"payload" C:(1) ] ; %% ////////////////////////////////////////////////////////////////////////
This file was generated on Thu Feb 17 16:55:59 PST 2011 from file BLD.grm
by the ilog.language.tools.Hilite Java tool written by Hassan Aït-Kaci