Compiler Design so did the foloowing thing made the lalr parser and did the lex phase it lexer is nothing just a scanner so it takes things tokenize it and passes it to the next phase so what I did just wrote the rules for lexer and grammars for parser i.e. .y after that checked sr and rr confilcts did a very basic part many errors is not accepted like illegal char like $ and others are not accepted and other things int range if excceded cannot be acce[ted next stage is semantics where I thought to do this n.Rules are self explanattttttory if you have done theory of computaion but let me explain whenver the gammar comes it matched if the rules are satisfied and passed it upwards basicaaly bottom up parsing and lex is nothing just a tokenizer and tokens are basically some group of chartacters might be singel character like me joking so yah this all i understand and implemented. TO Run dionwload both in ur computer run in terminal yacc parser.y -d then lex lexer(1).l then gcc lex.yy.c y.tab.c then ./a.out and then give and input and enjou ur output any queries contact at [email protected] or 6002935745.
-
Notifications
You must be signed in to change notification settings - Fork 0
KushAnchalia/wec_211cs134_2
About
Compiler Design
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published