Git Product home page Git Product logo

parser-parser's Introduction

About me

I tinker with parsers and compilers, do some web development, and sometimes dabble in gamedev. Currently I'm writing Rust code for ANIXE.

parser-parser's People

Contributors

bellinitte avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar

parser-parser's Issues

The user should be able to see the visualized parse tree

Expected behavior

Any parsed input should be visualized in the form of a (possibly interactable) tree structure. The nodes of the tree should represent the individual production rules.

Current behavior

Currently there is no visualizations of the inputs whatsoever.

Left recursion should be detected and reported as an error

Expected behavior

Every instance of left recursion in production rules should be reported as an error (related indentifiers should be underlined in the editor window).

Current behavior

Currently, any form of left recursion in production rules will cause an infinite loop and overflow the stack, which results in an error in the browser console.

Error marks don't show up on lines other than the first one

Expected behavior

When writing code in the parser editor, any errors reported by the parser should be marked with an underscore regardless of the line number they are on.

Current behavior

The errors are marked only on the first line of the input. Any error past a newline character is discarded.

Possible solution

The core returns the error position as an offset from the beginning of the source string. The CodeMirror editor then interprets this offset as a column number, however the line number is hard-coded to the first line. The core should calculate the position as a line and a column number directly, instead of the naive offset.

User should be able to check the input with the resulting parser

Expected behavior

After creating rhe parser by typing the grammar definition into the parse input, the user should then be able to type into the check input to check if the string is valid within the grammar. For now, the parser should respond with a simple true/false.

Current behavior

No checking functionality is present in either the core or the UI at the time.

Undefined productions should be reported to the user

Expected behavior

Any references to unknown production rules in other production rules should be detected and reported as an error.

Current behavior

It is asserted that every production rule is valid, which is incorrect, so the checker may crash and display an error in the browser console.

The parser cannot process characters with multiple Unicode code points

Expected behavior

The parser should be able to process characters (or rather Unicode graphemes) consisting of multiple Unicode code points.

Current behavior

No errors are being reported when the input contains the code point (the U+0065 "latin small letter e" plus the
U+0301 "combining acute accent").

The user should be able to select the initial production rule

Expected behavior

After typing a valid definition of a grammar, the user should be able to see every production rule in a dropdown menu list and select one of them as the initial production rule in the checking process.

Current behavior

The user currently cannot see the production rules and cannot select an initial production rule.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.