Compiler Construction Lab Manual / Counting Vowels and Consonants LEX Program

Program Name

Write a Compiler Construction Program for Counting Vowels and Consonants LEX Program.
Theory
//Vi file.c Hello World
Program Code


Saving: vi voww.l

Compiling and Running
lex voww.l
cc lex.yy.c
./a.out file.c
Input


Output
no of vowels=3 no of constants=7


Home     Back