gov.llnl.babel.parsers.sidl
Class Grammar

java.lang.Object
  |
  +--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 ARGUMENT
           
static int ARRAY
           
static int ARRAY_ORDER
           
static int CLASS
           
static int CLASS_METHOD
           
static int DEFINITION
           
static int ENUM
           
static int ENUMERATOR
           
static int IMPORT
           
static int INTERFACE
           
static int MAX_PRODUCTION
           
static int METHOD
           
static int MIN_PRODUCTION
           
static int PACKAGE
           
static int REQUIRE
           
static int SCOPED_IDENTIFIER
           
static int SPECIFICATION
           
static int TYPE
           
 
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

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

SCOPED_IDENTIFIER

public static final int SCOPED_IDENTIFIER
See Also:
Constant Field Values

ARRAY_ORDER

public static final int ARRAY_ORDER
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.