You are on page 1of 2

What is a Parser? A parser breaks data into smaller elements, according to a set of rules that describe its structure.

Most data can be decomposed to some degree. For example, a phone number consists of an area code, prefix and suffix; and a mailing address consists of a street address, city, state, country and zip code.

Parsers generally understand programs as a series of statements


Parsing: This is sometimes called syntax analysis. Very often the compiler designer will select a set of syntax rules that are easy to work with here but that lead to a parser that is somewhat over-generous in that it will accept some strings of tokens that do not form real valid programs: these excess cases are then filtered out later. Proper error detection, reporting and repair are critical issues for parsers

8. What is phase?
Phase denotes the particular point in the cycle of a waveform, measured as an angle in degrees. It is normally not an audible characteristic of a single wave (but can be when we using very lowfrequency waves as controls in synthesis). It is a very important factor in the interaction of one wave with another, either acoustically or electronically.
Definition: Phase is a term used to describe the position of one sound wave relative to another sound wave, Two identical waves are 'in-phase' when the crests and troughs of the waves meet and are 'outof-phase' when the crests of one wave meets the trough of another wave.

What is a Function?
A function is like a machine: it has an input and an output. And the output is related somehow to the input.
Definition. A function is a rule which relates the values of one variable quantity to the values of another variable quantity, and does so in such a way that the value of the second variable quantity is uniquely determined by (i.e. is a function of) the value of the first variable quantity. SYMBOL TABLES A compiler uses a symbol table to keep track of scope and binding information about names.

The symbol table is searched every time a name is encountered in the source text. Changes to symbol table occur if a new name or new information about an existing name is discovered.

the

A symbol table mechanism must allow us to add new entries and find existing entries. The two symbol table mechanisms are linear lists and hash tables. Each scheme is evaluated on the basis of time required to add n entries and make e inquiries. A linear list is the simplest to implement, but its performance is poor when n and e are large. Hashing schemes provide better performance for greater programming effort and space overhead. It is useful for a compiler to be able to grow the symbol table dynamically at compile time. If the symbol table is fixed when the compiler is written, the size must be chosen large enough to handle any source program that might be presented.