Skip to content

ahmadrezadev/LexicalAnalyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LexicalAnalyzer

This is a simple lexical analyzer for the C language. The repository contains an example program in C# for testing.

What is the Lexical analysis? Lexical analysis is the first phase of a compiler. It takes the modified source code from language preprocessors that are written in the form of sentences. The lexical analyzer breaks these syntaxes into a series of tokens, by removing any whitespace or comments in the source code. If the lexical analyzer finds a token invalid, it generates an error. The lexical analyzer works closely with the syntax analyzer. It reads character streams from the source code, checks for legal tokens, and passes the data to the syntax analyzer when it demands.

این یک تحلیل گر واژگان ساده برای زبان C است. مخزن شامل یک نمونه برنامه در C # برای آزمایش است.

تحلیلگر واژگانی چیست؟ تحلیل‌گر واژگانی، یا اسکنر فاز اول کامپایل کردن یک برنامه است. گرامر مورد استفاده در این بخش گرامر منظم است. در این مرحله برنامهٔ ورودی کاراکتر به کاراکتر خوانده شده و توکن بندی می‌شود. این توکن‌ها در جدول نمادها به شکل خاصی ذخیره می‌شوند تا در مراحل بعدی مورد استفاده قرار گیرند

Releases

No releases published

Packages

No packages published

Languages