Skip to content

[TODO] Implement complete grammar #56

@amynbe

Description

@amynbe

Tutorial:

Difficulty: Hard, but:

How Important: Very. It's the foundation for:

  • Highlighting,
  • Correct Psi tree, which is needed for:
    • references/usages/symbol indexing
    • syntax errors
    • more complex semantic inspections

After looking into this, I came to the conclusion that the grammar can't be done incrementally. We should come up with a really good grammar from the beginning and then improve the remaining bits, not the other way around. Otherwise it'll get messy, inconsistent, and many cases will be overlooked.

To avoid reinventing the wheel, see the tinku99/ahklexers repo: it contains 3 things: a bnf file and 2 lexers for respectively a python and a php library. I think it's simpler to start by converting the bnf file to GrammarKit syntax, even though it's apparently an old grammar (without objects and arrays).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions