Skip to content

doc: go spec says grammar is "regular", but it is not regular in grammar sense #36037

@adrian-thurston

Description

@adrian-thurston

The doc/go_spec.html file in master, as of this filing (6fcc2d8), states that:

The grammar is compact and regular, allowing for easy analysis by automatic tools such as integrated development environments.

When speaking about grammars, regular has a very particular meaning. It describes a regular language. The go language grammar does not fall in this category.

https://en.wikipedia.org/wiki/Regular_grammar

It would be better to specify the subclass of context-free languages that the go grammar adheres to. I don't know which one it is, but it could be LALR(1), LL(1), etc. This will tell the programmer which tools can be used to generate a parser for go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions