-
-
Save rahul-sani/5958583b13ae4c8164940b3a588dbdb2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DIGIT= [0-9] | |
LETTER= [a-zA-Z] | |
%% | |
[\n] {System.out.println("NL ");} | |
"main" {System.out.println("Keywords ");} | |
"(" {System.out.println("Left paranthesis ");} | |
")" {System.out.println("Right paranthesis ");} | |
"var" {System.out.println("Keywords ");} | |
"{" {System.out.println("Left curly braces ");} | |
"}" {System.out.println("Right curly braces ");} | |
(integer|char|string|float) | |
{System.out.println("Datatypes ");} | |
{LETTER}({LETTER}|{DIGIT}*) | |
{System.out.println("Identifiers ");} | |
"=" {System.out.println("Assignment operator ");} | |
"input()" {System.out.println("Input Function ");} | |
"output()" {System.out.println("Output Function ");} | |
"\""({LETTER}+)"\"" {System.out.println("String ");} | |
"if" {System.out.println("IF ");} | |
" " {System.out.println("WhiteSpace ");} | |
"," {System.out.println("Coma ");} | |
";" {System.out.println("Semicolon ");} | |
(>|<|>=|<+|==|!=|"|"|&&) {System.out.println("Logical Operators ");} | |
("+"|"-"|"*"|"/"|"%") {System.out.println("Operators Arithmetic ");} | |
"then" {System.out.println("THEN ");} | |
"else" {System.out.println("ELSE ");} | |
"++" {System.out.println("Increment Operator ");} | |
"--" {System.out.println("Decrement Operator ");} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment