Grabber with lexical analyzer. It can be use to scan files and find patterns and etc.
cd
to the destination file- Use flex to convert the lex file to c by typing
flex Project.l
. It will create alex.yy.c
file where all your flex patterns are converted to c language. - Use gcc to compile the file by typing
gcc lex.yy.c
. it will create ana.exe
file. You can run it with cmd by typinga
and pressing enter, or in powershell you can type.\a
and press enter to run.
flex Project.l
gcc lex.yy.c
.\a
You can give it a file by just running .\a text.txt
or any text file like html and etc.
or you can just run it with .\a n
so you can enter manualy and see the resualt.
It can recognize any pattern of urls and emails.
Recognizing any formats with 3 spaces in between like +xx xxx xxx xxxx
or +xx-xxx-xxx-xxxx
.
Recognizing Iran landline numbers or anything like 0xxxxxxxxx
or 0xxxxxxxxxx
Only Iran National Code will be recognized.
Anything separated by : / \ -
and has 3 parts of digits will be recognized.
Any standard format of time will be recognized.
Any binary and decimal number will be recognized.
Any pattern starting with #
and having 6 hexa digits will be recognized as Hex Colors.
All IPs can be recognized whether they are ipv4 or ipv6.
Using standard mac address format.
Only Iran Postal code can be recognized.
Can be recognize easily :D
Using standard format like name.extention
.
The program is sensitive to some words.
Identifiers can be x,y,z,n and it uses the standard polynomial format to recognize.
Any kind of fraction it can recognize.
Help me improve the lex analyser :D