Skip to content

EBNF formatting #3999

Closed
Closed
@jesse99

Description

@jesse99

I find the EBNF rules in the manual rather hard to read. Here are a few problems:

  • Everything is space separated so there are no visual cues about what belongs with what. This is especially problematic with the * and ? meta-characters.
  • Single quotes are used for literal characters and double quotes for literal strings. There doesn't seem much point in this and using just single quotes would be less visually distracting.
  • It seems odd to use square brackets for grouping.
  • Some typographic conventions would be helpful. Maybe meta characters in bold.

For example compare:
vec_expr : '[' "mut" ? [ expr [ ',' expr ] + ] ? ']'

with:
vec_expr : '[' 'mut'? ( expr ( ',' expr ) + ) ? ']'

(Too many spaces in the above because markdown gets confused with series of asterisks).

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions