org.jacorb.idl

Class parser


public class parser
extends lr_parser

Field Summary

protected static short[][]
_action_table
parse action table
protected static short[][]
_production_table
production table
protected static short[][]
_reduce_table
reduce_goto table
protected org.jacorb.idl.CUP$actions
action_obj
instance of action encapsulation class
protected static boolean
cldc10
static Class
codeGeneratorClass
static String
compiler_version
static String
currentVersion
static boolean
done_parsing
used for internal checking that name conversion to mapped Java names is done only after parsing
protected static String
finalString
protected static boolean
forceOverwrite
static boolean
generateIR
protected static boolean
generateIncluded
static boolean
generate_ami_callback
static boolean
generate_ami_polling
static boolean
generate_skeletons
static boolean
generate_stubs
static IDLTreeVisitor
generator
static boolean
include_state
compiler flags
protected static boolean
inhibitionState
protected static boolean
localityContraint
static Hashtable
pack_replace
static Stack
scopes
static boolean
sloppy
static boolean
strict_attributes
static boolean
strict_inheritance
these two are to work around buggy IDL generated by Sun's rmic in JDK 1.4
static boolean
strict_names
protected static boolean
useUncheckedNarrow

Fields inherited from class org.jacorb.idl.runtime.lr_parser

_done_parsing, _error_sync_size, action_tab, cur_token, lookahead, lookahead_pos, production_tab, reduce_tab, stack, tos

Constructor Summary

parser()
constructor

Method Summary

int
EOF_sym()
EOF symbol index
short[][]
action_table()
access to parse action table
static int
activeParseThreads()
static void
closeScope(Scope symbol)
called from within the parser whenever parsing a scope symbol is complete
static boolean
compile(argv[] )
static boolean
compile(argv[] , StringWriter logWriter)
static boolean
compileAndHandle(argv[] )
static ScopeData
currentScopeData()
static void
decActiveParseThreads()
symbol
do_action(int act_num, lr_parser parser, java.util.Stack stack, int top)
invoke a user supplied parse action
static void
error(String message)
static void
error(String message, str_token p_info)
int
error_sym()
error symbol index
static void
fatal_error(String message, str_token p_info)
static boolean
generateIncluded()
static String
getFinalString()
static IDLTreeVisitor
getGenerator()
static boolean
getInhibitionState()
static Object
get_pending(String name)
static void
incActiveParseThreads()
protected static void
init()
allows reinitialization if compiler is not run from a command-line
protected void
init_actions()
action encapsulation object initializer
static void
main(argv[] )
static void
openScope()
called from the lexer/scanner whenever a scope opening symbol is encountered
static String
pack_replace(String old)
Package replacements as requested by compiler options
short[][]
production_table()
access to production table
short[][]
reduce_table()
access to reduce_goto table
static void
remove_pending(String name)
void
report_error(String message, Object info)
Report a non fatal error (or warning).
void
report_fatal_error(String message, Object info)
Report a fatal error.
token
scan()
scan to get the next token
static void
setFinalString(String finalString)
static void
setGenerateFinalCode(boolean isFinal)
static void
setGenerator(IDLTreeVisitor generatorObject)
static void
setInhibitionState(boolean flag)
static void
set_included(boolean i)
static void
set_pending(String name)
int
start_production()
start production
int
start_state()
start state
static void
usage(String[] argv, String msg)
void
user_init()
user initialization

Methods inherited from class org.jacorb.idl.runtime.lr_parser

EOF_sym, action_table, advance_lookahead, cur_err_token, debug_message, debug_parse, debug_reduce, debug_shift, do_action, done_parsing, dump_stack, error_recovery, error_sym, error_sync_size, find_recovery_config, get_action, get_reduce, init_actions, parse, parse_lookahead, production_table, read_lookahead, reduce_table, report_error, report_fatal_error, restart_lookahead, scan, shift_under_error, start_production, start_state, syntax_error, try_parse_ahead, unrecovered_syntax_error, user_init

Field Details

_action_table

protected static final short[][] _action_table
parse action table


_production_table

protected static final short[][] _production_table
production table


_reduce_table

protected static final short[][] _reduce_table
reduce_goto table


action_obj

protected org.jacorb.idl.CUP$actions action_obj
instance of action encapsulation class


cldc10

protected static boolean cldc10


codeGeneratorClass

public static Class codeGeneratorClass


compiler_version

public static final String compiler_version


currentVersion

public static String currentVersion


done_parsing

public static boolean done_parsing
used for internal checking that name conversion to mapped Java names is done only after parsing


finalString

protected static String finalString


forceOverwrite

protected static boolean forceOverwrite


generateIR

