- Project Overview
- Project Background
- Objectives
- Features
- Technologies
- Getting Started
- Usage
- System Architecture
- Contributing
- License
- Contact
- Acknowledgements
A robust lexical analyzer for C programming language, designed to convert raw source code into meaningful tokens for compiler processing.
A lexical analyzer (lexer) is a crucial component of a compiler that performs the following key functions:
- Scans source code character by character
- Groups characters into predefined token sets
- Prepares tokens for syntax analysis in subsequent compiler stages
The primary goals of this lexical analyzer include:
- Converting abstract character streams into meaningful tokens
- Supporting comprehensive C language syntax parsing
- Providing efficient and accurate token generation
- Implementing robust error handling and debugging mechanisms
- Identifies various C language tokens
- Supports multiple comment styles
- Handles whitespace and special characters
- Supports standard input
- File-based input processing
- Debugging mode capabilities
- Finite state machine implementation
- Character-level analysis
- Line and column tracking
- Programming Language: C
- Parsing Technique: Finite State Machine
- Development Tools:
- GCC Compiler
- Valgrind (for memory debugging)
- Make (build automation)
- Minimum RAM: 2 GB
- Processor: x86_64 architecture
- Disk Space: 100 MB
- GCC Compiler (version 7.0+)
- GNU Make
- Linux/Unix environment (recommended)
- Clone the repository
git clone https://github.com/yourusername/lexical-analyzer.git
cd lexical-analyzer
- Compile the project
make
./lexer input_file.c
./lexer -d input_file.c
- Temporary storage for source code
- Preprocesses input (comment removal)
- Manages file reading efficiently
- Converts character streams to tokens
- Tracks line and column positions
- Supports multiple token types
- Identifiers
- Keywords
- Operators
- Literals
- Special Symbols
[Demo Video] https://www.youtube.com/watch?v=vd4PzbtRP8U
- Fork the repository
- Create your feature branch (git checkout -b feature/AmazingFeature)
- Commit your changes (git commit -m 'Add some AmazingFeature')
- Push to the branch (git push origin feature/AmazingFeature)
- Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Bemnet Mekrebu - bemnetmerkebu17@gmail.com
Project Link: https://github.com/yourusername/lexical-analyzer
- Dr. Tejasvi Parupudi (Project Supervisor)
- CSCE 3600 Class, Spring 2023