Download The LXR Developer`s Manual
Transcript
Project LXR The LXR Developer's Manual Software release 2.0 Language en_UK Document revision 1.0 6 Configuration Wizard Location in the output file is marked with a label generated from the command argument unless this is a pass in an additional session and option R (Remove) is set on the statement. Lines are skipped without interpretation until the next ENDP2 statement. • Unmatched block delimiters (ELSE, ELSEIF, ENDIF, ENDA, ENDC, ENDK, ON, ENDON, ENDP2) and unknown commands give an error message. The support routines are: Routine name parse_statement Arguments Reference to input function Line to parse Comment start Comment end Description Assembles the statement from continuation lines and splits the line into its components: labels, command name, associated variable or option, argument string (i.e. rest of the line after command) Returned value is a list: argument, variable, command, labels in this order. Note there may be no labels. By default, variable is A. interpret_statem Reference to input ent function Interprets an LCL statement and eventually causes a block to be expanded Output file handle The first set of arguments is needed to call expand. Reference to symbol Reference to the current line allows to transform it for insertion into dictionary the output file. Verbose flag The last set of arguments comes from parse_statement and Comment start drives interpretation. pattern Returned value is 1 if the statement has been fully interpreted (and Commend end can be “forgotten” by caller) or undef if the current line should pattern be further processed/ Reference to line LCL argument LCL variable LCL command substitute_marke Reference to line All %name% symbols are replaced by their value from the rs Reference to symbol dictionary dictionary Comment start Comment end An error is issued if name does not exist in the dictionary, unless the line is an U LCL statement in which case the line is left unmodified. The U command (and comment delimiters) are erased if no errors are reported. evaluate_expr Expression string Submits the expression string to eval after some transformations Reference to symbol Subexpressions involving %symbols% should be limited to dictionary comparisons for equality/inequality (eq or ne for string, == or != for numbers). Since the implementation does not strictly enforce this rule, other operators may work but this is not supported. A list of all %symbols% is collected. With it, a sequence of Perl variable definitions is built as my $_symbols = value;. Value is taken from the dictionary. If the symbol is an array, its value is the number of array elements. This sequence is followed by the expression string where every %symbols% is replaced by $_symbols and then passed to eval which checks the expression correctness and computes it, using Perl rules. The function returns the computed value. skip_until Reference to input Skips lines until condition is met 86