A Python-based lexical analyzer (scanner) for the C programming language. This scanner identifies and classifies tokens in C code, such as keywords, identifiers, operators, numeric constants, special characters, comments, whitespace, and newlines.
- Keywords: Detects C language keywords like
int,float,if,else, etc. - Identifiers: Recognizes valid variable names and identifiers.
- Operators: Identifies basic C operators (e.g.,
+,-,*,/). - Numeric Constants: Detects both integer and floating-point numbers.
- Special Characters: Recognizes symbols like
;,{,},(,), etc. - Comments: Supports single-line (
//) and multi-line (/* ... */) comments. - Whitespace and Newlines: Identifies spaces, tabs, and newline characters.
- Python 3.x: Ensure Python 3.x is installed on your computer. Download Python
- Clone this repository:
git clone https://github.com/mayarmohamed123/C-language-Scanner.git cd C-language-scanner