public static boolean generateIR


generateIncluded

protected static boolean generateIncluded


generate_ami_callback

public static boolean generate_ami_callback


generate_ami_polling

public static boolean generate_ami_polling


generate_skeletons

public static boolean generate_skeletons


generate_stubs

public static boolean generate_stubs


generator

public static IDLTreeVisitor generator


include_state

public static boolean include_state
compiler flags


inhibitionState

protected static boolean inhibitionState


localityContraint

protected static boolean localityContraint


pack_replace

public static Hashtable pack_replace


scopes

public static Stack scopes


sloppy

public static boolean sloppy


strict_attributes

public static boolean strict_attributes


strict_inheritance

public static boolean strict_inheritance
these two are to work around buggy IDL generated by Sun's rmic in JDK 1.4


strict_names

public static boolean strict_names


useUncheckedNarrow

protected static boolean useUncheckedNarrow

Constructor Details

parser

public parser()
constructor

Method Details

EOF_sym

public int EOF_sym()
EOF symbol index
Overrides:
EOF_sym in interface lr_parser


action_table

public short[][] action_table()
access to parse action table
Overrides:
action_table in interface lr_parser


activeParseThreads

public static int activeParseThreads()


closeScope

public static void closeScope(Scope symbol)
called from within the parser whenever parsing a scope symbol is complete


compile

public static boolean compile(argv[] )
            throws Exception


compile

public static boolean compile(argv[] ,
                              StringWriter logWriter)
            throws Exception


compileAndHandle

public static boolean compileAndHandle(argv[] )


currentScopeData

public static ScopeData currentScopeData()


decActiveParseThreads

public static void decActiveParseThreads()


do_action

public symbol do_action(int act_num,
                        lr_parser parser,
                        java.util.Stack stack,
                        int top)
            throws java.lang.Exception
invoke a user supplied parse action


error

public static void error(String message)


error

public static void error(String message,
                         str_token p_info)


error_sym

public int error_sym()
error symbol index
Overrides:
error_sym in interface lr_parser


fatal_error

public static void fatal_error(String message,
                               str_token p_info)
            throws ParseException


generateIncluded

public static boolean generateIncluded()


getFinalString

public static String getFinalString()


getGenerator

public static IDLTreeVisitor getGenerator()


getInhibitionState

public static boolean getInhibitionState()


get_pending

public static Object get_pending(String name)


incActiveParseThreads

public static void incActiveParseThreads()


init

protected static void init()
allows reinitialization if compiler is not run from a command-line


init_actions

protected void init_actions()
action encapsulation object initializer
Overrides:
init_actions in interface lr_parser


main

public static void main(argv[] )


openScope

public static void openScope()
called from the lexer/scanner whenever a scope opening symbol is encountered


pack_replace

public static String pack_replace(String old)
Package replacements as requested by compiler options


production_table

public short[][] production_table()
access to production table
Overrides:
production_table in interface lr_parser


reduce_table

public short[][] reduce_table()
access to reduce_goto table
Overrides:
reduce_table in interface lr_parser


remove_pending

public static void remove_pending(String name)


report_error

public void report_error(String message,
                         Object info)
Report a non fatal error (or warning). This method takes a message string and an additional object (to be used by specializations implemented in subclasses). Here in the base class a very simple implementation is provided which simply prints the message to System.err.
Overrides:
report_error in interface lr_parser

Parameters:
message - an error message.
info - an extra object reserved for use by specialized subclasses.


report_fatal_error

public void report_fatal_error(String message,
                               Object info)
            throws ParseException
Report a fatal error. This method takes a message string and an additional object (to be used by specializations implemented in subclasses). Here in the base class a very simple implementation is provided which reports the error then throws an exception.
Overrides:
report_fatal_error in interface lr_parser

Parameters:
message - an error message.
info - an extra object reserved for use by specialized subclasses.


scan

public token scan()
            throws java.lang.Exception
scan to get the next token
Overrides:
scan in interface lr_parser


setFinalString

public static void setFinalString(String finalString)


setGenerateFinalCode

public static void setGenerateFinalCode(boolean isFinal)


setGenerator

public static void setGenerator(IDLTreeVisitor generatorObject)


setInhibitionState

public static void setInhibitionState(boolean flag)


set_included

public static void set_included(boolean i)


set_pending

public static void set_pending(String name)


start_production

public int start_production()
start production
Overrides:
start_production in interface lr_parser


start_state

public int start_state()
start state
Overrides:
start_state in interface lr_parser


usage

public static void usage(String[] argv,
                         String msg)


user_init

public void user_init()
            throws java.lang.Exception
user initialization
Overrides:
user_init in interface lr_parser