Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002124Core InformTesting commandspublic2020-05-06 09:322020-05-06 17:47
Reporterotistdog 
Assigned To 
PrioritynormalSeveritymildReproducibilityN/A
StatusconfirmedResolutionopen 
Platformx86OSWindowsOS Version7
Product Version6G60 
Target VersionFixed in Version 
Summary0002124: Some uses of parser_trace in generated I6 code not wrapped by ifdef DEBUG
DescriptionIn generated I6 code, there are pieces of code that alter output based on the value of parser_trace which are not wrapped by ifdef DEBUG ... endif.

These may or may not create any kind of problem, but they seem inconsistent with the many other uses of parser_trace in generated code. Below are code snippets with "HERE ---->" inserted at the start of relevant lines.

Place #1 (in "Parser Token Letter C" section of Parser.i6t)
------------------------------------------------------------

            ! Don't assume this is a use of an unset pronoun until the
            ! descriptors have been checked, because it might be an
            ! article (or some such) instead

            for (l=1 : l<=LanguageDescriptors-->0 : l=l+4)
                if (o == LanguageDescriptors-->l) jump AssumeDescriptor;
            pronoun__word = pronoun_word; pronoun__obj = pronoun_obj;
            etype = VAGUE_PE;
HERE ---> if (parser_trace >= 3) print " [Stop: unset pronoun]^";
            return GPR_FAIL;





Place #2 (in section "Adjudicate" of Parser.i6t)
----------------------------------------------------

        if (i < indef_wanted && indef_wanted < INDEF_ALL_WANTED) {
            etype = TOOFEW_PE; multi_wanted = indef_wanted;
HERE ----> if (parser_trace >= 4) print "Too few found^";
            multi_had=i;
            return -1;
        }


Minimal Source Text To Reproduce
Green Field is a room.

[should be seen in any generated I6 auto.inf file]
Additional InformationCategory "Testing commands" selected because this is related to the "trace" debugging command.

I'm marking effect as "Inform 6 reports errors for invalid code," but that is an arbitrary selection in the "mild" category. No error is generated.
TagsNo tags attached.
Effect(mild) Inform 6 reports errors for invalid code
Attached Files

- Relationships

-  Notes
(0004907)
zarf (developer)
2020-05-06 17:47

Confirmed. Both examples are from Parser.i6t. They appear to be trace messages added to the parser after the I6 era.

They cannot cause problems because parser_trace cannot be set non-zero outside of the debug TRACE command. But you're right that, for consistency, they should be #ifdef'd.


- Issue History
Date Modified Username Field Change
2020-05-06 09:32 otistdog New Issue
2020-05-06 17:47 zarf Note Added: 0004907
2020-05-06 17:47 zarf Status new => confirmed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker