Skip to content

Conversation

@zedlopez
Copy link
Contributor

I just created improvement request I7-2613 for this PR to refer to.

This adds comments to Parser.i6t identifying the command parser error / parser error internal rule responses to which the *_PE constants correspond, e.g.,

Constant STUCK_PE         = 1;   ! didn't understand error (A)
Constant UPTO_PE          = 2;   ! only understood as far as error (B) / (C)
Constant NUMBER_PE        = 3;   ! didn't understand that number error (D)
Constant ANIMA_PE         = 4;   ! can only do that to something animate error (M)
Constant CANTSEE_PE       = 5;   ! can't see any such thing error (E)
Constant TOOLIT_PE        = 6;   ! [vestigial] said too little error (F)

and, in the Standard Rules, cross-references between command parser errors and parser error internal rule responses:

A command parser error is a kind of value. The command parser errors are
        didn't understand error, [ A ]
        only understood as far as error, [ B, C ]
        didn't understand that number error, [ D ]
        can only do that to something animate error, [ M ]
        can't see any such thing error, [ E ]
        said too little error, [ F, vestigial ]
The parser error internal rule is defined by Inter as
        "PARSER_ERROR_INTERNAL_R" with
        [ didn't understand error ]
        "I didn't understand that sentence." (A),
        [ only understood as far as error ]
                "I only understood you as far as wanting to " (B),
                "I only understood you as far as wanting to (go) " (C),
        [ didn't understand that number error ]
        "I didn't understand that number." (D),
        [ can't see any such thing error ]
        "[We] [can't] see any such thing." (E),
        [ said too little error (vestigial) ]
        "You seem to have said too little!" (F),

As shown, it labels the errors / messages that are now vestigial; it further comments out testing for these vestigial errors in Parser.i6t, e.g.,

    ! if (etype == EXCEPT_PE) {   PARSER_ERROR_INTERNAL_RM('L'); new_line; } ! vestigial
    if (etype == ANIMA_PE) {    PARSER_ERROR_INTERNAL_RM('M'); new_line; }
    if (etype == VERB_PE) {     PARSER_ERROR_INTERNAL_RM('N'); new_line; }
    ! if (etype == SCENERY_PE) {  PARSER_ERROR_INTERNAL_RM('O'); new_line; } ! vestigial
    ! if (etype == JUNKAFTER_PE) {  PARSER_ERROR_INTERNAL_RM('P'); new_line; } ! vestigial

These are the only changes in the PR outside of code comments.

Arguably, it'd be an improvement to elide the vestiges altogether. That would result in different numeric values for most of the *_PE constants and skipping letters in the rule responses (or re-lettering them, I would guess that skipping would be preferable). I erred on the side of conservatism here and just labeled them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant