Git Product home page Git Product logo

lexer-lexer's Introduction

This is a lexer lexer for languages with formal grammar.

It takes in the production rules for a language (formal-grammar languages only) and lexes them (i.e. lexing a lexer.) For now, it only returns errors based on issues with the production rules, and doesn't return a list of all tokens (that functionality is in the works).

Input your production rules in the Language Specifications.txt file and compile main.cpp and LexerLexer.cpp. Run the executable file and the program will analyze your production rules. Syntax for your production rules input must be as follows:

General structure: [1 - Production rules - non-terminal symbols] [2 - Production rules - terminal symbols]

Declaring production rules for non-terminal symbols: [non-terminal symbol] -> [list of non-terminal and terminal symbols] || [option two: list of non-terminal and terminal symbols] || ...

Declaring production rules for terminal symbols: [Terminal Symbol] = "[Terminal, i.e. string identifier of token]"

Output Notes: The program will go through your production rules line-by-line, commenting on which non-terminals and terminals are defined. It will list each line of your production rules and comment on which terminals and non-terminals have not been defined so far, letting you diagnose any problems.

lexer-lexer's People

Contributors

connerdrake98 avatar

Watchers

 avatar

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.