Git Product home page Git Product logo

melchisedech333 / lex-yacc-experiments Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 290 KB

:wrench: My studies involving context-free grammar analysis. The analyzers were built using familiar tools such as YACC, Lex and Bison. Topics covered include token filtering, simple variable manipulation, and arrays.

License: BSD 3-Clause "New" or "Revised" License

Lex 42.85% Yacc 55.50% Shell 1.65%
lexical-analysis syntactic-analysis semantic-analysis language-development compiler-development parsing bison bison-grammar lex lexical-analyzer

lex-yacc-experiments's Introduction




Language: PT-BR

Here are my codes, studies and experiments in general, which I performed using the tools for context-free grammar analysis. They are lex, yacc and bison.

If my code has helped you, please consider sponsoring me ๐Ÿ’™


๐Ÿ“‘ Table of Contents



๐Ÿ› ๏ธ Instructions

Each directory is equivalent to a specific test. And to compile run the file compile-and-run.sh passing the directory name as a parameter.

./compile-and-run.sh "2 - filter tokens"

After compiling, just run the generated file with the name parsing, and type the input.

./parsing

For this example in question (using the 2 - filter tokens), a valid input could be:

10 20 30 A

For this input, the output will be:

type: INTEGER
token: 10

type: INTEGER
token: 20

type: INTEGER
token: 30

type: UNKNOWN
token: A

It is important to mention that within each directory there is a file called input.txt, which contain one (or more) possible example entries.


๐Ÿ˜ƒ Author

Sponsor: melchisedech333
Twitter: Melchisedech333
LinkedIn: Melchisedech Rex
Blog: melchisedech333.github.io


๐Ÿ“œ License

BSD-3-Clause license



Remember to give me
a beautiful little star ๐Ÿคฉ

lex-yacc-experiments's People

Contributors

melchisedech333 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.