gov.llnl.babel.parsers.sidl
Class Grammar

java.lang.Object
  extended by gov.llnl.babel.parsers.sidl.Grammar

public class Grammar
extends java.lang.Object

Grammar defines integer constants for the major productions in the SIDL grammar. These production numbers are used by the parser to identify a particular grammar production in the event of a parse error. This class also provides lookup functions that translate grammar tokens and productions into human-friendly strings.


Field Summary
static int ADDITIVE_EXPR
           
static int AND_EXPR
           
static int ARGUMENT
           
static int ARGUMENT_EXPR_LIST
           
static int ARRAY
           
static int ARRAY_ORDER
           
static int ASSERTION_EXPR
           
static int ASSERTIONS
           
static int CLASS
           
static int CLASS_METHOD
           
static int CONDITIONAL_EXPR
           
static int DEFINITION
           
static int ENSURES
           
static int ENUM
           
static int ENUMERATOR
           
static int EQUALITY_EXPR
           
static int EXCLUSIVE_OR_EXPR
           
static int IMPORT
           
static int INCLUSIVE_OR_EXPR
           
static int INTERFACE
           
static int INVARIANTS
           
static int LITERAL_EXPR
           
static int MAX_PRODUCTION
           
static int METHOD
           
static int MIN_PRODUCTION
           
static int MULTIPLICATIVE_EXPR
           
static int PACKAGE
           
static int POSTFIX_EXPR
           
static int POWER_EXPR
           
static int PRIMARY_EXPR
           
static int RARRAY
           
static int RELATIONAL_EXPR
           
static int REQUIRE
           
static int REQUIRES
           
static int RESERVED_EXPR
           
static int SCOPED_IDENTIFIER
           
static int SHIFT_EXPR
           
static int SPECIFICATION
           
static int TYPE
           
static int UNARY_EXPR
           
 
Constructor Summary
Grammar()
           
 
Method Summary
static java.lang.String getProduction(int production)
          Static utility method getProduction returns a string representing the specified production integer.
static java.lang.String getTokenString(int token)
          Static utility method getTokenString returns a string token representation for the specified token number.
static void main(java.lang.String[] args)
          Print the grammar productions to the standard system output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SPECIFICATION

public static final int SPECIFICATION
See Also:
Constant Field Values

REQUIRE

public static final int REQUIRE
See Also:
Constant Field Values

IMPORT

public static final int IMPORT
See Also:
Constant Field Values

PACKAGE

public static final int PACKAGE
See Also:
Constant Field Values

DEFINITION

public static final int DEFINITION
See Also:
Constant Field Values

CLASS

public static final int CLASS
See Also:
Constant Field Values

ENUM

public static final int ENUM
See Also:
Constant Field Values

ENUMERATOR

public static final int ENUMERATOR
See Also:
Constant Field Values

INTERFACE

public static final int INTERFACE
See Also:
Constant Field Values

INVARIANTS

public static final int INVARIANTS
See Also:
Constant Field Values

CLASS_METHOD

public static final int CLASS_METHOD
See Also:
Constant Field Values

METHOD

public static final int METHOD
See Also:
Constant Field Values

ARGUMENT

public static final int ARGUMENT
See Also:
Constant Field Values

TYPE

public static final int TYPE
See Also:
Constant Field Values

ARRAY

public static final int ARRAY
See Also:
Constant Field Values

ARRAY_ORDER

public static final int ARRAY_ORDER
See Also:
Constant Field Values

RARRAY

public static final int RARRAY
See Also:
Constant Field Values

REQUIRES

public static final int REQUIRES
See Also:
Constant Field Values

ENSURES

public static final int ENSURES
See Also:
Constant Field Values

ASSERTIONS

public static final int ASSERTIONS
See Also:
Constant Field Values

ASSERTION_EXPR

public static final int ASSERTION_EXPR
See Also:
Constant Field Values

CONDITIONAL_EXPR

public static final int CONDITIONAL_EXPR
See Also:
Constant Field Values

INCLUSIVE_OR_EXPR

public static final int INCLUSIVE_OR_EXPR
See Also:
Constant Field Values

EXCLUSIVE_OR_EXPR

public static final int EXCLUSIVE_OR_EXPR
See Also:
Constant Field Values

AND_EXPR

public static final int AND_EXPR
See Also:
Constant Field Values

EQUALITY_EXPR

public static final int EQUALITY_EXPR
See Also:
Constant Field Values

RELATIONAL_EXPR

public static final int RELATIONAL_EXPR
See Also:
Constant Field Values

SHIFT_EXPR

public static final int SHIFT_EXPR
See Also:
Constant Field Values

ADDITIVE_EXPR

public static final int ADDITIVE_EXPR
See Also:
Constant Field Values

MULTIPLICATIVE_EXPR

public static final int MULTIPLICATIVE_EXPR
See Also:
Constant Field Values

POWER_EXPR

public static final int POWER_EXPR
See Also:
Constant Field Values

UNARY_EXPR

public static final int UNARY_EXPR
See Also:
Constant Field Values

POSTFIX_EXPR

public static final int POSTFIX_EXPR
See Also:
Constant Field Values

PRIMARY_EXPR

public static final int PRIMARY_EXPR
See Also:
Constant Field Values

RESERVED_EXPR

public static final int RESERVED_EXPR
See Also:
Constant Field Values

LITERAL_EXPR

public static final int LITERAL_EXPR
See Also:
Constant Field Values

ARGUMENT_EXPR_LIST

public static final int ARGUMENT_EXPR_LIST
See Also:
Constant Field Values

SCOPED_IDENTIFIER

public static final int SCOPED_IDENTIFIER
See Also:
Constant Field Values

MIN_PRODUCTION

public static final int MIN_PRODUCTION
See Also:
Constant Field Values

MAX_PRODUCTION

public static final int MAX_PRODUCTION
See Also:
Constant Field Values
Constructor Detail

Grammar

public Grammar()
Method Detail

getProduction

public static java.lang.String getProduction(int production)
Static utility method getProduction returns a string representing the specified production integer.


getTokenString

public static java.lang.String getTokenString(int token)
Static utility method getTokenString returns a string token representation for the specified token number.


main

public static void main(java.lang.String[] args)
Print the grammar productions to the standard system output.