Giter Club home page Giter Club logo

reggie-the-regex-parser's People

Contributors

stevebrun avatar toroidal-code avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

alwayrun

reggie-the-regex-parser's Issues

NFAs should have the ability to be deep-copied.

The current model for the NFAs, States, and Transitions makes deep-copying near impossible/extremely difficult to implement. Another approach should be taken to allow for these deep copies.

Format for transitions in for PDA

Transitions should take a string with names of tokens separated by spaces in the order that they should be popped from the stack. Transitions should also take a function that'll create a token to be pushed to the stack we given the list of popped tokens.

There could be a provided function that'll push nothing to the stack.

Expand functionality to support tokenization

You should be able to specify state transitions with the following data:

  • the state to transition from
  • either:
    • a string to transition over
    • an automata to transition over
  • either:
    • the state to transition to
    • a function that takes the matched string transitioned over and returns:
      • what state to transition to
      • a 'token' value that can hold the data

Using this method, evaluating the automata may be able to return a list of the 'token' values generated during execution.

possible signature of adding a transition:

addTransition(
    start_state, 
    [ transition_string | transition_automata ], 
    [ token_data (*)(matched_string), ]
    destination_state);

possible signature of executing an automata:

struct { list_of_tokens, did_pass, passing_length } execute(automata);

The goal of these modifications is that the framework could in theory be used as a lexer.

Add Symbol data stricture to Collections

Add ability to create symbols from strings to allow for O(1) pointer comparison for symbolized strings.
Back the symbol creation data structure with a trie for O(n) search.

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.