modelix / modelix/modelix.core

Parser for operator precedence reshuffling and parentheses

Open
#10 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
16
Forks
10
Avg merge
3h 9m
Merged PRs (30d)
26

Description

Grammar Cells in MPS use a parser to deconstruct an expression tree into tokens and to rebuild a new tree that has the same textual representation, but respects the operator precedence rules.

In case of parentheses the editor supports inserting text without immediately creating a node for it (it's an annotation, so while it actually is a node it's one that has no semantic meaning yet). It tries to parse the tokens into a valid expression tree until the users inserts a matching pair of parentheses.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Grammar Cells parser responsible for deconstructing expression trees into tokens and rebuilding them with operator precedence. Study how parentheses are represented as non-semantic annotations and how parsing handles an unmatched versus matching pair; done means expressions preserve their textual representation while producing a precedence-correct tree.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.