Lexical analyzer - xml table output, Programming Languages

Assignment Help:

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

Related Discussions:- Lexical analyzer - xml table output

Implement a two-dimensional table in prolog, Implement a two-dimensional ta...

Implement a two-dimensional table in Prolog. Your program will contain: An insert_entry predicate that takes a table, row, column and an entry and inserts the entry at the g

Advantages of visual basic programming language, Advantages of visual basic...

Advantages of visual basic programming language Visual Basic is an exclusive selection language published by Microsoft Company, so programs published in Visible Basic cannot, e

Mathematical expression of linear programming problem, A Consultant Dietici...

A Consultant Dietician provides diet and nutritional advice to clients. A client's diet requires that all the food s/he eats come from one of the four "basic food groups" (chocolat

Jsp, how can we get the data from data base to combo box in jsp page dynami...

how can we get the data from data base to combo box in jsp page dynamically

Flowchart and Pseudocode using Control Breaks, Shemrock Inc. is a brake pad...

Shemrock Inc. is a brake pad manufacturing company. This company uses raw materials, such as carbon powder, iron, ash, and resin. It wants to develop an inventory management system

Double roots, This case will lead to similar problem that we've had all oth...

This case will lead to similar problem that we've had all other time we've run in double roots or double eigenvalues. We only find a single solution and will require a second solut

Write out the syntax of nested if statements, Write out the Syntax of Neste...

Write out the Syntax of Nested if Statements? The universal form is                         If(expression 1)                         {

Wap for intelligent agent able to play block dominoes game, Objective: ...

Objective: In a programming language of your choice, write an intelligent agent able to play block Dominoes against a player. Together with this assignment you will find two pa

Java applet assignment help, Objectives: Create an applet, Use metho...

Objectives: Create an applet, Use methods from the Graphics class , Use the Color class General Instructions: The java class that need to be imported into this assignm

For loop , I am trying to get right side triangle in visual logic using for...

I am trying to get right side triangle in visual logic using for loop

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd