Information Technology Reference
In-Depth Information
- After the simulation the Output Generator allows to calculate the circuit
area and to estimate the power consumption considering a magnetic field
clock. More details can be found in Sect. 7 .
3 Parser
One of the most common uses of a parser in computing is as a component of
a compiler or an interpreter. This component usually parses the source code
of a programming language in order to create an internal representation. The
parsing process (i.e. syntax analysis) consists in the analysis of an input sequence
to determine its grammatical structure with respect to a given formal grammar.
The parsing process operates a transformation of the input text into a data
structure (a tree in the present context), suitable for later processing. The data
structure must be such to capture the implied hierarchy of the input, and a tree
certainly is suitable for this purpose. The typical operation of parsers is in two
stages: first, it identifies the meaningful tokens in the input. Then, it builds a
data structure out of the tokens (Fig. 8 ).
SOURCE STREAM
PARSER
LEXICAL ANALYSIS
(token creation)
PA R S E T R E E
ToPoliNano GRAPH
BUILDER
TOKENS
SYNTACTIC ANALYSIS
(Create Tree)
OUTPUT
Fig. 8. Overview of the parsing process.
In ToPoliNano the use of the parser is related to the need to input circuit
descriptions by means of a Hardware Description Language (HDL). In particular,
the VHDL language is currently supported.
3.1 Lexical Analysis
Lexical analysis is the process of converting a sequence of characters into a
sequence of tokens. A program which performs the lexical analysis is called lexer
 
Search WWH ::




Custom Search