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 Mon Nov 17 15:35:23 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 using the %root command:

%root Implies
//%root Clause


// 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:
%xmlroot "Document"

// Terminals:

%token LEASTPREC
%token DOCUMENT BASE PREFIX IMPORT GROUP
%token IF
%token OR AND EXISTS FORALL
%token ARROW EQUAL MEMBER SUBCLASS
%token EXTERNAL
%token NUMBER LOCALNAME VARIABLE STRING IDENTIFIER ANGLEBRACKETIRI
%token OPENPAR CLOSEPAR OPENBRA CLOSEBRA OPENMETA CLOSEMETA
%token COLON
%token LEXSPACE
%token HIGHESTPREC

// 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
// Including ad hoc rules
%include AdHoc.grm



Root grammar rule for Basic Logic Dialect (BLD):


RifDocument
  : { ask4Trace(); }
    Document
    { showXml(); }  // show the XML tree
  ;

%%

////////////////////////////////////////////////////////////////////////


This file was generated on Mon Nov 17 15:35:41 PST 2008 from file BLD.grm
by the ilog.language.tools.Hilite Java tool written by Hassan Aït-Kaci