Skip to content
/ rlex Public

rlex - a clear version of the standard UNIX utility lex

License

Notifications You must be signed in to change notification settings

remysys/rlex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rlex: a clear version of the standard UNIX utility lex

rlex is a tool program for generating lexical analyzers (scanners). It supports the lexical rules of the c language

rlex internals

Usage

$ cd src && make && make install
$ rlex 
rlex 0.01 [gcc 4.8.5] [Aug 28 2022]. (c) 2022, ****. all rights reserved.
rlex: file name required

usage is: rlex [options] file
-f  for (f)ast. don't compress tables
-h  suppress (h)eader comment that describes state machine
-l  suppress #(l)ine directives in the output
-t  send output to standard output instead of lex.yy.c
-v  (v)erbose mode, print statistics
-V  more (V)erbose, print internal diagnostics as rlex runs

generate a word count program that, like the utility wc

$ rlex ../test/wc.lex
$ gcc -o wc lex.yy.c -llex
$ ./wc $filename

or run 'make test' to generate the wc test program

$ make test

Releases

No releases published

Packages

No packages published