Lexical analyzer - xml table output, Programming Languages

Lexical Analyzer:

Symbol Table - Holds the symbols accepted by the lexical analyzer or parser. 

Each symbol may be a terminal or a non-terminal.  Terminal symbols are listed first in the table ahead of non-terminals.

Attributes:

  • Count - Number of symbols in the table

Child items:

  • Symbol

Symbol - Individual symbol accepted by the lexical analyzer or parser. 

Attributes:

  • Index - Unique symbol identifier in the symbol table
  • Name - Name assigned to symbol in the grammar
  • Kind - Indicates the type of symbols. (0- nonterminal, 1 - terminal, other types are self evident)

Char Sets - Groups of characters that can trigger one (or more) DFA state transitions. 

Attributes:

  • Index - Unique identifier for a given character set
  • Count - Number of characters in a given character set

Child items:

  • Char

Char - Specifies the individual character (no array needed)

Attributes:

  • Unicode Index - Character code in Unicode (ASCII)

 

DFA Table - Holds all the DFA states that make up the lexical analyzer. 

Attributes:

1.       Count - Number of DFA states

2.       Initial state

Child Items:

1.       DFA State

DFA State - Enumerates each DFA state and the edges that transition from that state.

Attributes:

  • Index - Unique identifier (order in the DFA table)
  • EdgeCount - Number of edges from the current state to other DFA states
  • AcceptSymbol - Is this an accept state?
  • -1=false
  • Otherwise, it gives the number of the symbol index the state accepts

Child items:

  • DFA Edge

DFA Edge - Transition from one DFA state to another

Attributes:

  • Char Set Index - Points to the character set whose input causes the transition. Thus, a single transition may be cause by multiple characters.
  • Target - Points to the destination state for the transition
Posted Date: 3/25/2013 5:47:59 AM | Location : United States







Related Discussions:- Lexical analyzer - xml table output, Assignment Help, Ask Question on Lexical analyzer - xml table output, Get Answer, Expert's Help, Lexical analyzer - xml table output Discussions

Write discussion on Lexical analyzer - xml table output
Your posts are moderated
Related Questions
Example- Arithmetic :  Given the subsequent two matrices, So calculate A-5B. Solution There isn't much to do now other than the work. We first multiplied

W.A.S.S to find the maximum of three numbers Program # W.A.S.S to find the maximum of three numbers echo "Enter three No.:" read no1 read no2 read no3 if test $no1 -gt $n

COS-101: INTRODUCTION TO COMPUTERS PROJECT DESCRIPTION The Computer Fundamentals Project provides you with a chance to apply what you have learned about computer fundamentals to

Explain the While Statement - Computer Programming? A 'while statement' is an entry controlled loop statement. When the expression is calculated and the condition is not satisf

Write a pseudocode for a program that reads a temperature as a whole number from a user and outputs a “probable” season (winter, sprint, summer, or fall) depending on the temperatu

What is .NET TECHNOLOGY? .NET technological innovation was presented by Enthusiasm, to get the industry from the SUN's Coffee. Few in the past, Enthusiasm had only VC++ and VB

You are required to develop a content management system for the following scenario:   "A Travel Information (NTIK) system is to be designed to allow travellers to access to an elec

How to create an ER diagram?

Expertsmind.com is expert in java assignment help JAVA Virtual Machine A Java exclusive device or java virtual machine (JVM) is an exclusive device able of undertaking Jav

What is "No_Data_Found" in Oracle?