A Lex-based lexical analyzer to generate tokens from source code.
Keywords:
"void", "const", "NULL", "for", "do", "while", "break", "continue", "if", "else", "return", "struct", "switch", "case", "default"
Primitive types:
"int", "double", "float", "char"
Library functions:
Names of library functions in here.
Identifiers:
Follow the standard C variable naming rule.
Operators:
"+" ,"-" ,"*" ,"/", "%", "++", "--", "<", "<=", ">", ">=", "==", "!=", "=", "&&", "||", "!", "&", "|"
Punctuation characters:
":", ";", ",", ".", "[", "]", "(", ")", "{", "}"
Integer/Floating point constants:
E.g. 0, -0, 1, 123, 0.0, 0.123, 12.34, -0.0, -0.12
String/Character constants:
E.g. "This is a string", 'a', '\t', '\0'
C Comments:
Both //... and /*.../* are supported.