org.jacorb.idl
Class parser

java.lang.Object
  extended byorg.jacorb.idl.runtime.lr_parser
      extended byorg.jacorb.idl.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 java.lang.String compiler_version
           
static java.lang.String currentVersion
           
static boolean done_parsing
          used for internal checking that name conversion to mapped Java names is done only after parsing
protected static java.lang.String finalString
           
protected static boolean forceOverwrite
           
static boolean generate_ami_callback
           
static boolean generate_ami_polling
           
static boolean generate_skeletons
           
static boolean generate_stubs
           
protected static boolean generateDiiStubs
           
protected static boolean generateIncluded
           
static boolean generateIR
           
static IDLTreeVisitor generator
           
static boolean include_state
          compiler flags
protected static boolean inhibitionState
           
protected static boolean localityContraint
           
static java.util.Hashtable pack_replace
           
static java.util.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
 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(java.lang.String[] argv)
           
static boolean compile(java.lang.String[] argv, java.io.StringWriter logWriter)
           
static boolean compileAndHandle(java.lang.String[] 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
 int EOF_sym()
          EOF symbol index
 int error_sym()
          error symbol index
static void error(java.lang.String message)
           
static void error(java.lang.String message, str_token p_info)
           
static void fatal_error(java.lang.String message, str_token p_info)
           
static boolean generateIncluded()
           
static java.lang.Object get_pending(java.lang.String name)
           
static java.lang.String getFinalString()
           
static IDLTreeVisitor getGenerator()
           
static boolean getInhibitionState()
           
static void incActiveParseThreads()
           
protected  void init_actions()
          action encapsulation object initializer
protected static void init()
          allows reinitialization if compiler is not run from a command-line
static void main(java.lang.String[] argv)
           
static void openScope()
          called from the lexer/scanner whenever a scope opening symbol is encountered
static java.lang.String pack_replace(java.lang.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(java.lang.String name)
           
 void report_error(java.lang.String message, java.lang.Object info)
          Report a non fatal error (or warning).
 void report_fatal_error(java.lang.String message, java.lang.Object info)
          Report a fatal error.
 token scan()
          scan to get the next token
static void set_included(boolean i)
           
static void set_pending(java.lang.String name)
           
static void setFinalString(java.lang.String finalString)
           
static void setGenerateFinalCode(boolean isFinal)
           
static void setGenerator(IDLTreeVisitor generatorObject)
           
static void setInhibitionState(boolean flag)
           
 int start_production()
          start production
 int start_state()
          start state
static void usage(java.lang.String[] argv, java.lang.String msg)
           
 void user_init()
          user initialization
 
Methods inherited from class org.jacorb.idl.runtime.lr_parser
advance_lookahead, cur_err_token, debug_message, debug_parse, debug_reduce, debug_shift, done_parsing, dump_stack, error_recovery, error_sync_size, find_recovery_config, get_action, get_reduce, parse_lookahead, parse, read_lookahead, restart_lookahead, shift_under_error, syntax_error, try_parse_ahead, unrecovered_syntax_error
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_production_table

protected static final short[][] _production_table
production table


_action_table

protected static final short[][] _action_table
parse action 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


pack_replace

public static java.util.Hashtable pack_replace

scopes

public static java.util.Stack scopes

currentVersion

public static final java.lang.String currentVersion
See Also:
Constant Field Values

compiler_version

public static final java.lang.String compiler_version
See Also:
Constant Field Values

generator

public static IDLTreeVisitor generator

done_parsing

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


include_state

public static boolean include_state
compiler flags


strict_names

public static boolean strict_names

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_attributes

public static boolean strict_attributes

generateIR

public static boolean generateIR

generate_skeletons

public static boolean generate_skeletons

generate_stubs

public static boolean generate_stubs

generate_ami_callback

public static boolean generate_ami_callback

generate_ami_polling

public static boolean generate_ami_polling

generateIncluded

protected static boolean generateIncluded

inhibitionState

protected static boolean inhibitionState

localityContraint

protected static boolean localityContraint

useUncheckedNarrow

protected static boolean useUncheckedNarrow

cldc10

protected static boolean cldc10

forceOverwrite

protected static boolean forceOverwrite

generateDiiStubs

protected static boolean generateDiiStubs

finalString

protected static java.lang.String finalString

sloppy

public static boolean sloppy
Constructor Detail

parser

public parser()
constructor

Method Detail

production_table

public short[][] production_table()
access to production table

Specified by:
production_table in class lr_parser

action_table

public short[][] action_table()
access to parse action table

Specified by:
action_table in class lr_parser
See Also:
lr_parser.get_action(int, int)

reduce_table

public short[][] reduce_table()
access to reduce_goto table

Specified by:
reduce_table in class lr_parser
See Also:
lr_parser.get_reduce(int, int)

init_actions

protected void init_actions()
action encapsulation object initializer

Specified by:
init_actions in class lr_parser

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

Specified by:
do_action in class lr_parser
Parameters:
act_num - the internal index of the action to be performed.
parser - the parser object we are acting for.
stack - the parse stack of that object.
top - the index of the top element of the parse stack.
Throws:
java.lang.Exception

start_state

public int start_state()
start state

Specified by:
start_state in class lr_parser

start_production

public int start_production()
start production

Specified by:
start_production in class lr_parser

EOF_sym

public int EOF_sym()
EOF symbol index

Specified by:
EOF_sym in class lr_parser

error_sym

public int error_sym()
error symbol index

Specified by:
error_sym in class lr_parser

user_init

public void user_init()
               throws java.lang.Exception
user initialization

Overrides:
user_init in class lr_parser
Throws:
java.lang.Exception

scan

public token scan()
           throws java.lang.Exception
scan to get the next token

Specified by:
scan in class lr_parser
Throws:
java.lang.Exception

init

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


main

public static void main(java.lang.String[] argv)

compileAndHandle

public static boolean compileAndHandle(java.lang.String[] argv)

compile

public static boolean compile(java.lang.String[] argv)
                       throws java.lang.Exception
Throws:
java.lang.Exception

compile

public static boolean compile(java.lang.String[] argv,
                              java.io.StringWriter logWriter)
                       throws java.lang.Exception
Throws:
java.lang.Exception

usage

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

report_fatal_error

public void report_fatal_error(java.lang.String message,
                               java.lang.Object info)
                        throws ParseException
Description copied from class: lr_parser
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 class lr_parser
Parameters:
message - an error message.
info - an extra object reserved for use by specialized subclasses.
Throws:
ParseException

fatal_error

public static void fatal_error(java.lang.String message,
                               str_token p_info)
                        throws ParseException
Throws:
ParseException

report_error

public void report_error(java.lang.String message,
                         java.lang.Object info)
Description copied from class: lr_parser
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 class lr_parser
Parameters:
message - an error message.
info - an extra object reserved for use by specialized subclasses.

error

public static void error(java.lang.String message,
                         str_token p_info)

error

public static void error(java.lang.String message)

openScope

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


closeScope

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


currentScopeData

public static ScopeData currentScopeData()

set_pending

public static void set_pending(java.lang.String name)

setGenerator

public static void setGenerator(IDLTreeVisitor generatorObject)

getGenerator

public static IDLTreeVisitor getGenerator()

remove_pending

public static void remove_pending(java.lang.String name)

get_pending

public static java.lang.Object get_pending(java.lang.String name)

decActiveParseThreads

public static void decActiveParseThreads()

incActiveParseThreads

public static void incActiveParseThreads()

activeParseThreads

public static int activeParseThreads()

generateIncluded

public static boolean generateIncluded()

getInhibitionState

public static boolean getInhibitionState()

setInhibitionState

public static void setInhibitionState(boolean flag)

set_included

public static void set_included(boolean i)

getFinalString

public static java.lang.String getFinalString()

setFinalString

public static void setFinalString(java.lang.String finalString)

setGenerateFinalCode

public static void setGenerateFinalCode(boolean isFinal)

pack_replace

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