|
HootDeclarations.grm
|
// FILE. . . . . d:/hak/hlt/src/hlt/osf/hoot/sources/HootDeclarations.grm // EDIT BY . . . Hassan Ait-Kaci // ON MACHINE. . Hak-Laptop // STARTED ON. . Mon May 6 10:06:43 2019
This is part of the HOOT language grammar and
declares the packages this imports, the name of this package, its
parameters, and their initializations.
|
/* ************************************************************************ */ /* ************************ START OF DECLARATIONS ********************** */ /* ************************************************************************ */ %import hlt.language.tools.Misc; %import hlt.language.tools.Debug; %import hlt.language.util.Stack; %import hlt.language.util.ArrayList; %import hlt.language.util.IntIterator; %import hlt.language.util.Error; %import hlt.language.util.Span; %import hlt.language.util.Locatable; %import hlt.osf.io.*; %import hlt.osf.base.*; %import hlt.osf.util.*; %import hlt.osf.exec.*; %import hlt.language.io.CircularInclusionException; %import java.util.HashMap; %import java.util.HashSet; %import java.io.PrintStream; %import java.io.FileNotFoundException; /* ************************************************************************ */ %package hlt.osf.hoot; %access public %start HootProgram %root SortExpression %root HootExpression %nodeprefix "Hoot" %nodesuffix "" /* ************************************************************************ */ // Tokens in order of increasing precedence: %token EOS // End of statement marker (.) %token IDENTIFIER STRING TOP BOTTOM TAG INTEGER CHAR FLOAT BOOLEAN %token EXIT_PRAGMA HELP_PRAGMA INCLUDE_PRAGMA ENCODE_PRAGMA EVAL_PRAGMA SORTS_PRAGMA DEFINED_PRAGMA SYMBOLS_PRAGMA MUTE_PRAGMA SIZE_PRAGMA HEIGHT_PRAGMA WIDTH_PRAGMA CHILDREN_PRAGMA DESCENDANTS_PRAGMA PARENTS_PRAGMA ANCESTORS_PRAGMA ENUMSIZE_PRAGMA ISA_PRAGMA REFRESH_PRAGMA TREE_PRAGMA TIMING_PRAGMA GC_PRAGMA SYNTAX_PRAGMA TRACE_PRAGMA UNKNOWN_PRAGMA // %right PROJECT // feature projection (/) %token ARROW // feature association (=>) %token ISA // 'is-a' declaration (<|) // %left JOIN // lub (\/) // %left MEET // glb (/\) %right BUTNOT // sort complementation (\) %left OR // sort union (|) %left AND // sort intersection (&) %right NOT // sort negation (!) /* ************************************************************************ */
| This declares this application XML's namespace to be "hoot" as an abbreviation for the URI "http://www.hak-lt.com/ns/hoot". This is just a fake URI for now, but and can be redefined to whatever. |
%xmlns "hoot" "http://www.hak-lt.com/ns/hoot"
| Define the XML tree root element to be hoot:HootExpression. |
%xmlroot "hoot" "HootExpression"
| Tokens' XML serialization declarations: |
%xmlinfo TOP [ n:"hoot" l:"sort" a:{symbol="*TOP*"} ] %xmlinfo BOTTOM [ n:"hoot" l:"sort" a:{symbol="*BOTTOM*"} ] %xmlinfo TAG [ n:"hoot" l:"tag" a:{value=$value} ] %xmlinfo IDENTIFIER [ n:"hoot" l:"identifier" a:{value=$value} ] %xmlinfo INTEGER [ n:"hoot" l:"constant" a:{sort="integer" value=$value} ] %xmlinfo CHAR [ n:"hoot" l:"constant" a:{sort="char" value=$value} ] %xmlinfo FLOAT [ n:"hoot" l:"constant" a:{sort="float" value=$value} ] %xmlinfo STRING [ n:"hoot" l:"constant" a:{sort="string" value=$value} ] %xmlinfo BOOLEAN [ n:"hoot" l:"constant" a:{sort="boolean" value=$value} ] /* ************************************************************************ */ /* *********************** END OF DECLARATIONS ******************** */ /* ************************************************************************ */
This file was generated on Wed Oct 09 17:17:20 PDT 2019 from file HootDeclarations.grm
by the hlt.language.tools.Hilite Java tool written by Hassan Aït-Kaci