Skip to content

lucas-oma/basic-simple-yacc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

basic-simple-yacc



bookExample

A simple calculator as explained in the book Compilers: Principles, Techniques, and Tools by Alfred V. Aho. , Monica S. Lam. , Ravi Sethi. Avaya. using a LEX file.

bookExampleNoLEX

A simple calculator as explained in the book Compilers: Principles, Techniques, and Tools by Alfred V. Aho. , Monica S. Lam. , Ravi Sethi. Avaya. without using a LEX file but declaring yylex() on the auxiliary functions section on the YACC file calc.y

anbn

Recognizes the grammar for the lenguage L = {anbn | n>0}

Note: It is not case sensitive therefore a = A and b = B


advancedCalculator

A simple calculator with more functions or features than the one from bookExample and bookExampleNoLEX

LEX and YACC basic commands

lex myLex.l
yacc myYacc.y
cc y.tab.c -ly -ll

or:

lex myLex.l
yacc myYacc.y
cc lex.yy.c y.tab.c -ly -ll

About

A collection of simple YACC files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages