|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.common.Msg
public abstract class Msg
This provides the basis for messages issued by the Scale compiler.
$Id: Msg.java,v 1.41 2007-10-04 19:53:36 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
Additional classes should be derived from this class for each
natural language that is supported. These additional classes will
contain the text for each message in the particular natural
language. The derived classes must be named using "Msg" catenated
with the string returned by the
java.util.Locale.getDisplayLanguage()
method.
The messages are specified by an integer. A message may contain
the string %s
. This string will be replaced by any
additional text supplied when the message is displayed.
Additional message should be added to the end and given the next higher number. If a particular derived class is not updated, the text "??" will be displayed.
If a message is no longer in use, replace it's text by "unused nn" and replace the field name by MSG_unused_nn where nn is the value of the field. There fields can then be re-used.
All messages are displayed to stderr
. There is an
example of reporting a warning in the code for this class.
Constructor Summary | |
---|---|
protected |
Msg()
|
Method Summary | |
---|---|
protected abstract java.lang.String |
getErrorString()
|
static java.lang.String |
getHelpMessage(int msgIndex)
|
protected abstract java.lang.String[] |
getHelpMessages()
|
protected abstract java.lang.String |
getInfoString()
|
static java.lang.String |
getMessage(int msgIndex)
|
protected abstract java.lang.String[] |
getMessages()
|
protected abstract java.lang.String |
getWarningString()
|
static void |
ignoreWarning(int errno)
Specify to ignore a specific warning. |
static void |
ignoreWarning(int first,
int last)
Specify a range of warnings to ignore. |
static java.lang.String |
insertText(int errno,
java.lang.String text)
Return the specified string with the first occurrence of %s replaced by the specified text. |
static java.lang.String |
insertText(int errno,
java.lang.String text1,
java.lang.String text2)
Return the specified string with the first and second occurrences of %s replaced by the specified text. |
static java.lang.String |
insertText(java.lang.String str,
java.lang.String text)
Return the specified string with the first occurrence of %s replaced by the specified text. |
static java.lang.String |
insertText(java.lang.String str,
java.lang.String text1,
java.lang.String text2)
Return the specified string with the first and second occurrences of %s replaced by the specified text. |
static void |
reportError(int errno,
java.lang.String text)
Report the error message for the file at the line and column specified. |
static void |
reportError(int errno,
java.lang.String filename,
int lineno,
int column,
java.lang.String text)
Report the error message for the file at the line and column specified. |
static void |
reportError(int errno,
java.lang.String filename,
int lineno,
int column,
java.lang.String text1,
java.lang.String text2)
Report the error message for the file at the line and column specified. |
static void |
reportInfo(int errno,
java.lang.String text)
Report the informational message for the file at the line and column specified. |
static void |
reportInfo(int errno,
java.lang.String filename,
int lineno,
int column,
java.lang.String text)
Report the informational message for the file at the line and column specified. |
static void |
reportInfo(int errno,
java.lang.String filename,
int lineno,
int column,
java.lang.String text1,
java.lang.String text2)
Report the informational message for the file at the line and column specified. |
static void |
reportWarning(int errno,
java.lang.String text)
Report the warning message for the file at the line and column specified. |
static void |
reportWarning(int errno,
java.lang.String filename,
int lineno,
int column,
java.lang.String text)
Report the warning message for the file at the line and column specified. |
static void |
reportWarning(int errno,
java.lang.String filename,
int lineno,
int column,
java.lang.String text1,
java.lang.String text2)
Report the warning message for the file at the line and column specified. |
static void |
setup(java.lang.String language)
Initialize the message system before it is used. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MSG_alignof_is_non_standard
public static final int MSG_Array_of_functions_is_not_allowed
public static final int MSG_Assignment_of_integer_to_pointer_without_a_cast
public static final int MSG_Broken_pipe_s
public static final int MSG_Configuration_file_s_not_found
public static final int MSG_Deprecated_s
public static final int MSG_Dereference_of_non_address
public static final int MSG_Enum_s_already_defined
public static final int MSG_Error_loading_flag_file_s
public static final int MSG_Errors_in_compilation
public static final int MSG_Field_s_already_defined
public static final int MSG_Field_s_not_found
public static final int MSG_Function_s_definition_does_not_match_prototype
public static final int MSG_Function_s_is_already_defined
public static final int MSG_Ignored_s
public static final int MSG_Improper_call_to_s
public static final int MSG_Improper_comment_termination
public static final int MSG_Improper_string_termination
public static final int MSG_Invalid_initializer
public static final int MSG_Invalid_procedure_type
public static final int MSG_Incompatible_function_argument_for_s
public static final int MSG_Incorrect_type_specification
public static final int MSG_Invalid_dimension
public static final int MSG_Invalid_expression
public static final int MSG_Invalid_function_call
public static final int MSG_Invalid_lvalue
public static final int MSG_Invalid_or_missing_type
public static final int MSG_Invalid_parameter_s
public static final int MSG_Invalid_storage_class
public static final int MSG_Invalid_subscript_expression
public static final int MSG_Invalid_type
public static final int MSG_Junk_after_directive
public static final int MSG_K_R_function_definition_s
public static final int MSG_Label_s_defined_twice
public static final int MSG_Language_s_not_supported_using_default
public static final int MSG_Machine_s_not_found
public static final int MSG_Macro_redefined_s
public static final int MSG_Missing_return_statement_s
public static final int MSG_More_than_one_source_file_specified
public static final int MSG_No_source_file_specified
public static final int MSG_Not_a_constant
public static final int MSG_Not_a_struct
public static final int MSG_Not_a_type_s
public static final int MSG_Not_defined_s
public static final int MSG_Not_implemented_s
public static final int MSG_Operands_to_s_not_compatible
public static final int MSG_Operands_to_s_not_integer_types
public static final int MSG_Parameter_s_already_defined
public static final int MSG_Profile_CFG_characteristic_value_differs_for_s
public static final int MSG_Routine_s_can_not_be_optimized
public static final int MSG_s
public static final int MSG_Scale_compiler_version_s
public static final int MSG_s_contains_gotos
public static final int MSG_s_ignored
public static final int MSG_Storage_class_specified_twice
public static final int MSG_Symbol_s_already_defined
public static final int MSG_There_were_s_classes_read
public static final int MSG_Too_many_subscripts
public static final int MSG_unused_58
public static final int MSG_Type_s_is_already_defined
public static final int MSG_Unable_to_open_window_s
public static final int MSG_Unable_to_send_to_s
public static final int MSG_Unknown_conversion
public static final int MSG_Unrecognized_declaration_attribute_s
public static final int MSG_Unrecognized_type_attribute_s
public static final int MSG_Unrecognized_visulaizer_response_s
public static final int MSG_Variable_s_already_defined
public static final int MSG_Debug_level_is_s
public static final int MSG_Stat_level_is_s
public static final int MSG_Node_report_level_is_s
public static final int MSG_Note_report_level_is_s
public static final int MSG_Report_name_is_s
public static final int MSG_Invalid_CFG_before_optimization_s
public static final int MSG_Conflicting_parameters_choose_one_of_s
public static final int MSG_SH_can_not_be_selected_with_0_categories
public static final int MSG_Optimization_s_not_performed_for_s
public static final int MSG_Separate_compilation
public static final int MSG_Multi_compilation
public static final int MSG_Target_architecture_s
public static final int MSG_Host_architecture_s
public static final int MSG_User_specified_annotations_added
public static final int MSG_Inlining_level_s
public static final int MSG_No_builtins
public static final int MSG_Assume_dummy_aliases
public static final int MSG_Unsafe_optimizations_allowed
public static final int MSG_Floating_point_reordering_allowed
public static final int MSG_Signed_integer_overflows_might_not_wrap
public static final int MSG_All_integer_overflows_might_not_wrap
public static final int MSG_Data_dependence_testing_s
public static final int MSG_Hyperblock_policy_backend
public static final int MSG_unused_90
public static final int MSG_unused_91
public static final int MSG_Optimizations_s
public static final int MSG_Unknown_optimization_s
public static final int MSG_Loop_unrolling_factor_s
public static final int MSG_Performing_s
public static final int MSG_No_alias_analysis
public static final int MSG_Simple_intra_procedural_alias_analysis
public static final int MSG_Steensgard_intra_procedural_alias_analyses
public static final int MSG_Shapiro_intra_procedural_alias_analyses
public static final int MSG_Simple_inter_procedural_alias_analysis
public static final int MSG_Steensgard_inter_procedural_alias_analysis
public static final int MSG_Shapiro_inter_procedural_alias_analysis
public static final int MSG_Parameter_s_requires_a_value
public static final int MSG_Required_parameter_s_not_specified
public static final int MSG_Usage_java_s
public static final int MSG_Default_is
public static final int MSG_s_returned_status_s
public static final int MSG_Include_file_s_not_found
public static final int MSG_Endif_without_if
public static final int MSG_Too_many_closing_parens
public static final int MSG_Too_few_closing_parens
public static final int MSG_Not_an_integer_constant
public static final int MSG_Not_a_macro_call
public static final int MSG_Too_many_macro_arguments
public static final int MSG_Too_few_macro_arguments
public static final int MSG_Invalid_macro_definition
public static final int MSG_Pre_defined_macros_can_not_be_redefined
public static final int MSG_Pre_defined_macros_can_not_be_undefined
public static final int MSG_Unknown_file_extension_s
public static final int MSG_Failed_to_compile_s
public static final int MSG_Failed_to_generate_IL_file_for_multiple_files
public static final int MSG_Failed_to_generate_IL_file_for_s
public static final int MSG_Source_file_not_found_s
public static final int MSG_Unknown_file_type_s
public static final int MSG_Using_profiling_information
public static final int MSG_Invalid_statement
public static final int MSG_Expecting_s_found_s
public static final int MSG_Too_many_initializers
public static final int MSG_Generating_s
public static final int MSG_Assembling_s
public static final int MSG_Clef
public static final int MSG_Scribble_s
public static final int MSG_Optimizing_s
public static final int MSG_Converting_multiple_files_to_Scribble
public static final int MSG_Converting_to_Scribble_s
public static final int MSG_Start
public static final int MSG_End
public static final int MSG_Use_Profile_Info_Start
public static final int MSG_Use_Profile_Info_End
public static final int MSG_Inlining_Start
public static final int MSG_Inlining_End
public static final int MSG_Alias_Analysis_Start
public static final int MSG_Alias_Analysis_End
public static final int MSG_Main_already_defined_in_s
public static final int MSG_s_is_not_a_variable
public static final int MSG_s_is_not_an_integer_variable
public static final int MSG_Invalid_goto_statement
public static final int MSG_Invalid_statement_label
public static final int MSG_Unit_not_specified
public static final int MSG_Not_an_integer_value
public static final int MSG_Not_a_scalar_value
public static final int MSG_Not_a_CHARACTER_value
public static final int MSG_Not_a_LOGICAL_value
public static final int MSG_Missing_END_statement
public static final int MSG_Improper_continuation_statement
public static final int MSG_Concatenation_of_unknown_length_not_allowed
public static final int MSG_Call_does_not_match_routine_definition
public static final int MSG_Unknown_intrinsic_function_s
public static final int MSG_Invalid_KIND_selector
public static final int MSG_Invalid_FORMAT_specifier
public static final int MSG_Invalid_CFG_after_optimization_s
public static final int MSG_Elapsed_time_s
public static final int MSG_Parser_s_not_found
public static final int MSG_The_shapes_of_the_array_expressions_do_not_conform
public static final int MSG_Use_of_Os_with_g_is_not_recommended
public static final int MSG_Pragma_not_processed_s
public static final int MSG_Invalid_type_operand_to_s
public static final int MSG_Unable_to_instruction_schedule_s
public static final int MSG_Suspended_press_enter
public static final int MSG_Invalid_profile_data_s
public static final int HLP_none
public static final int HLP_G
public static final int HLP_daVinci
public static final int HLP_unused_3
public static final int HLP_d
public static final int HLP_dd
public static final int HLP_files
public static final int HLP_I
public static final int HLP_Is
public static final int HLP_A
public static final int HLP_D
public static final int HLP_U
public static final int HLP_t
public static final int HLP_f
public static final int HLP_inl
public static final int HLP_inls
public static final int HLP_unused_16
public static final int HLP_pi
public static final int HLP_pp
public static final int HLP_cmi
public static final int HLP_M
public static final int HLP_unused_21
public static final int HLP_cat
public static final int HLP_stat
public static final int HLP_cdd
public static final int HLP_san
public static final int HLP_E
public static final int HLP_L
public static final int HLP_o
public static final int HLP_S
public static final int HLP_oa
public static final int HLP_oc
public static final int HLP_ccb
public static final int HLP_cca
public static final int HLP_cgb
public static final int HLP_cga
public static final int HLP_dcg
public static final int HLP_c89
public static final int HLP_c99
public static final int HLP_gcc
public static final int HLP_ckr
public static final int HLP_ansi
public static final int HLP_unsafe
public static final int HLP_scb
public static final int HLP_sca
public static final int HLP_sgb
public static final int HLP_sga
public static final int HLP_version
public static final int HLP_snap
public static final int HLP_gdb
public static final int HLP_naln
public static final int HLP_is
public static final int HLP_bi
public static final int HLP_ph
public static final int HLP_unused_54
public static final int HLP_np
public static final int HLP_quiet
public static final int HLP_hda
public static final int HLP_fpr
public static final int HLP_hb
public static final int HLP_wrap
public static final int HLP_arch
public static final int HLP_cc
public static final int HLP_asm
public static final int HLP_unused_64
public static final int HLP_unused_65
public static final int HLP_dir
public static final int HLP_r
public static final int HLP_for
public static final int HLP_ff
public static final int HLP_pg
public static final int HLP_AA
public static final int HLP_O
public static final int HLP_help
public static final int HLP_vcc
public static final int HLP_ccc
public static final int HLP_unused_76
public static final int HLP_occ
public static final int HLP_Occ
public static final int HLP_phelp
public static final int HLP_w
public static final int HLP_vcg
public static final int HLP_icf
public static final int HLP_sc
public static final int HLP_sf
public static final int HLP_dm
public static final int HLP_ih
public static final int HLP_phb
public static final int HLP_nw
public static final int HLP_suspend
public static boolean ignoreAllWarnings
true
, do not print warning messages.
public static boolean reportInfo
true
, print informational messages.
Constructor Detail |
---|
protected Msg()
Method Detail |
---|
protected abstract java.lang.String[] getMessages()
protected abstract java.lang.String[] getHelpMessages()
protected abstract java.lang.String getErrorString()
protected abstract java.lang.String getWarningString()
protected abstract java.lang.String getInfoString()
public static final java.lang.String getMessage(int msgIndex)
public static final java.lang.String getHelpMessage(int msgIndex)
public static java.lang.String insertText(java.lang.String str, java.lang.String text)
%s
replaced by the specified text.
public static java.lang.String insertText(java.lang.String str, java.lang.String text1, java.lang.String text2)
%s
replaced by the specified text.
public static java.lang.String insertText(int errno, java.lang.String text)
%s
replaced by the specified text.
public static java.lang.String insertText(int errno, java.lang.String text1, java.lang.String text2)
%s
replaced by the specified text.
public static void setup(java.lang.String language)
language
- is the language to use or null
for
the default for this localepublic static void reportError(int errno, java.lang.String filename, int lineno, int column, java.lang.String text1, java.lang.String text2)
errno
- specifies the error messagefilename
- is the filename for the message and may be
null
lineno
- is the line number if greater than 0column
- is the column number if greater than 0text1
- is text to insert into the message and may be
null
text2
- is text to insert into the message and may be
null
public static void reportError(int errno, java.lang.String filename, int lineno, int column, java.lang.String text)
errno
- specifies the error messagefilename
- is the filename for the message and may be
null
lineno
- is the line number if greater than 0column
- is the column number if greater than 0text
- is text to insert into the message and may be
null
public static void reportError(int errno, java.lang.String text)
errno
- specifies the error messagetext
- is text to insert into the message and may be
null
public static void reportWarning(int errno, java.lang.String filename, int lineno, int column, java.lang.String text)
errno
- specifies the warning messagefilename
- is the filename for the message and may be
null
lineno
- is the line number if greater than 0column
- is the column number if greater than 0text
- is text to insert into the message and may be
null
public static void reportWarning(int errno, java.lang.String text)
errno
- specifies the warning messagetext
- is text to insert into the message and may be
null
public static void reportWarning(int errno, java.lang.String filename, int lineno, int column, java.lang.String text1, java.lang.String text2)
errno
- specifies the warning messagefilename
- is the filename for the message and may be
null
lineno
- is the line number if greater than 0column
- is the column number if greater than 0text1
- is text to insert into the message and may be
null
text2
- is text to insert into the message and may be
null
public static void reportInfo(int errno, java.lang.String filename, int lineno, int column, java.lang.String text)
errno
- specifies the informational messagefilename
- is the filename for the message and may be
null
lineno
- is the line number if greater than 0column
- is the column number if greater than 0text
- is text to insert into the message and may be
null
public static void reportInfo(int errno, java.lang.String text)
errno
- specifies the informational messagetext
- is text to insert into the message and may be
null
public static void reportInfo(int errno, java.lang.String filename, int lineno, int column, java.lang.String text1, java.lang.String text2)
errno
- specifies the informational messagefilename
- is the filename for the message and may be
null
lineno
- is the line number if greater than 0column
- is the column number if greater than 0text1
- is text to insert into the message and may be
null
text2
- is text to insert into the message and may be
null
public static void ignoreWarning(int errno)
public static void ignoreWarning(int first, int last)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |