FreeHEP API
Version current

org.freehep.jaco.rtti.cpp
Class CPPParser

java.lang.Object
  extended byorg.freehep.jaco.rtti.cpp.CPPParser
All Implemented Interfaces:
CPPParserConstants

public final class CPPParser
extends Object
implements CPPParserConstants

Source Code:
CPPParser.java

Field Summary
 Token jj_nt
           
 boolean lookingAhead
           
 Token token
           
 CPPParserTokenManager token_source
           
 
Fields inherited from interface org.freehep.jaco.rtti.cpp.CPPParserConstants
_DEFAULT, AFTER_LINE_DIRECTIVE, AMPERSAND, AND, ARROWSTAR, ASSIGNEQUAL, AUTO, BITWISEANDEQUAL, BITWISEOR, BITWISEOREQUAL, BITWISEXOR, BITWISEXOREQUAL, BREAK, CASE, CATCH, CHAR, CHARACTER, CLASS, COLON, COMMA, CONST, CONTINUE, DECIMALINT, DECIMALLONG, DEFAULT, DELETE, DIVIDE, DIVIDEEQUAL, DO, DOT, DOTSTAR, DOUBLE, ELLIPSIS, ELSE, ENUM, EOF, EQUAL, EXTERN, FALSETOK, FLOAT, FLOATONE, FLOATTWO, FOR, FORMAL_COMMENT, FRIEND, GOTO, GREATERTHAN, GREATERTHANOREQUALTO, HEXADECIMALINT, HEXADECIMALLONG, ID, IF, IN_FORMAL_COMMENT, IN_MULTI_LINE_COMMENT, IN_SINGLE_LINE_COMMENT, INLINE, INT, LCURLYBRACE, LESSTHAN, LESSTHANOREQUALTO, LINE_DIRECTIVE, LINE_NUMBER, LONG, LPARENTHESIS, LSQUAREBRACKET, MINUS, MINUSEQUAL, MINUSMINUS, MOD, MODEQUAL, MULTI_LINE_COMMENT, NAMESPACE, NEW, NOT, NOTEQUAL, OCTALINT, OCTALLONG, OPERATOR, OR, PLUS, PLUSEQUAL, PLUSPLUS, POINTERTO, PREPROCESSOR_OUTPUT, PRIVATE, PROTECTED, PUBLIC, QUESTIONMARK, RCURLYBRACE, REDECLARED, REGISTER, RETURN, RPARENTHESIS, RSQUAREBRACKET, SCOPE, SEMICOLON, SHIFTLEFT, SHIFTLEFTEQUAL, SHIFTRIGHT, SHIFTRIGHTEQUAL, SHORT, SIGNED, SINGLE_LINE_COMMENT, SIZEOF, STAR, STATIC, STRING, STRUCT, SWITCH, TEMPLATE, THIS, THROW, TILDE, TIMESEQUAL, tokenImage, TRUETOK, TRY, TYPEDEF, UNION, UNSIGNED, UNSIGNED_DECIMALINT, UNSIGNED_DECIMALLONG, UNSIGNED_HEXADECIMALINT, UNSIGNED_HEXADECIMALLONG, UNSIGNED_OCTALINT, UNSIGNED_OCTALLONG, USING, VIRTUAL, VOID, VOLATILE, WHILE
 
Constructor Summary
CPPParser(CPPParserTokenManager tm)
           
CPPParser(InputStream stream)
           
CPPParser(Reader stream)
           
 
Method Summary
 void abstract_declarator_suffix()
           
 void abstract_declarator()
           
 String access_specifier()
           
 void additive_expression()
           
 void and_expression()
           
 void assignment_expression()
           
 Vector base_clause(org.freehep.jaco.rtti.cpp.ClassScope scope)
           
 String base_specifier(org.freehep.jaco.rtti.cpp.ClassScope scope)
           
 String builtin_type_specifier()
           
 void cast_expression()
           
 void class_head()
           
 String class_specifier()
           
 void compound_statement()
           
 void conditional_expression()
           
 void constant_expression()
           
 void constant()
           
 void conversion_function_decl_or_def()
           
 void ctor_declarator_lookahead()
           
 Scope ctor_declarator(Vector constructors)
           
 void ctor_definition(Vector constructors)
           
 void ctor_initializer()
           
 void cv_qualifier_seq()
           
 void declaration_list()
           
 org.freehep.jaco.rtti.cpp.Declaration declaration_specifiers()
          Very temporary.
 void declaration()
           
 void declarator_suffixes()
           
 org.freehep.jaco.rtti.cpp.Declarator declarator()
           
 void delete_expression()
           
 org.freehep.jaco.rtti.cpp.Declarator direct_declarator()
           
 void direct_new_declarator()
           
 void disable_tracing()
           
 void dtor_ctor_decl_spec()
           
 void dtor_declarator()
           
 void dtor_definition()
           
 void enable_tracing()
           
 void enum_specifier()
           
 void enumerator_list()
           
 void enumerator()
           
 void equality_expression()
           
 void exception_declaration()
           
 void exception_list()
           
 void exception_spec()
           
 void exclusive_or_expression()
           
 void expression_list()
           
 void expression()
           
 void external_declaration()
           
 void func_decl_def(Scope sc)
           
 void function_declarator_lookahead()
          Used only for lookahead.
 Scope function_declarator(boolean isTypedef, org.freehep.jaco.rtti.cpp.Declaration returnDec, Vector methods)
           
 void function_definition(Vector methods)
           
 Scope function_direct_declarator(boolean isTypedef, org.freehep.jaco.rtti.cpp.Declaration returnDec, Vector methods)
           
 ParseException generateParseException()
           
 Token getNextToken()
           
 Token getToken(int index)
           
 void handler()
           
 void id_expression()
           
 void inclusive_or_expression()
           
 void init_declarator_list(boolean isTypedef)
           
 void init_declarator(boolean isTypedef)
           
 void initializer()
           
 void iteration_statement()
           
 void jump_statement()
           
 void labeled_statement()
           
 void linkage_specification()
           
 void logical_and_expression()
           
 void logical_or_expression()
           
static void main(String[] args)
           
 void member_declaration(Vector constructors, Vector methods)
           
 void member_declarator_list(boolean isTypedef)
           
 void member_declarator(boolean isTypedef)
           
 void multiplicative_expression()
           
 void namespace_alias_definition()
           
 void namespace_definition()
           
 String namespace_name()
           
 void new_declarator()
           
 void new_expression()
           
 void new_initializer()
           
 void new_type_id()
           
 void optor()
           
 Vector parameter_declaration_list()
           
 INamedType parameter_declaration()
           
 Vector parameter_list()
           
 void pm_expression()
           
 void postfix_expression()
           
 void primary_expression()
           
 void ptr_operator(org.freehep.jaco.rtti.cpp.Declaration declaration)
           
 void ptr_to_member()
           
 String qualified_id()
           
 String qualified_type()
           
 void ReInit(CPPParserTokenManager tm)
           
 void ReInit(InputStream stream)
           
 void ReInit(Reader stream)
           
 void relational_expression()
           
 void scope_override_lookahead()
           
 String scope_override()
           
 void selection_statement()
           
 void shift_expression()
           
 void simple_dtor_declarator()
           
 void simple_type_specifier()
           
 void statement_list()
           
 void statement()
           
 void storage_class_specifier(org.freehep.jaco.rtti.cpp.Modifiers modifiers)
          Very temporary.
static void storeComment(Token token)
           
 void superclass_init()
           
 void template_argument_list()
           
 void template_argument()
           
 void template_head()
           
 void template_id()
           
 void template_parameter_list()
           
 void template_parameter()
           
 void throw_statement()
           
 void translation_unit()
           
 void try_block()
           
 org.freehep.jaco.rtti.cpp.Modifiers type_modifiers()
          Very temporary.
 void type_name()
           
 void type_qualifier()
           
 void unary_expression()
           
 void unary_operator()
           
 void using_declaration()
           
 void using_directive()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public CPPParserTokenManager token_source

token

public Token token

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead
Constructor Detail

CPPParser

public CPPParser(InputStream stream)

CPPParser

public CPPParser(Reader stream)

CPPParser

public CPPParser(CPPParserTokenManager tm)
Method Detail

storeComment

public static void storeComment(Token token)

main

public static void main(String[] args)

translation_unit

public final void translation_unit()
                            throws ParseException
Throws:
ParseException

declaration_list

public final void declaration_list()
                            throws ParseException
Throws:
ParseException

namespace_definition

public final void namespace_definition()
                                throws ParseException
Throws:
ParseException

namespace_alias_definition

public final void namespace_alias_definition()
                                      throws ParseException
Throws:
ParseException

using_declaration

public final void using_declaration()
                             throws ParseException
Throws:
ParseException

using_directive

public final void using_directive()
                           throws ParseException
Throws:
ParseException

namespace_name

public final String namespace_name()
                            throws ParseException
Throws:
ParseException

external_declaration

public final void external_declaration()
                                throws ParseException
Throws:
ParseException

function_definition

public final void function_definition(Vector methods)
                               throws ParseException
Throws:
ParseException

func_decl_def

public final void func_decl_def(Scope sc)
                         throws ParseException
Throws:
ParseException

linkage_specification

public final void linkage_specification()
                                 throws ParseException
Throws:
ParseException

declaration

public final void declaration()
                       throws ParseException
Throws:
ParseException

type_modifiers

public final org.freehep.jaco.rtti.cpp.Modifiers type_modifiers()
                                                         throws ParseException
Very temporary. Just returns true if it sees a typedef. Finally, we will need a structure that stores all the attributes.

Throws:
ParseException

declaration_specifiers

public final org.freehep.jaco.rtti.cpp.Declaration declaration_specifiers()
                                                                   throws ParseException
Very temporary. Just returns true if it sees a typedef. Finally, we will need a structure that stores all the attributes.

Throws:
ParseException

simple_type_specifier

public final void simple_type_specifier()
                                 throws ParseException
Throws:
ParseException

scope_override_lookahead

public final void scope_override_lookahead()
                                    throws ParseException
Throws:
ParseException

scope_override

public final String scope_override()
                            throws ParseException
Throws:
ParseException

qualified_id

public final String qualified_id()
                          throws ParseException
Throws:
ParseException

ptr_to_member

public final void ptr_to_member()
                         throws ParseException
Throws:
ParseException

qualified_type

public final String qualified_type()
                            throws ParseException
Throws:
ParseException

type_qualifier

public final void type_qualifier()
                          throws ParseException
Throws:
ParseException

storage_class_specifier

public final void storage_class_specifier(org.freehep.jaco.rtti.cpp.Modifiers modifiers)
                                   throws ParseException
Very temporary. Just returns true if it sees a typedef. Finally, we will need a structure that stores all the attributes.

Throws:
ParseException

builtin_type_specifier

public final String builtin_type_specifier()
                                    throws ParseException
Throws:
ParseException

init_declarator_list

public final void init_declarator_list(boolean isTypedef)
                                throws ParseException
Throws:
ParseException

init_declarator

public final void init_declarator(boolean isTypedef)
                           throws ParseException
Throws:
ParseException

class_head

public final void class_head()
                      throws ParseException
Throws:
ParseException

class_specifier

public final String class_specifier()
                             throws ParseException
Throws:
ParseException

base_clause

public final Vector base_clause(org.freehep.jaco.rtti.cpp.ClassScope scope)
                         throws ParseException
Throws:
ParseException

base_specifier

public final String base_specifier(org.freehep.jaco.rtti.cpp.ClassScope scope)
                            throws ParseException
Throws:
ParseException

access_specifier

public final String access_specifier()
                              throws ParseException
Throws:
ParseException

member_declaration

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

member_declarator_list

public final void member_declarator_list(boolean isTypedef)
                                  throws ParseException
