Changes between Version 1 and Version 2 of Ticket #370


Ignore:
Timestamp:
06/08/2025 07:31:15 AM (14 months ago)
Author:
Gary Dixon
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #370 – Description

    v1 v2  
    2828where n is 2 for tokens from lex_string; or 3 for tokens from ssu_$get_tokens or from another parser. 
    2929
    30 The reductions command can then produce a slightly different source when it generates the SEMANTIC_ANALYSIS subroutine which analyzes the incoming tokens.  For VERSION 3, this subroutine will include the lex_descriptor_.incl.pl1 segment only within the scope of that SEMANTIC_ANALYSIS subroutine.  The other part of the XXX.rd source program can have its own declaration of the token structure (via use of an %include ssu_token; macro) to reference the tokens provided by ssu_$get_tokens subroutine.  Its syntax and semantic routines can then access the extra elements describing the new style of token generated by ssu_$get_tokens.
     30The reductions command can then produce a slightly different source when it generates the SEMANTIC_ANALYSIS subroutine which analyzes the incoming tokens.  For VERSION 3, this subroutine will include the lex_descriptor_.incl.pl1 segment visible only within the scope of that SEMANTIC_ANALYSIS subroutine.  The other part of the XXX.rd source program can have its own declaration of the token structure (via use of an %include ssu_token; macro) to reference the tokens provided by ssu_$get_tokens subroutine.  Its syntax and semantic routines can then access the extra elements describing the new style of token generated by ssu_$get_tokens.
    3131
    3232
     
    5050Unfortunately, this extra comment at the top of the XXX.pl1 source means that any problems found by the pl1 compiler in the XXX.rd lines that follow that comment are reported with a line number that does not match position of the offending source line in the XXX.rd segment submitted to the reductions command.  The shift in line numbers within pl1 error statements can be avoided by adding a feature to the reductions command.
    5151
    52 C.  If the XXX.rd segment containing reduction statements begins with 10 blank lines (10 consecutive newline (NL) characters), then the reductions command can replace those 10 blank lines with its PL/I comment documenting reductions version, date/time of translation, etc.  Then line numbers will be the same in both XXX.rd and XXX.pl1 segments.
     52C.  If the XXX.rd segment containing reduction statements begins with 10 blank lines (10 consecutive newline (NL) characters), then the reductions command can replace those 10 blank lines with its PL/I comment documenting reductions version, date/time of translation, etc.  Then line numbers will be the same in both XXX.rd (original source) and the XXX.pl1 (derived source) segments.
    5353
    5454
    55 An ambiguity exists in control arguments accepted by the reductions command.  Its existing -trace {on|off} control argument adds a trace facility to the generated language analyzer, with tracing either turned on by default, or turned off by default.  But since the reductions command uses reduction statements to analyze each input reduction statement in the XXX.rd source program, there may be a need to turn on/off that tracing feature in the executing reductions program.
     55An ambiguity exists in control arguments accepted by the reductions command.  Its existing -trace {on|off} control argument adds a trace facility to the generated language analyzer, with tracing either turned on by default, or turned off by default.  But since the reductions command uses its own reduction statements to analyze each input reduction statement in the XXX.rd source program, there may be a need to turn on/off that tracing feature in the executing reductions program.
    5656
    5757D.  Add new -tracing and -no_tracing control arguments to the reductions command to control tracing of reductions in the reductions compiler while it is executing.  The existing -trace {on|off} can be used to specify whether to add a similar tracing facility to the generated analyzer program.