Skip to content

Formal grammar (comments) #233

@benjub

Description

@benjub

Comments should not nest, but the corresponding production rule in Appendix E reads:
_COMMENT ::= '$(' (_WHITECHAR+ (PRINTABLE-SEQUENCE - '$)')* _WHITECHAR+ '$)' _WHITECHAR

which allows for instance $( $( $) as a single comment (whereas metamath.c returns an error). A rule forbidding nesting would be:
_COMMENT ::= '$(' (_WHITECHAR+ (PRINTABLE-SEQUENCE - ('$(' | '$)')))* _WHITECHAR+ '$)' _WHITECHAR

That being said, the above fix is in order to conform to metamath.c. I wouldn't be opposed, if it makes the grammar simpler, to modify the program instead.

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