SlideShare a Scribd company logo
1 of 5
Download to read offline
IOSR Journal of Computer Engineering (IOSR-JCE)
e-ISSN: 2278-0661, p- ISSN: 2278-8727Volume 10, Issue 6 (May. - Jun. 2013), PP 30-34
www.iosrjournals.org
www.iosrjournals.org 30 | Page
Lexical and Parser tool for CBOOP program
Tanuj Tyagi1
, Akhil Saxena2
, Sunil Nishad3
,Babita Tiwari4
Computer Science and Engineering Department,
Jaypee University Of Engineering And Technology (JUET)
A.B. Road,P.B No. 1, Raghogarh,Dist-Guna-473226(M.P)
Abstract: This paper addresses an approach to build lexical and parser tool for Component Based Object
Oriented Program (CBOOP). In this Paper,Lexical analysis tool use for the scanning of CBOOP program.
Lexical tool reads the input characters of the source program and return the tokens. Parser will generate the
syntax tree of CBOOP program and check the syntax of program. The driver program, i.e., main program will
open the file containing CBOOP program according to input.
Keywords:CBOOP,Lexical Analyzer, Tokens, Parser, Driver program
I. Introduction
The latest programming paradigm in software engineering field is Component Based Object Oriented
Programming. This paradigm has advantage of reusability over previous paradigm like object oriented
programming. It also has advantage of high granularity and lower modular interdependence. It also ensures that
true inheritance does not violate encapsulation as it was in case of object oriented programming. The future of
software engineering lies in this programming paradigm [5].
To use any software for any novice user there is need of executable form of that software. For this
purpose there arises the need a compiler. Lexical analyzer and parser isfrontend of compiler. These stages of
compiler build syntactic structure of any software. These stages play important role in building executable form.
This paper aims at provide an approachto achieving these stages on Component Based Object Oriented
Program.
It uses previous approaches of parsing and lexical analysis and applies and modifies it accordingly to
parse the Component Based Object Oriented program. It provides with an approach that allow parsing and
lexical analyzer of Component Based Object Oriented Programming.
Lexical Analyzer reads the source program character by character, breaking the source program into a
sequence of tokens. The various tokens are keywords,identifiers, operators, constants and punctuation symbols
such as comma and parenthesis. Each token is a collection of character with well-defined meaning of the source
program that is to be treated as a single unit. The Lexical analyzer analyses successive character in the source
program starting from the first character not yet grouped into a token. In order to determine the next token,
many characters may be searched beyond the next token. These tokens are sent to the parser for syntax analysis
[7].
Consider the following expression in C++:
result=(a+b)*2;
When this expression is input to the lexical analyzer, following tokens are generated:
Token Type of Token
Result Identifier
= Assignment Operator
( Punctuator
A Identifier
+ Addition Operator
B Identifier
) Punctuator
C Identifier
++ Increment Operator
5 Integer Literal
; Punctuator
Table 1
The parser uses the tokens from lexical analyzer and generates the syntax tree.In this paper, bottom-up parser is
used which works on context free grammar.Parser takes input line by line and checks syntax of that statement.It
takes input and compares it with context free grammar and check whether input is correct or not. Top-down
Lexical and Parser tool for CBOOP program
www.iosrjournals.org 31 | Page
parser is not used because it is less efficient than bottom-up parser. Bottom-up parser uses right-most derivation
in reverse order [2][4].
For the above expression, i.e., result=(a+b)*2; parser generates the following parse tree:
Fig. 1
cin>>a>>b;
Fig. 2 State diagram of input operation
Fig. 2 is the state diagram of input operation. It checks that input operation is syntactically correct or not. When
cin is applied on the initial state q0, state changes from q0to q1. Then, if extraction operator>>comes the state
changes to q2. Further, identifier changes the state to q3. The extraction operator changes the state back to q2,
this terminal at q3 state is used when more than one variable are to be declared. Finally, semi-colon (;) changes
the state to the final state qf.
II. Working OfCboop
First of all, the driver program opens component program on basis of input user enters. For example, if
user entersinput as 5!.Then the driver program opens factorial component. If user enters a quadratic equation it
opens quadratic component. The sole purpose of driver program is to open component program. The driver
program is like “My Computer” icon in our desktop. From “My Computer” icon various drives can be opened
that are present in the system. It doesn’t solely perform any function or stores any data. Similarly is the driver
program which just opens component program.Next, the driver program then performs lexical analysis on
opened component and then parser analysis on the opened component.Now, since Component Based Object
Oriented Program is collection of interdependent program. So, one component can depend on other component.
So if driver program opens component that is dependent on other component then driver program first of all
opens component that will be needed by input component. It then performs lexical analysis and parser on last in
first out manner. Lexical analysis is performed on each component only once. On other hand, the parser
performs syntax analyzer on component each time it is needed [6].
Fig. 3
Lexical and Parser tool for CBOOP program
www.iosrjournals.org 32 | Page
Fig. 3 shows Component Based Object Oriented Program for mathematical calculator.If driver program opens
exponential series component, then driver program checks which component will be needed by exponential
series component. It finds out that it will need factorial, summation and division components. The driver
program performs lexical analysis on each component, i.e., factorial, power, division,summation and
exponential series component. Then parser analyzer performs the parsing on each component program opened.
In Fig. 3, exponential series component is used to compute exponential series which is of the form:
𝑒 𝑥
= 1 +
𝑥
1!
+
𝑥2
2!
+
𝑥3
3!
+ ⋯ , −∞ < 𝑥 < ∞
First of all driver program passes input 1 to factorial component, and then it passes 2 to factorial component and
so on. So parsing is performed on factorial component with input as 1, 2 and so on. Then driver program opens
power component and passes input as x and power to x. Then driver program opens division component passes
output of power component and factorial component as input. Then driver program opens summation series
component and passes output of division component. In this exponential series is evaluated [6].
III. Pseudo Code For Driver Program, Lexical And Parser
This section represents the pseudo code of driver program, lexical and parser.
In driver program, first of all it takes input from user. This input act as “key” which tells driver program which
component to open. The driver program scans input from left to right character by character. It compares
character read with cpgm which has list of all components. It then opens the desired component.
Next, the driver program performs lexical analyzer on this component by applying lexical analyzer pseudo code
on it. Then it performs parser on component opened by applying parser pseudo code on it. It then applies this
procedure in iterative manner.
Scan input Procedure driver_pgm(input,cpgm)
Begin
while(input)
{
from left to right character by character
Compare input with cpgm
then
Open component on input read
Perform lexical analyzer on component opened
Perform parsing on component open
Remove the character read from input
}
In lexical analyzer, component is read character by character. Next, lexical analyzer collects character into
logical groupings called lexemes. First of all, lexical analyzer checks first character of lexeme. If it is character
then it can be reserved word or identifiers. Then, lexical analyzer it with predefined reserved words then lexeme
is reserved words otherwise it is identifier. If first character of lexeme is digit then it can be either integer literal
or floating literal. If first character is neither digit nor character, it compares lexeme with predefined set of
operators. This procedure is applied on each character of component.
Procedure lexical_analyzer
{
Read a character
switch(char)
{
case LETTER:
stoken[i]:=char
Read a character
while(char==LETTER|| char==DIGIT)
{
stoken[i]:=char
Read a character
}
ifstoken is reserved word
then
return reserved word
Lexical and Parser tool for CBOOP program
www.iosrjournals.org 33 | Page
else
return identifier
break
case DIGIT:
stoken[i]:=char
Read a character
while(char==DIGIT)
{
stoken[i]:=char
Read a character
}
return literal
break
}
}
In parser, first of all define context free grammar that would be used for Component Based Object
Oriented Program. Then take output of lexical analyzer as input for the parser. In this input program, each line
of initial component is terminated by #. Now parser read input line by line and stores it in input array. Then
apply bottom up parsing approach to generate table-driven parser. In this program take an empty array stack.
Now the procedure compare this stack array with RHS of every production defined in context free grammar
decided earlier. If no productions match then push a symbol of input array into stack and define this operation as
“push”. If it matches RHS of any production then it pops those symbols from stack that matches RHS of
production and pushes LHS of that production. This procedure is iteratively applied until input array has “$”.
Now if input array and stack array has $ then that input is successfully parsed otherwise it is not successfully
parsed.
Procedure parser
{
do
{
Read a character
input[i]:=char
while(char!=#)
{
input[i]:=char
Read a character
}
stack[50]:=NULL
do
{
if stack not equal to RHS of productions of CFG
Then
push character of input into stack and print shift operation
else
pop all elements from stack and push LHS of that production into stack
print reduce operation
}
while(input!=NULL)
}
while(!eof())
}
IV. Result
First of all, on applying lexical analyzerpseudocode on component it will generate “symbol table”.
Symbol table is text file which list of all identifiers and integer literal and string literal used in component along
with line number and column number. The symbol table for the factorial component is :
Lexical and Parser tool for CBOOP program
www.iosrjournals.org 34 | Page
Then applying parser pseudocode on component, get table driven parser. This table has three columns: stack
symbol, input and operation. The operation column can take two values: push operation and pop operation.
Thistable shows how bottom up parser is applied on input and how it is reduced to start variable of context free
grammar. The input and stack column shows value of input and stack array on each iteration of parser pseudo
code.
V. Conclusion
This paper addresses the concept of compiler for component based object oriented program.It modifies
the traditional approach of lexical and parser design to be able to be used for component based object oriented
program. Italso discusses the approach to parse various components of component based object oriented
program and tells how component is opened from component based object oriented program.It also tells how
various interdependent components are successfully parsed. This paper designs front end of component based
object oriented program compiler.
References
[1] ArvinderKaur, Kulvinder Singh, Component Selection for Component based Software engineering, International Journal of
Computer, Applications,2(1),2010,0975-8887
[2] Miroslav D. C´ iric´ and Svetozar R. Rancˇic, Parsing in Different Languages,FACTA UNIVERSITATIS,18(1),2005,299-307
[3] João Costa Seco, Ricardo Silva and Margarida Piriquito, A Component-Based Programming Language with Dynamic
Reconfiguration,International Journal of Software and Information Systems Vol. 5,2008
[4] Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D.Ullman, Compilers(Pearson,2007)
[5] AndyJuAn Wang, Kai Qian,Component-Oriented Programming(John Wiley & Sons, 2005)
[6] XIAOQING WU, BARRETT R. BRYANT, JEFF GRAY, MARJAN MERNIK, ALAN SPRAGUE, MURAT TANIK, Component-
Based Language Implementation with Object-Oriented Syntax and Aspect-Oriented Semantics,The University of Alabama at
Birmingham
[7] Luis Quesada, Fernando Berzal, and Francisco J.Cortijo,A Lexical Analysis Tool with Ambiguity Support,CITIC, University of
Granada
[8] TIM A. WAGNER and SUSAN L. GRAHAM, General Incremental Lexical Analysis, University of California, Berkeley
[9] Oh-Cheon Kwon, Seok-Jin Yoon and Gyu-Sang Shin, Computer & Software Technology Laboratory, ETRI(Electronics and
Telecommunications Research Institute)Taejon, Korea
[10] K. L. P. Mishra, N. CHANDRASEKARAN,Theory of Computer Science: Automata, Languages and Computation(Prentice-
Hall,2007)
[11] O.G. Kakde,Comiler Design(Laxmi Publications,2005)
[12] G. SudhaSadasivam, Component Based Technology(Wiley India,2008)
[13] Laura Rimell and Stephen Clark, Adapting a Lexicalized-Grammar Parser to Contrasting Domains,Oxford University Computing
LaboratoryWolfson Building, Parks RoadOxford, OX1 3QD, UK

More Related Content

What's hot (20)

Unit 5 cspc
Unit 5 cspcUnit 5 cspc
Unit 5 cspc
 
Handout#01
Handout#01Handout#01
Handout#01
 
Unit 1 cd
Unit 1 cdUnit 1 cd
Unit 1 cd
 
Lex and Yacc ppt
Lex and Yacc pptLex and Yacc ppt
Lex and Yacc ppt
 
Handout#03
Handout#03Handout#03
Handout#03
 
Handout#09
Handout#09Handout#09
Handout#09
 
Lex & yacc
Lex & yaccLex & yacc
Lex & yacc
 
Data file handling
Data file handlingData file handling
Data file handling
 
Ap Power Point Chpt3
Ap Power Point Chpt3Ap Power Point Chpt3
Ap Power Point Chpt3
 
FUNCTION CPU
FUNCTION CPUFUNCTION CPU
FUNCTION CPU
 
7 compiler lab
7 compiler lab 7 compiler lab
7 compiler lab
 
Yacc
YaccYacc
Yacc
 
Linq
LinqLinq
Linq
 
Ap Power Point Chpt3 B
Ap Power Point Chpt3 BAp Power Point Chpt3 B
Ap Power Point Chpt3 B
 
Ap Power Point Chpt2
Ap Power Point Chpt2Ap Power Point Chpt2
Ap Power Point Chpt2
 
LEX & YACC
LEX & YACCLEX & YACC
LEX & YACC
 
Structure of the compiler
Structure of the compilerStructure of the compiler
Structure of the compiler
 
Insight into java 1.8, OOP VS FP
Insight into java 1.8, OOP VS FPInsight into java 1.8, OOP VS FP
Insight into java 1.8, OOP VS FP
 
Intro to php
Intro to phpIntro to php
Intro to php
 
Assignment1
Assignment1Assignment1
Assignment1
 

Viewers also liked

Discovering Frequent Patterns with New Mining Procedure
Discovering Frequent Patterns with New Mining ProcedureDiscovering Frequent Patterns with New Mining Procedure
Discovering Frequent Patterns with New Mining ProcedureIOSR Journals
 
Modified One Cycle Controlled Scheme for Single-Phase Grid Connected Pv-Fc Hy...
Modified One Cycle Controlled Scheme for Single-Phase Grid Connected Pv-Fc Hy...Modified One Cycle Controlled Scheme for Single-Phase Grid Connected Pv-Fc Hy...
Modified One Cycle Controlled Scheme for Single-Phase Grid Connected Pv-Fc Hy...IOSR Journals
 
Real Time Services for Cloud Computing Enabled Vehicle Networks
Real Time Services for Cloud Computing Enabled Vehicle NetworksReal Time Services for Cloud Computing Enabled Vehicle Networks
Real Time Services for Cloud Computing Enabled Vehicle NetworksIOSR Journals
 
Designing the Workflow of a Language Interpretation Device Using Artificial I...
Designing the Workflow of a Language Interpretation Device Using Artificial I...Designing the Workflow of a Language Interpretation Device Using Artificial I...
Designing the Workflow of a Language Interpretation Device Using Artificial I...IOSR Journals
 
Chemical Composition, In Vitro Digestibility And Gas Production Characteristi...
Chemical Composition, In Vitro Digestibility And Gas Production Characteristi...Chemical Composition, In Vitro Digestibility And Gas Production Characteristi...
Chemical Composition, In Vitro Digestibility And Gas Production Characteristi...IOSR Journals
 
Effect Of Nitrogen And Potassium On The Yield And Quality Of Ginger In The De...
Effect Of Nitrogen And Potassium On The Yield And Quality Of Ginger In The De...Effect Of Nitrogen And Potassium On The Yield And Quality Of Ginger In The De...
Effect Of Nitrogen And Potassium On The Yield And Quality Of Ginger In The De...IOSR Journals
 
Matlab Based Analysis of 3-Ø Self-Excited Induction Generator with Nonlinear ...
Matlab Based Analysis of 3-Ø Self-Excited Induction Generator with Nonlinear ...Matlab Based Analysis of 3-Ø Self-Excited Induction Generator with Nonlinear ...
Matlab Based Analysis of 3-Ø Self-Excited Induction Generator with Nonlinear ...IOSR Journals
 
Interrelation between Climate Change and Lightning and its Impacts on Power S...
Interrelation between Climate Change and Lightning and its Impacts on Power S...Interrelation between Climate Change and Lightning and its Impacts on Power S...
Interrelation between Climate Change and Lightning and its Impacts on Power S...IOSR Journals
 
Procuring the Anomaly Packets and Accountability Detection in the Network
Procuring the Anomaly Packets and Accountability Detection in the NetworkProcuring the Anomaly Packets and Accountability Detection in the Network
Procuring the Anomaly Packets and Accountability Detection in the NetworkIOSR Journals
 
Adaptive check-pointing and replication strategy to tolerate faults in comput...
Adaptive check-pointing and replication strategy to tolerate faults in comput...Adaptive check-pointing and replication strategy to tolerate faults in comput...
Adaptive check-pointing and replication strategy to tolerate faults in comput...IOSR Journals
 
The DNA cleavage and antimicrobial studies of Co(II), Ni(II), Cu(II) and Zn(I...
The DNA cleavage and antimicrobial studies of Co(II), Ni(II), Cu(II) and Zn(I...The DNA cleavage and antimicrobial studies of Co(II), Ni(II), Cu(II) and Zn(I...
The DNA cleavage and antimicrobial studies of Co(II), Ni(II), Cu(II) and Zn(I...IOSR Journals
 
Isolation Of Salmonella Gallinarum From Poultry Droppings In Jos Metropolis, ...
Isolation Of Salmonella Gallinarum From Poultry Droppings In Jos Metropolis, ...Isolation Of Salmonella Gallinarum From Poultry Droppings In Jos Metropolis, ...
Isolation Of Salmonella Gallinarum From Poultry Droppings In Jos Metropolis, ...IOSR Journals
 
A Study on Recent Trends and Developments in Intrusion Detection System
A Study on Recent Trends and Developments in Intrusion Detection SystemA Study on Recent Trends and Developments in Intrusion Detection System
A Study on Recent Trends and Developments in Intrusion Detection SystemIOSR Journals
 
A Robust Approach for Detecting Data Leakage and Data Leaker in Organizations
A Robust Approach for Detecting Data Leakage and Data Leaker in OrganizationsA Robust Approach for Detecting Data Leakage and Data Leaker in Organizations
A Robust Approach for Detecting Data Leakage and Data Leaker in OrganizationsIOSR Journals
 
Privacy and Integrity Preserving in Cloud Storage Devices
Privacy and Integrity Preserving in Cloud Storage DevicesPrivacy and Integrity Preserving in Cloud Storage Devices
Privacy and Integrity Preserving in Cloud Storage DevicesIOSR Journals
 
Domestic Solar - Aero - Hydro Power Generation System
Domestic Solar - Aero - Hydro Power Generation SystemDomestic Solar - Aero - Hydro Power Generation System
Domestic Solar - Aero - Hydro Power Generation SystemIOSR Journals
 

Viewers also liked (20)

Discovering Frequent Patterns with New Mining Procedure
Discovering Frequent Patterns with New Mining ProcedureDiscovering Frequent Patterns with New Mining Procedure
Discovering Frequent Patterns with New Mining Procedure
 
Modified One Cycle Controlled Scheme for Single-Phase Grid Connected Pv-Fc Hy...
Modified One Cycle Controlled Scheme for Single-Phase Grid Connected Pv-Fc Hy...Modified One Cycle Controlled Scheme for Single-Phase Grid Connected Pv-Fc Hy...
Modified One Cycle Controlled Scheme for Single-Phase Grid Connected Pv-Fc Hy...
 
Real Time Services for Cloud Computing Enabled Vehicle Networks
Real Time Services for Cloud Computing Enabled Vehicle NetworksReal Time Services for Cloud Computing Enabled Vehicle Networks
Real Time Services for Cloud Computing Enabled Vehicle Networks
 
Designing the Workflow of a Language Interpretation Device Using Artificial I...
Designing the Workflow of a Language Interpretation Device Using Artificial I...Designing the Workflow of a Language Interpretation Device Using Artificial I...
Designing the Workflow of a Language Interpretation Device Using Artificial I...
 
E013122834
E013122834E013122834
E013122834
 
M01312106112
M01312106112M01312106112
M01312106112
 
Chemical Composition, In Vitro Digestibility And Gas Production Characteristi...
Chemical Composition, In Vitro Digestibility And Gas Production Characteristi...Chemical Composition, In Vitro Digestibility And Gas Production Characteristi...
Chemical Composition, In Vitro Digestibility And Gas Production Characteristi...
 
Effect Of Nitrogen And Potassium On The Yield And Quality Of Ginger In The De...
Effect Of Nitrogen And Potassium On The Yield And Quality Of Ginger In The De...Effect Of Nitrogen And Potassium On The Yield And Quality Of Ginger In The De...
Effect Of Nitrogen And Potassium On The Yield And Quality Of Ginger In The De...
 
Matlab Based Analysis of 3-Ø Self-Excited Induction Generator with Nonlinear ...
Matlab Based Analysis of 3-Ø Self-Excited Induction Generator with Nonlinear ...Matlab Based Analysis of 3-Ø Self-Excited Induction Generator with Nonlinear ...
Matlab Based Analysis of 3-Ø Self-Excited Induction Generator with Nonlinear ...
 
Interrelation between Climate Change and Lightning and its Impacts on Power S...
Interrelation between Climate Change and Lightning and its Impacts on Power S...Interrelation between Climate Change and Lightning and its Impacts on Power S...
Interrelation between Climate Change and Lightning and its Impacts on Power S...
 
Procuring the Anomaly Packets and Accountability Detection in the Network
Procuring the Anomaly Packets and Accountability Detection in the NetworkProcuring the Anomaly Packets and Accountability Detection in the Network
Procuring the Anomaly Packets and Accountability Detection in the Network
 
Adaptive check-pointing and replication strategy to tolerate faults in comput...
Adaptive check-pointing and replication strategy to tolerate faults in comput...Adaptive check-pointing and replication strategy to tolerate faults in comput...
Adaptive check-pointing and replication strategy to tolerate faults in comput...
 
The DNA cleavage and antimicrobial studies of Co(II), Ni(II), Cu(II) and Zn(I...
The DNA cleavage and antimicrobial studies of Co(II), Ni(II), Cu(II) and Zn(I...The DNA cleavage and antimicrobial studies of Co(II), Ni(II), Cu(II) and Zn(I...
The DNA cleavage and antimicrobial studies of Co(II), Ni(II), Cu(II) and Zn(I...
 
Isolation Of Salmonella Gallinarum From Poultry Droppings In Jos Metropolis, ...
Isolation Of Salmonella Gallinarum From Poultry Droppings In Jos Metropolis, ...Isolation Of Salmonella Gallinarum From Poultry Droppings In Jos Metropolis, ...
Isolation Of Salmonella Gallinarum From Poultry Droppings In Jos Metropolis, ...
 
G1803044045
G1803044045G1803044045
G1803044045
 
D017152832
D017152832D017152832
D017152832
 
A Study on Recent Trends and Developments in Intrusion Detection System
A Study on Recent Trends and Developments in Intrusion Detection SystemA Study on Recent Trends and Developments in Intrusion Detection System
A Study on Recent Trends and Developments in Intrusion Detection System
 
A Robust Approach for Detecting Data Leakage and Data Leaker in Organizations
A Robust Approach for Detecting Data Leakage and Data Leaker in OrganizationsA Robust Approach for Detecting Data Leakage and Data Leaker in Organizations
A Robust Approach for Detecting Data Leakage and Data Leaker in Organizations
 
Privacy and Integrity Preserving in Cloud Storage Devices
Privacy and Integrity Preserving in Cloud Storage DevicesPrivacy and Integrity Preserving in Cloud Storage Devices
Privacy and Integrity Preserving in Cloud Storage Devices
 
Domestic Solar - Aero - Hydro Power Generation System
Domestic Solar - Aero - Hydro Power Generation SystemDomestic Solar - Aero - Hydro Power Generation System
Domestic Solar - Aero - Hydro Power Generation System
 

Similar to Lexical and Parser tool for CBOOP program

CS 280 Fall 2022 Programming Assignment 2 November.docx
CS 280 Fall 2022 Programming Assignment 2 November.docxCS 280 Fall 2022 Programming Assignment 2 November.docx
CS 280 Fall 2022 Programming Assignment 2 November.docxrichardnorman90310
 
Introduction to Compilers
Introduction to CompilersIntroduction to Compilers
Introduction to Compilersvijaya603274
 
CC week 1.pptx
CC week 1.pptxCC week 1.pptx
CC week 1.pptxkkjk4
 
phases of compiler-analysis phase
phases of compiler-analysis phasephases of compiler-analysis phase
phases of compiler-analysis phaseSuyash Srivastava
 
Chapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdfChapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdfDrIsikoIsaac
 
Computer programming in C. Library functions in C.
Computer programming in C. Library functions in C.Computer programming in C. Library functions in C.
Computer programming in C. Library functions in C.LamiyQurbanlKomptert
 
unit1pdf__2021_12_14_12_37_34.pdf
unit1pdf__2021_12_14_12_37_34.pdfunit1pdf__2021_12_14_12_37_34.pdf
unit1pdf__2021_12_14_12_37_34.pdfDrIsikoIsaac
 
Chapter-1.pptx compiler Design Course Material
Chapter-1.pptx compiler Design Course MaterialChapter-1.pptx compiler Design Course Material
Chapter-1.pptx compiler Design Course MaterialgadisaAdamu
 
what is compiler and five phases of compiler
what is compiler and five phases of compilerwhat is compiler and five phases of compiler
what is compiler and five phases of compileradilmehmood93
 
role of lexical anaysis
role of lexical anaysisrole of lexical anaysis
role of lexical anaysisSudhaa Ravi
 
design intoduction of_COMPILER_DESIGN.pdf
design intoduction of_COMPILER_DESIGN.pdfdesign intoduction of_COMPILER_DESIGN.pdf
design intoduction of_COMPILER_DESIGN.pdfadvRajatSharma
 
Class IX Input in Java using Scanner Class (1).pptx
Class IX  Input in Java using Scanner Class (1).pptxClass IX  Input in Java using Scanner Class (1).pptx
Class IX Input in Java using Scanner Class (1).pptxrinkugupta37
 
Python Interview Questions For Experienced
Python Interview Questions For ExperiencedPython Interview Questions For Experienced
Python Interview Questions For Experiencedzynofustechnology
 

Similar to Lexical and Parser tool for CBOOP program (20)

CS 280 Fall 2022 Programming Assignment 2 November.docx
CS 280 Fall 2022 Programming Assignment 2 November.docxCS 280 Fall 2022 Programming Assignment 2 November.docx
CS 280 Fall 2022 Programming Assignment 2 November.docx
 
Compiler Design
Compiler DesignCompiler Design
Compiler Design
 
Introduction to Compilers
Introduction to CompilersIntroduction to Compilers
Introduction to Compilers
 
CC week 1.pptx
CC week 1.pptxCC week 1.pptx
CC week 1.pptx
 
phases of compiler-analysis phase
phases of compiler-analysis phasephases of compiler-analysis phase
phases of compiler-analysis phase
 
Chapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdfChapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdf
 
Lexical analyzer
Lexical analyzerLexical analyzer
Lexical analyzer
 
Computer programming in C. Library functions in C.
Computer programming in C. Library functions in C.Computer programming in C. Library functions in C.
Computer programming in C. Library functions in C.
 
Compiler Chapter 1
Compiler Chapter 1Compiler Chapter 1
Compiler Chapter 1
 
unit1pdf__2021_12_14_12_37_34.pdf
unit1pdf__2021_12_14_12_37_34.pdfunit1pdf__2021_12_14_12_37_34.pdf
unit1pdf__2021_12_14_12_37_34.pdf
 
Handout#02
Handout#02Handout#02
Handout#02
 
Chapter-1.pptx compiler Design Course Material
Chapter-1.pptx compiler Design Course MaterialChapter-1.pptx compiler Design Course Material
Chapter-1.pptx compiler Design Course Material
 
what is compiler and five phases of compiler
what is compiler and five phases of compilerwhat is compiler and five phases of compiler
what is compiler and five phases of compiler
 
Compiler Design
Compiler DesignCompiler Design
Compiler Design
 
role of lexical anaysis
role of lexical anaysisrole of lexical anaysis
role of lexical anaysis
 
3.2
3.23.2
3.2
 
design intoduction of_COMPILER_DESIGN.pdf
design intoduction of_COMPILER_DESIGN.pdfdesign intoduction of_COMPILER_DESIGN.pdf
design intoduction of_COMPILER_DESIGN.pdf
 
Class IX Input in Java using Scanner Class (1).pptx
Class IX  Input in Java using Scanner Class (1).pptxClass IX  Input in Java using Scanner Class (1).pptx
Class IX Input in Java using Scanner Class (1).pptx
 
LANGUAGE TRANSLATOR
LANGUAGE TRANSLATORLANGUAGE TRANSLATOR
LANGUAGE TRANSLATOR
 
Python Interview Questions For Experienced
Python Interview Questions For ExperiencedPython Interview Questions For Experienced
Python Interview Questions For Experienced
 

More from IOSR Journals (20)

A011140104
A011140104A011140104
A011140104
 
M0111397100
M0111397100M0111397100
M0111397100
 
L011138596
L011138596L011138596
L011138596
 
K011138084
K011138084K011138084
K011138084
 
J011137479
J011137479J011137479
J011137479
 
I011136673
I011136673I011136673
I011136673
 
G011134454
G011134454G011134454
G011134454
 
H011135565
H011135565H011135565
H011135565
 
F011134043
F011134043F011134043
F011134043
 
E011133639
E011133639E011133639
E011133639
 
D011132635
D011132635D011132635
D011132635
 
C011131925
C011131925C011131925
C011131925
 
B011130918
B011130918B011130918
B011130918
 
A011130108
A011130108A011130108
A011130108
 
I011125160
I011125160I011125160
I011125160
 
H011124050
H011124050H011124050
H011124050
 
G011123539
G011123539G011123539
G011123539
 
F011123134
F011123134F011123134
F011123134
 
E011122530
E011122530E011122530
E011122530
 
D011121524
D011121524D011121524
D011121524
 

Recently uploaded

Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniquesugginaramesh
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
An introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxAn introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxPurva Nikam
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 

Recently uploaded (20)

Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniques
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
An introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxAn introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptx
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 

Lexical and Parser tool for CBOOP program

  • 1. IOSR Journal of Computer Engineering (IOSR-JCE) e-ISSN: 2278-0661, p- ISSN: 2278-8727Volume 10, Issue 6 (May. - Jun. 2013), PP 30-34 www.iosrjournals.org www.iosrjournals.org 30 | Page Lexical and Parser tool for CBOOP program Tanuj Tyagi1 , Akhil Saxena2 , Sunil Nishad3 ,Babita Tiwari4 Computer Science and Engineering Department, Jaypee University Of Engineering And Technology (JUET) A.B. Road,P.B No. 1, Raghogarh,Dist-Guna-473226(M.P) Abstract: This paper addresses an approach to build lexical and parser tool for Component Based Object Oriented Program (CBOOP). In this Paper,Lexical analysis tool use for the scanning of CBOOP program. Lexical tool reads the input characters of the source program and return the tokens. Parser will generate the syntax tree of CBOOP program and check the syntax of program. The driver program, i.e., main program will open the file containing CBOOP program according to input. Keywords:CBOOP,Lexical Analyzer, Tokens, Parser, Driver program I. Introduction The latest programming paradigm in software engineering field is Component Based Object Oriented Programming. This paradigm has advantage of reusability over previous paradigm like object oriented programming. It also has advantage of high granularity and lower modular interdependence. It also ensures that true inheritance does not violate encapsulation as it was in case of object oriented programming. The future of software engineering lies in this programming paradigm [5]. To use any software for any novice user there is need of executable form of that software. For this purpose there arises the need a compiler. Lexical analyzer and parser isfrontend of compiler. These stages of compiler build syntactic structure of any software. These stages play important role in building executable form. This paper aims at provide an approachto achieving these stages on Component Based Object Oriented Program. It uses previous approaches of parsing and lexical analysis and applies and modifies it accordingly to parse the Component Based Object Oriented program. It provides with an approach that allow parsing and lexical analyzer of Component Based Object Oriented Programming. Lexical Analyzer reads the source program character by character, breaking the source program into a sequence of tokens. The various tokens are keywords,identifiers, operators, constants and punctuation symbols such as comma and parenthesis. Each token is a collection of character with well-defined meaning of the source program that is to be treated as a single unit. The Lexical analyzer analyses successive character in the source program starting from the first character not yet grouped into a token. In order to determine the next token, many characters may be searched beyond the next token. These tokens are sent to the parser for syntax analysis [7]. Consider the following expression in C++: result=(a+b)*2; When this expression is input to the lexical analyzer, following tokens are generated: Token Type of Token Result Identifier = Assignment Operator ( Punctuator A Identifier + Addition Operator B Identifier ) Punctuator C Identifier ++ Increment Operator 5 Integer Literal ; Punctuator Table 1 The parser uses the tokens from lexical analyzer and generates the syntax tree.In this paper, bottom-up parser is used which works on context free grammar.Parser takes input line by line and checks syntax of that statement.It takes input and compares it with context free grammar and check whether input is correct or not. Top-down
  • 2. Lexical and Parser tool for CBOOP program www.iosrjournals.org 31 | Page parser is not used because it is less efficient than bottom-up parser. Bottom-up parser uses right-most derivation in reverse order [2][4]. For the above expression, i.e., result=(a+b)*2; parser generates the following parse tree: Fig. 1 cin>>a>>b; Fig. 2 State diagram of input operation Fig. 2 is the state diagram of input operation. It checks that input operation is syntactically correct or not. When cin is applied on the initial state q0, state changes from q0to q1. Then, if extraction operator>>comes the state changes to q2. Further, identifier changes the state to q3. The extraction operator changes the state back to q2, this terminal at q3 state is used when more than one variable are to be declared. Finally, semi-colon (;) changes the state to the final state qf. II. Working OfCboop First of all, the driver program opens component program on basis of input user enters. For example, if user entersinput as 5!.Then the driver program opens factorial component. If user enters a quadratic equation it opens quadratic component. The sole purpose of driver program is to open component program. The driver program is like “My Computer” icon in our desktop. From “My Computer” icon various drives can be opened that are present in the system. It doesn’t solely perform any function or stores any data. Similarly is the driver program which just opens component program.Next, the driver program then performs lexical analysis on opened component and then parser analysis on the opened component.Now, since Component Based Object Oriented Program is collection of interdependent program. So, one component can depend on other component. So if driver program opens component that is dependent on other component then driver program first of all opens component that will be needed by input component. It then performs lexical analysis and parser on last in first out manner. Lexical analysis is performed on each component only once. On other hand, the parser performs syntax analyzer on component each time it is needed [6]. Fig. 3
  • 3. Lexical and Parser tool for CBOOP program www.iosrjournals.org 32 | Page Fig. 3 shows Component Based Object Oriented Program for mathematical calculator.If driver program opens exponential series component, then driver program checks which component will be needed by exponential series component. It finds out that it will need factorial, summation and division components. The driver program performs lexical analysis on each component, i.e., factorial, power, division,summation and exponential series component. Then parser analyzer performs the parsing on each component program opened. In Fig. 3, exponential series component is used to compute exponential series which is of the form: 𝑒 𝑥 = 1 + 𝑥 1! + 𝑥2 2! + 𝑥3 3! + ⋯ , −∞ < 𝑥 < ∞ First of all driver program passes input 1 to factorial component, and then it passes 2 to factorial component and so on. So parsing is performed on factorial component with input as 1, 2 and so on. Then driver program opens power component and passes input as x and power to x. Then driver program opens division component passes output of power component and factorial component as input. Then driver program opens summation series component and passes output of division component. In this exponential series is evaluated [6]. III. Pseudo Code For Driver Program, Lexical And Parser This section represents the pseudo code of driver program, lexical and parser. In driver program, first of all it takes input from user. This input act as “key” which tells driver program which component to open. The driver program scans input from left to right character by character. It compares character read with cpgm which has list of all components. It then opens the desired component. Next, the driver program performs lexical analyzer on this component by applying lexical analyzer pseudo code on it. Then it performs parser on component opened by applying parser pseudo code on it. It then applies this procedure in iterative manner. Scan input Procedure driver_pgm(input,cpgm) Begin while(input) { from left to right character by character Compare input with cpgm then Open component on input read Perform lexical analyzer on component opened Perform parsing on component open Remove the character read from input } In lexical analyzer, component is read character by character. Next, lexical analyzer collects character into logical groupings called lexemes. First of all, lexical analyzer checks first character of lexeme. If it is character then it can be reserved word or identifiers. Then, lexical analyzer it with predefined reserved words then lexeme is reserved words otherwise it is identifier. If first character of lexeme is digit then it can be either integer literal or floating literal. If first character is neither digit nor character, it compares lexeme with predefined set of operators. This procedure is applied on each character of component. Procedure lexical_analyzer { Read a character switch(char) { case LETTER: stoken[i]:=char Read a character while(char==LETTER|| char==DIGIT) { stoken[i]:=char Read a character } ifstoken is reserved word then return reserved word
  • 4. Lexical and Parser tool for CBOOP program www.iosrjournals.org 33 | Page else return identifier break case DIGIT: stoken[i]:=char Read a character while(char==DIGIT) { stoken[i]:=char Read a character } return literal break } } In parser, first of all define context free grammar that would be used for Component Based Object Oriented Program. Then take output of lexical analyzer as input for the parser. In this input program, each line of initial component is terminated by #. Now parser read input line by line and stores it in input array. Then apply bottom up parsing approach to generate table-driven parser. In this program take an empty array stack. Now the procedure compare this stack array with RHS of every production defined in context free grammar decided earlier. If no productions match then push a symbol of input array into stack and define this operation as “push”. If it matches RHS of any production then it pops those symbols from stack that matches RHS of production and pushes LHS of that production. This procedure is iteratively applied until input array has “$”. Now if input array and stack array has $ then that input is successfully parsed otherwise it is not successfully parsed. Procedure parser { do { Read a character input[i]:=char while(char!=#) { input[i]:=char Read a character } stack[50]:=NULL do { if stack not equal to RHS of productions of CFG Then push character of input into stack and print shift operation else pop all elements from stack and push LHS of that production into stack print reduce operation } while(input!=NULL) } while(!eof()) } IV. Result First of all, on applying lexical analyzerpseudocode on component it will generate “symbol table”. Symbol table is text file which list of all identifiers and integer literal and string literal used in component along with line number and column number. The symbol table for the factorial component is :
  • 5. Lexical and Parser tool for CBOOP program www.iosrjournals.org 34 | Page Then applying parser pseudocode on component, get table driven parser. This table has three columns: stack symbol, input and operation. The operation column can take two values: push operation and pop operation. Thistable shows how bottom up parser is applied on input and how it is reduced to start variable of context free grammar. The input and stack column shows value of input and stack array on each iteration of parser pseudo code. V. Conclusion This paper addresses the concept of compiler for component based object oriented program.It modifies the traditional approach of lexical and parser design to be able to be used for component based object oriented program. Italso discusses the approach to parse various components of component based object oriented program and tells how component is opened from component based object oriented program.It also tells how various interdependent components are successfully parsed. This paper designs front end of component based object oriented program compiler. References [1] ArvinderKaur, Kulvinder Singh, Component Selection for Component based Software engineering, International Journal of Computer, Applications,2(1),2010,0975-8887 [2] Miroslav D. C´ iric´ and Svetozar R. Rancˇic, Parsing in Different Languages,FACTA UNIVERSITATIS,18(1),2005,299-307 [3] João Costa Seco, Ricardo Silva and Margarida Piriquito, A Component-Based Programming Language with Dynamic Reconfiguration,International Journal of Software and Information Systems Vol. 5,2008 [4] Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D.Ullman, Compilers(Pearson,2007) [5] AndyJuAn Wang, Kai Qian,Component-Oriented Programming(John Wiley & Sons, 2005) [6] XIAOQING WU, BARRETT R. BRYANT, JEFF GRAY, MARJAN MERNIK, ALAN SPRAGUE, MURAT TANIK, Component- Based Language Implementation with Object-Oriented Syntax and Aspect-Oriented Semantics,The University of Alabama at Birmingham [7] Luis Quesada, Fernando Berzal, and Francisco J.Cortijo,A Lexical Analysis Tool with Ambiguity Support,CITIC, University of Granada [8] TIM A. WAGNER and SUSAN L. GRAHAM, General Incremental Lexical Analysis, University of California, Berkeley [9] Oh-Cheon Kwon, Seok-Jin Yoon and Gyu-Sang Shin, Computer & Software Technology Laboratory, ETRI(Electronics and Telecommunications Research Institute)Taejon, Korea [10] K. L. P. Mishra, N. CHANDRASEKARAN,Theory of Computer Science: Automata, Languages and Computation(Prentice- Hall,2007) [11] O.G. Kakde,Comiler Design(Laxmi Publications,2005) [12] G. SudhaSadasivam, Component Based Technology(Wiley India,2008) [13] Laura Rimell and Stephen Clark, Adapting a Lexicalized-Grammar Parser to Contrasting Domains,Oxford University Computing LaboratoryWolfson Building, Parks RoadOxford, OX1 3QD, UK