- Write a LEX specification files to: >i). Count the number of words in a file and their total size
solution
file solution1.l
ii). Accepts the English language words (without bothering for the meaning) and replaces each occurrence of the string “abc” in it to “ABC”.
solution
file solution2.l
- The following is a listing of a set of verbs: >is am are were was be being been do does did will would should can could has have had go
Write a simple LEX specification to recognize these verb
solution
solution3.c
- Using the Recursive Descent strategy, write a C program for a simple calculator that can be used to perform integer arithmetic involving ‘+’ and ‘*’. Let your program consist of a set of mutually recursive routines.
solution
solution4.c
- Using the following grammar
S -> a S | b
Create an interpreter using LEX and YACC which will count the number of a’s in the input string.
solution
solution5.c
- Write a LEX and YACC specification files for a small calculator that can add and subtract numbers.
solution
solution6.c
contains CFG
solution6b.c