Throws:
ParseException

member_declarator

public final void member_declarator(boolean isTypedef)
                             throws ParseException
Throws:
ParseException

conversion_function_decl_or_def

public final void conversion_function_decl_or_def()
                                           throws ParseException
Throws:
ParseException

enum_specifier

public final void enum_specifier()
                          throws ParseException
Throws:
ParseException

enumerator_list

public final void enumerator_list()
                           throws ParseException
Throws:
ParseException

enumerator

public final void enumerator()
                      throws ParseException
Throws:
ParseException

ptr_operator

public final void ptr_operator(org.freehep.jaco.rtti.cpp.Declaration declaration)
                        throws ParseException
Throws:
ParseException

cv_qualifier_seq

public final void cv_qualifier_seq()
                            throws ParseException
Throws:
ParseException

declarator

public final org.freehep.jaco.rtti.cpp.Declarator declarator()
                                                      throws ParseException
Throws:
ParseException

direct_declarator

public final org.freehep.jaco.rtti.cpp.Declarator direct_declarator()
                                                             throws ParseException
Throws:
ParseException

declarator_suffixes

public final void declarator_suffixes()
                               throws ParseException
Throws:
ParseException

function_declarator_lookahead

public final void function_declarator_lookahead()
                                         throws ParseException
Used only for lookahead.

Throws:
ParseException

function_declarator

public final Scope function_declarator(boolean isTypedef,
                                       org.freehep.jaco.rtti.cpp.Declaration returnDec,
                                       Vector methods)
                                throws ParseException
Throws:
ParseException

function_direct_declarator

public final Scope function_direct_declarator(boolean isTypedef,
                                              org.freehep.jaco.rtti.cpp.Declaration returnDec,
                                              Vector methods)
                                       throws ParseException
Throws:
ParseException

dtor_ctor_decl_spec

public final void dtor_ctor_decl_spec()
                               throws ParseException
Throws:
ParseException

dtor_definition

public final void dtor_definition()
                           throws ParseException
Throws:
ParseException

ctor_definition

public final void ctor_definition(Vector constructors)
                           throws ParseException
Throws:
ParseException

ctor_declarator_lookahead

public final void ctor_declarator_lookahead()
                                     throws ParseException
Throws:
ParseException

ctor_declarator

public final Scope ctor_declarator(Vector constructors)
                            throws ParseException
Throws:
ParseException

ctor_initializer

public final void ctor_initializer()
                            throws ParseException
Throws:
ParseException

superclass_init

public final void superclass_init()
                           throws ParseException
Throws:
ParseException

dtor_declarator

public final void dtor_declarator()
                           throws ParseException
Throws:
ParseException

simple_dtor_declarator

public final void simple_dtor_declarator()
                                  throws ParseException
Throws:
ParseException

parameter_list

public final Vector parameter_list()
                            throws ParseException
Throws:
ParseException

parameter_declaration_list

public final Vector parameter_declaration_list()
                                        throws ParseException
Throws:
ParseException

parameter_declaration

public final INamedType parameter_declaration()
                                       throws ParseException
Throws:
ParseException

initializer

public final void initializer()
                       throws ParseException
Throws:
ParseException

type_name

public final void type_name()
                     throws ParseException
Throws:
ParseException

abstract_declarator

public final void abstract_declarator()
                               throws ParseException
Throws:
ParseException

abstract_declarator_suffix

public final void abstract_declarator_suffix()
                                      throws ParseException
Throws:
ParseException

template_head

public final void template_head()
                         throws ParseException
Throws:
ParseException

template_parameter_list

public final void template_parameter_list()
                                   throws ParseException
Throws:
ParseException

template_parameter

public final void template_parameter()
                              throws ParseException
Throws:
ParseException

template_id

public final void template_id()
                       throws ParseException
Throws:
ParseException

template_argument_list

public final void template_argument_list()
                                  throws ParseException
Throws:
ParseException

template_argument

public final void template_argument()
                             throws ParseException
Throws:
ParseException

statement_list

public final void statement_list()
                          throws ParseException
Throws:
ParseException

statement

public final void statement()
                     throws ParseException
Throws:
ParseException

labeled_statement

public final void labeled_statement()
                             throws ParseException
Throws:
ParseException

compound_statement

public final void compound_statement()
                              throws ParseException
Throws:
ParseException

selection_statement

public final void selection_statement()
                               throws ParseException
Throws:
ParseException

iteration_statement

public final void iteration_statement()
                               throws ParseException
Throws:
ParseException

jump_statement

public final void jump_statement()
                          throws ParseException
Throws:
ParseException

try_block

public final void try_block()
                     throws ParseException
Throws:
ParseException

handler

public final void handler()
                   throws ParseException
Throws:
ParseException

exception_declaration

public final void exception_declaration()
                                 throws ParseException
Throws:
ParseException

throw_statement

public final void throw_statement()
                           throws ParseException
Throws:
ParseException

expression

public final void expression()
                      throws ParseException
Throws:
ParseException

assignment_expression

public final void assignment_expression()
                                 throws ParseException
Throws:
ParseException

conditional_expression

public final void conditional_expression()
                                  throws ParseException
Throws:
ParseException

constant_expression

public final void constant_expression()
                               throws ParseException
Throws:
ParseException

logical_or_expression

public final void logical_or_expression()
                                 throws ParseException
Throws:
ParseException

logical_and_expression

public final void logical_and_expression()
                                  throws ParseException
Throws:
ParseException

inclusive_or_expression

public final void inclusive_or_expression()
                                   throws ParseException
Throws:
ParseException

exclusive_or_expression

public final void exclusive_or_expression()
                                   throws ParseException
Throws:
ParseException

and_expression

public final void and_expression()
                          throws ParseException
Throws:
ParseException

equality_expression

public final void equality_expression()
                               throws ParseException
Throws:
ParseException

relational_expression

public final void relational_expression()
                                 throws ParseException
Throws:
ParseException

shift_expression

public final void shift_expression()
                            throws ParseException
Throws:
ParseException

additive_expression

public final void additive_expression()
                               throws ParseException
Throws:
ParseException

multiplicative_expression

public final void multiplicative_expression()
                                     throws ParseException
Throws:
ParseException

pm_expression

public final void pm_expression()
                         throws ParseException
Throws:
ParseException

cast_expression

public final void cast_expression()
                           throws ParseException
Throws:
ParseException

unary_expression

public final void unary_expression()
                            throws ParseException
Throws:
ParseException

new_expression

public final void new_expression()
                          throws ParseException
Throws:
ParseException

new_type_id

public final void new_type_id()
                       throws ParseException
Throws:
ParseException

new_declarator

public final void new_declarator()
                          throws ParseException
Throws:
ParseException

direct_new_declarator

public final void direct_new_declarator()
                                 throws ParseException
Throws:
ParseException

new_initializer

public final void new_initializer()
                           throws ParseException
Throws:
ParseException

delete_expression

public final void delete_expression()
                             throws ParseException
Throws:
ParseException

unary_operator

public final void unary_operator()
                          throws ParseException
Throws:
ParseException

postfix_expression

public final void postfix_expression()
                              throws ParseException
Throws:
ParseException

id_expression

public final void id_expression()
                         throws ParseException
Throws:
ParseException

primary_expression

public final void primary_expression()
                              throws ParseException
Throws:
ParseException

expression_list

public final void expression_list()
                           throws ParseException
Throws:
ParseException

constant

public final void constant()
                    throws ParseException
Throws:
ParseException

optor

public final void optor()
                 throws ParseException
Throws:
ParseException

exception_spec

public final void exception_spec()
                          throws ParseException
Throws:
ParseException

exception_list

public final void exception_list()
                          throws ParseException
Throws:
ParseException

ReInit

public void ReInit(InputStream stream)

ReInit

public void ReInit(Reader stream)

ReInit

public void ReInit(CPPParserTokenManager 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.