WhiteHatCyberus / Lex-programs

This is the repo to contain some basic lex programs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a repo for the basic lex programs

Know your files

countwcl.l : counts the the number of words, lines and characters of the given input string
converts.l : Converts a given string from lowercase to UPPERCASE
countvc.l : Counts the vowels and consonants within a string

How to run the lex program?

  1. Install lex into your unix terminal
    sudo apt install flex
    Input the administrator password
  2. For example to run countwcl.l
    lex countwcl.l
    You will notice a file 'lex.yy.c' in your current working directory (Note: To check the working directory, type 'pwd')
  3. This is a c file
  4. Run the c file by
    gcc lex.yy.c
  5. Type './a.out'

Found an error?

Write to me @whcyberus (Sleety George) @Linkedin

About

This is the repo to contain some basic lex programs


Languages

Language:Lex 100.0%