FreeHEP API
Version current

org.freehep.aid
Class AidParser

java.lang.Object
  extended byorg.freehep.aid.AidParser
All Implemented Interfaces:
AidParserConstants

public class AidParser
extends Object
implements AidParserConstants

Source Code:
AidParser.java

Field Summary
 Token jj_nt
           
 boolean lookingAhead
           
 Token token
           
 AidParserTokenManager token_source
           
 
Fields inherited from interface org.freehep.aid.AidParserConstants
_DEFAULT, ABSTRACT, ASSERT, ASSIGN, AT, BOOLEAN, BREAK, BYTE, CASE, CATCH, CHAR, CHARACTER_LITERAL, CLASS, COMMA, CONST, CONTINUE, DECIMAL_LITERAL, DEFAULT, DIGIT, DO, DOT, DOUBLE, ELSE, END_LANGUAGE_BLOCK, ENUM, EOF, EXPONENT, EXTENDS, FALSE, FINAL, FINALLY, FLOAT, FLOATING_POINT_LITERAL, FOR, FORMAL_COMMENT, FORMAL_COMMENT_END, GOTO, GT, HEX_LITERAL, IDENTIFIER, IF, IMPLEMENTS, IMPORT, IN_FORMAL_COMMENT, IN_LANGUAGE_BLOCK, IN_MULTI_LINE_COMMENT, IN_SINGLE_LINE_COMMENT, INSTANCEOF, INT, INTEGER_LITERAL, INTERFACE, LANGUAGE_SECTION, LBRACE, LBRACKET, LETTER, LONG, LPAREN, LT, MULTI_LINE_COMMENT, NATIVE, NEW, NULL, OCTAL_LITERAL, PACKAGE, PRIVATE, PROTECTED, PUBLIC, RBRACE, RBRACKET, RETURN, RPAREN, SEMICOLON, SHORT, SINGLE_LINE_COMMENT, STATIC, STRICTFP, STRING_LITERAL, SUPER, SWITCH, SYNCHRONIZED, THIS, THROW, THROWS, tokenImage, TRANSIENT, TRUE, TRY, VOID, VOLATILE, WHILE
 
Constructor Summary
AidParser(AidParserTokenManager tm)
           
AidParser(InputStream stream)
           
AidParser(Reader stream)
           
 
Method Summary
 void addGlobalClasses()
           
 void BooleanLiteral()
           
 void CompilationUnit()
          THE AID LANGUAGE GRAMMAR STARTS HERE *
 IConstructor ConstructorDeclaration()
           
 void ConstructorDeclarationLookahead()
           
 void disable_tracing()
           
 void enable_tracing()
           
 IField FieldDeclaration()
           
 IField FieldList(IType type, Vector comments)
           
 INamedType FormalParameter()
           
 void FormalParameters(Vector namedTypes)
           
 ParseException generateParseException()
           
 Token getNextToken()
           
 Vector getSpecialTokens(Vector specialTokens)
          Adds all special (chained) tokens to the vector which is input and returns that vector.
 Token getToken(int index)
           
 String InterfaceDeclaration(String packageName, Vector packageComments)
           
 void InterfaceMemberDeclaration(Vector constructors, Vector methods, Vector fields)
           
 String Literal()
           
static void main(String[] args)
           
 IMethod MethodDeclaration()
           
 void MethodDeclarationLookahead()
           
 String MethodDeclarator(Vector namedTypes)
           
 String Name()
           
 void NameList(Vector names)
           
 void NullLiteral()
           
 String PackageDeclaration(Vector comments)
           
 void parse()
           
 String PrimitiveType()
           
 void ReInit(AidParserTokenManager tm)
           
 void ReInit(InputStream stream)
           
 void ReInit(Reader stream)
           
 IType Type(Vector comments)
           
 String TypeParameter()
           
 void TypeParameters(Vector parameters)
           
 INamedType VariableDeclarator(IType type)
           
 String VariableDeclaratorId()
           
 String VariableInitializer()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public AidParserTokenManager token_source

token

public Token token

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead
Constructor Detail

AidParser

public AidParser(InputStream stream)

AidParser

public AidParser(Reader stream)

AidParser

public AidParser(AidParserTokenManager tm)
Method Detail

getSpecialTokens

public Vector getSpecialTokens(Vector specialTokens)
Adds all special (chained) tokens to the vector which is input and returns that vector. If null is input, a new vector is returned. The special tokens are relative to getToken(0).


parse

public void parse()
           throws ParseException,
                  FileNotFoundException
Throws:
ParseException
FileNotFoundException

addGlobalClasses

public void addGlobalClasses()

main

public static void main(String[] args)

CompilationUnit

public final void CompilationUnit()
                           throws ParseException
THE AID LANGUAGE GRAMMAR STARTS HERE *

Throws:
ParseException

PackageDeclaration

public final String PackageDeclaration(Vector comments)
                                throws ParseException
Throws:
ParseException

InterfaceDeclaration

public final String InterfaceDeclaration(String packageName,
                                         Vector packageComments)
                                  throws ParseException
Throws:
ParseException

TypeParameters

public final void TypeParameters(Vector parameters)
                          throws ParseException
Throws:
ParseException

TypeParameter

public final String TypeParameter()
                           throws ParseException
Throws:
ParseException

InterfaceMemberDeclaration

public final void InterfaceMemberDeclaration(Vector constructors,
                                             Vector methods,
                                             Vector fields)
                                      throws ParseException
Throws:
ParseException

FieldDeclaration

public final IField FieldDeclaration()
                              throws ParseException
Throws:
ParseException

FieldList

public final IField FieldList(IType type,
                              Vector comments)
                       throws ParseException
Throws:
ParseException

VariableDeclarator

public final INamedType VariableDeclarator(IType type)
                                    throws ParseException
Throws:
ParseException

VariableDeclaratorId

public final String VariableDeclaratorId()
                                  throws ParseException
Throws:
ParseException

VariableInitializer

public final String VariableInitializer()
                                 throws ParseException
Throws:
ParseException

MethodDeclarationLookahead

public final void MethodDeclarationLookahead()
                                      throws ParseException
Throws:
ParseException

MethodDeclaration

public final IMethod MethodDeclaration()
                                throws ParseException
Throws:
ParseException

MethodDeclarator

public final String MethodDeclarator(Vector namedTypes)
                              throws ParseException
Throws:
ParseException

FormalParameters

public final void FormalParameters(Vector namedTypes)
                            throws ParseException
Throws:
ParseException

FormalParameter

public final INamedType FormalParameter()
                                 throws ParseException
Throws:
ParseException

ConstructorDeclarationLookahead

public final void ConstructorDeclarationLookahead()
                                           throws ParseException
Throws:
ParseException

ConstructorDeclaration

public final IConstructor ConstructorDeclaration()
                                          throws ParseException
Throws:
ParseException

Type

public final IType Type(Vector comments)
                 throws ParseException
Throws:
ParseException

PrimitiveType

public final String PrimitiveType()
                           throws ParseException
Throws:
ParseException

Name

public final String Name()
                  throws ParseException
Throws:
ParseException

NameList

public final void NameList(Vector names)
                    throws ParseException
Throws:
ParseException

Literal

public final String Literal()
                     throws ParseException
Throws:
ParseException

BooleanLiteral

public final void BooleanLiteral()
                          throws ParseException
Throws:
ParseException

NullLiteral

public final void NullLiteral()
                       throws ParseException
Throws:
ParseException

ReInit

public void ReInit(InputStream stream)

ReInit

public void ReInit(Reader stream)

ReInit

public void ReInit(AidParserTokenManager tm)

getNextToken

public final Token getNextToken()

getToken

public final Token getToken(int index)

generateParseException

public ParseException generateParseException()

enable_tracing

public final void enable_tracing()

disable_tracing

public final void disable_tracing()

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.