Implementing a Multilingual Lexical Analyser for Java, C and C++

Lexical analyzers are important components of compilers and interpreters for coding languages such as C, Java, and C++. It acts as the first stage of the compiler, transforming the source code into a sequence of tokens. Such tokens, the smallest relevant parts of the program, are then applied to the phases of compiling. The C, C++ and Java lexical analyzer handles language-specific structures like identifiers, keywords, operators, and literals. The variations in syntax and semantics can be observed among these languages but the main conceptions in lexical analysis remain the same. This paper presents the implementation and design of a lexical analyzer for C, C++, and Java. When given a file containing code in any of these languages, the system analyzes the file’s content and classifies all the tokens into a category of identifiers, keywords, strings, numbers, symbols, operators, etc., and stores the token and token category in a symbol table and displays the table as the output and gives an error message if there are any syntax errors in the file.

Authors

Institutions

Publication Details

Published
2024-10-04
DOI
https://doi.org/10.1109/gcat62922.2024.10923959
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Implementing a Multilingual Lexical Analyser for Java, C and C++

Niharika Panda, S. Muthukumar, Nagasarapu Sarayu Krishna, Bhavika Gandham et al.
Software Engineering Research
article

Implementing a Multilingual Lexical Analyser for Java, C and C++

Niharika Panda, S. Muthukumar, Nagasarapu Sarayu Krishna, Bhavika Gandham, Trisha Vijayekkumaran
article en

Abstract

Lexical analyzers are important components of compilers and interpreters for coding languages such as C, Java, and C++. It acts as the first stage of the compiler, transforming the source code into a sequence of tokens. Such tokens, the smallest relevant parts of the program, are then applied to the phases of compiling. The C, C++ and Java lexical analyzer handles language-specific structures like identifiers, keywords, operators, and literals. The variations in syntax and semantics can be observed among these languages but the main conceptions in lexical analysis remain the same. This paper presents the implementation and design of a lexical analyzer for C, C++, and Java. When given a file containing code in any of these languages, the system analyzes the file’s content and classifies all the tokens into a category of identifiers, keywords, strings, numbers, symbols, operators, etc., and stores the token and token category in a symbol table and displays the table as the output and gives an error message if there are any syntax errors in the file.

Amrita Vishwa Vidyapeetham (IN)
Quality Education
Openalex Percentile: Top 55%
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Implementing a Multilingual Lexical Analyser for Java, C and C++ — Niharika Panda, S. Muthukumar, et al. · (2024) | TGRS Research Map | TGRS