marf.nlp.Parsing.GrammarCompiler
Class GrammarTokenType

java.lang.Object
  extended by marf.nlp.Parsing.TokenType
      extended by marf.nlp.Parsing.TokenSubType
          extended by marf.nlp.Parsing.GrammarCompiler.GrammarTokenType
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ProbabilisticGrammarTokenType

public class GrammarTokenType
extends TokenSubType

Represents the data type of a grammar token.

$Id: GrammarTokenType.java,v 1.13 2006/01/19 04:13:17 mokhov Exp $

Since:
0.3.0.2
Version:
$Revision: 1.13 $
Author:
Serguei Mokhov
See Also:
Serialized Form

Field Summary
static int EPSILON
          This indicates the epsilon in the grammar tokens.
static int GRAMMAR_EOL
          End of grammar line or statement.
static int GRAMMAR_ID
          Equivalent to TokenType's ID but for grammar parsing.
static int GRAMMAR_OR
          Productions separator - `|'.
static int RULE_OP
          Corresponds to the rule operator `::='.
static int S_CHECK_DEFINED
          Indicates to check whether a symbol was defined.
static int S_CHECK_MEMB_DEFINED
          Indicates to check whether a memory buffer was defined.
static int S_CHECK_SCOPE
          Indicates to check scope of applicability.
static int S_DEFINE_CLASS
          Indicates to check whether a class was defined.
static int S_DEFINE_FUNC
          Indicates to check whether a function was defined.
static int S_DEFINE_VAR
          Indicates to check whether a variable was defined.
static int S_ENFORCE_INT
          Indicates to enforce integer type.
static int S_TYPE_CHECK_AND_CAST
          Indicates to do type checks and implicit casts if possible.
static int SE_MISSING_SEMICOLON
          Indicates a missing semicolon syntax error.
static int SEMANTIC_TOKEN
          Semantic token type.
 
Fields inherited from class marf.nlp.Parsing.TokenSubType
AND, CLASS, COMMA, CURLY_CL, CURLY_OP, DO, ELSE, IF, INTEGER, iSubtype, NOT, OP_ASIGN, OP_DIV, OP_EQ, OP_GE, OP_GT, OP_LE, OP_LT, OP_MEMB, OP_MINUS, OP_MULT, OP_NE, OP_PLUS, OR, PAREN_CL, PAREN_OP, PROGRAM, READ, REAL, RETURN, SEMICOLON, soBrackets, soKeywords, soOperators, soTokenSubTypes, soValidPunctuation, SQR_CL, SQR_OP, THEN, THIS, WHILE, WRITE
 
Fields inherited from class marf.nlp.Parsing.TokenType
BACKTRACK, BRACKET, EOF, ERROR, ID, iType, KEYWORD, NUM, OPERATOR, PUNCT, soTokenTypes, UNKNOWN
 
Constructor Summary
GrammarTokenType()
          Constructor.
 
Method Summary
static java.lang.String getMARFSourceCodeRevision()
          Retrieves class' revision.
 
Methods inherited from class marf.nlp.Parsing.TokenSubType
getSubtype, setSubtype, setSubTypeByLexeme
 
Methods inherited from class marf.nlp.Parsing.TokenType
getType, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EPSILON

public static final int EPSILON
This indicates the epsilon in the grammar tokens.

See Also:
Constant Field Values

GRAMMAR_OR

public static final int GRAMMAR_OR
Productions separator - `|'.

See Also:
Constant Field Values

RULE_OP

public static final int RULE_OP
Corresponds to the rule operator `::='.

See Also:
Constant Field Values

GRAMMAR_ID

public static final int GRAMMAR_ID
Equivalent to TokenType's ID but for grammar parsing. Grammar's IDs are all non-terminals.

See Also:
Constant Field Values

GRAMMAR_EOL

public static final int GRAMMAR_EOL
End of grammar line or statement.

See Also:
Constant Field Values

SEMANTIC_TOKEN

public static final int SEMANTIC_TOKEN
Semantic token type.

See Also:
Constant Field Values

S_CHECK_DEFINED

public static final int S_CHECK_DEFINED
Indicates to check whether a symbol was defined.

See Also:
Constant Field Values

S_DEFINE_VAR

public static final int S_DEFINE_VAR
Indicates to check whether a variable was defined.

See Also:
Constant Field Values

S_DEFINE_FUNC

public static final int S_DEFINE_FUNC
Indicates to check whether a function was defined.

See Also:
Constant Field Values

S_DEFINE_CLASS

public static final int S_DEFINE_CLASS
Indicates to check whether a class was defined.

See Also:
Constant Field Values

S_CHECK_SCOPE

public static final int S_CHECK_SCOPE
Indicates to check scope of applicability.

See Also:
Constant Field Values

S_ENFORCE_INT

public static final int S_ENFORCE_INT
Indicates to enforce integer type.

See Also:
Constant Field Values

S_TYPE_CHECK_AND_CAST

public static final int S_TYPE_CHECK_AND_CAST
Indicates to do type checks and implicit casts if possible.

See Also:
Constant Field Values

S_CHECK_MEMB_DEFINED

public static final int S_CHECK_MEMB_DEFINED
Indicates to check whether a memory buffer was defined.

See Also:
Constant Field Values

SE_MISSING_SEMICOLON

public static final int SE_MISSING_SEMICOLON
Indicates a missing semicolon syntax error.

See Also:
Constant Field Values
Constructor Detail

GrammarTokenType

public GrammarTokenType()
Constructor. Initializes default token types and keywords.

Method Detail

getMARFSourceCodeRevision

public static java.lang.String getMARFSourceCodeRevision()
Retrieves class' revision.

Returns:
revision string


SourceForge Logo