Skip to content

It would be nice to allow textual annotations in the grammar #15

@pvillads

Description

@pvillads

A language of any complexity is not just defined by its syntax, but also its semantics. Currently there is no way to annotate (or describe) the grammar rules in natural language.
Consider a rule defining integer literals:

IntegerLiteral = digit+

It is certainly correct, but the reader needs to know that what the maximum allowed literal is. It would be very nice to be able to generate:

IntegerLiteral = digit+
// Integer literals may not exceed unsigned values in 32 bits.

The text in comments should be provided (just like you can do for the actual grammar rule) in the generated HTML.

I realize that you get away with using the -png option and then merging the generated HTML file with the comments, but it is a hassle to maintain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions