Package eu.bandm.tools.option
Class Compiler.Phase_parser
java.lang.Object
eu.bandm.tools.tdom.runtime.BaseVisitor
eu.bandm.tools.option.absy.Visitor
eu.bandm.tools.option.Compiler.Phase
eu.bandm.tools.option.Compiler.Phase_parser
- All Implemented Interfaces:
PCDataVisitor
- Enclosing class:
- Compiler
Create a parsing method for each option, and two "switch" methods calling these,
one for short and one for long names.
-
Field Summary
Modifier and TypeFieldDescription(package private) int
Running number to generate the name of the field in which to store the value.Accumulator for the statemens in an "if" expression, called on the first appearance of this option on command line.(package private) GeneratedMethod
Accumulator for method to parse the option under visit.(package private) GeneratedMethod
Accumulator for the switch-code for a detected abbrev.(package private) GeneratedMethod
Accumulator for the switch-code for a detected long name.Fields inherited from class eu.bandm.tools.option.Compiler.Phase
abbrev, currentOptionElement, name, option_qualifier
Fields inherited from class eu.bandm.tools.tdom.runtime.BaseVisitor
validating
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add to the growing code the call to a parser for an option with no argument, = of "switch" or "flag" type.protected void
makeparsercall
(String fun) Compile one parse-call statement for one argument type to the global result array.void
translate
(Element_optionlist olist) Entry method, reset registers and descend.void
visit
(Element_bool el) Add to the growing code the call to a parser for an argument of boolean type.void
visit
(Element_enum el) Add to the growing code the call to a parser for an argument of an enumeration type.void
visit
(Element_enumset el) Add to the growing code the call to a parser for an argument of enum set type.void
visit
(Element_float el) Add to the growing code the call to a parser for an argument of float type.void
visit
(Element_int el) Add to the growing code the call to a parser for an argument of integer type.void
visit
(Element_option element) Create a parsing method for the option under visitation.void
visit
(Element_rat el) Add to the growing code the call to a parser for an argument of Rational type.void
visit
(Element_rep el) Add to the growing code the call to the parser of the repeting group.void
visit
(Element_string el) Add to the growing code the call to a parser for an argument of string type.void
visit
(Element_uri el) Add to the growing code the call to a parser for an argument of uri/file name type.Methods inherited from class eu.bandm.tools.option.Compiler.Phase
bothtags, bothtags_formatted, ERROR, longestname, longesttag, shortestname, shortesttag, WARNING, WARNING
Methods inherited from class eu.bandm.tools.option.absy.Visitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
Methods inherited from class eu.bandm.tools.tdom.runtime.BaseVisitor
visit
-
Field Details
-
tl_meth_parse_a
GeneratedMethod tl_meth_parse_aAccumulator for the switch-code for a detected abbrev. -
tl_meth_parse_n
GeneratedMethod tl_meth_parse_nAccumulator for the switch-code for a detected long name. -
parse_meth
GeneratedMethod parse_methAccumulator for method to parse the option under visit. -
block_parse
Accumulator for the statemens in an "if" expression, called on the first appearance of this option on command line. Also used for the compilation of a "repeting group". -
argindex
int argindexRunning number to generate the name of the field in which to store the value.
-
-
Constructor Details
-
Phase_parser
protected Phase_parser()
-
-
Method Details
-
translate
Entry method, reset registers and descend. -
visit
Create a parsing method for the option under visitation.- Overrides:
visit
in classCompiler.Phase
-
makeparsercall
Compile one parse-call statement for one argument type to the global result array. This will be added to the code when the list of types has been visited. -
visit
Add to the growing code the call to a parser for an argument of integer type. -
visit
Add to the growing code the call to a parser for an argument of float type. -
visit
Add to the growing code the call to a parser for an argument of Rational type. -
makeNoArgSwitch
public void makeNoArgSwitch()Add to the growing code the call to a parser for an option with no argument, = of "switch" or "flag" type. -
visit
Add to the growing code the call to a parser for an argument of boolean type. -
visit
Add to the growing code the call to a parser for an argument of string type. -
visit
Add to the growing code the call to a parser for an argument of uri/file name type. -
visit
Add to the growing code the call to a parser for an argument of an enumeration type. -
visit
Add to the growing code the call to a parser for an argument of enum set type. -
visit
Add to the growing code the call to the parser of the repeting group.
-