Skip to content

Syntax parse sensitive to brace mismatches in write and comments #10

@wrayre

Description

@wrayre

Parse errors are generated when there is brace mismatch that occurs within a write statement or a comment.

Example: The following valid Soar production generates a parse error in the editor (but not in Soar 9.6.4) due to the single parentheses within the write string:

sp {monitor*game-over*duplicate-move
         (state <s> ^io.input-link.observation <obs>)
         (<obs> ^black-pegs -1)
         -->
         (write (crlf) |[AGENT] Duplicate move detected... Game over :(    |)
}

A similar issue arises when comments within a rule introduce a parenthesis or brace mismatch:

# Another parse issue
sp {monitor*game-over*duplicate-move
         (state <s> ^io.input-link.observation <obs>)
#                         ^an-old-test-no-longer-needed)
         (<obs> ^black-pegs -1)
         -->
         (write (crlf) |[AGENT] Duplicate move detected... Game over ....   |)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions