Science Fair Projects Ideas - Parser

All Science Fair Projects

      

Science Fair Project Encyclopedia for Schools!

  Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary     

Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

Parser


A parser is a computer program or a component of a program that analyses the grammatical structure of an input, with respect to a given formal grammar, a process known as parsing. Typically, a parser transforms some input text into a data structure that can be processed easily, e.g. for semantic checking, code generation or simply to ease the further understanding of the input. Such a data structure usually captures the implied hierarchy of the input and forms a tree or even a graph.

Parsers can be made both for natural languages and for programming languages. Programming language parsers tend to be based on context free grammars as fast and efficient parsers can be written for them. Context free grammars however are limited in their expressiveness, i.e. the kinds of languages which can be described with them is limited. Informally, the range of memorization is limited. E.g., one cannot memorize the occurance of a construct over an arbitrary length of input which is necessary if in a language a construct has to be mentioned first before one can refer to it. More powerful grammars however cannot be parsed efficiently or are not intuitive at all. Thus, a common strategy to accept such language constructs is to relax the parser, i.e. let it accept a broader language with invalid constructs and filter these afterwards. Note that it is usually not a problem to find a context free grammar including all desired language constructs. Rather, it is often impossible to restrict a context free grammar to descibe only valid constructs.

For example LALR parsers are capable of efficiently analysing a wide class of context free grammars. Such parsers are usually not written by hand but generated by parser generators.

The task of the parser can be summarized as to determine if and how the input can be derived from the start symbol with the rules of the formal grammar. A parser can do this in essentially two ways: it can start with the input and attempt to rewrite it to the start symbol, a so-called bottom-up parser, or it can start with the start symbol and try to rewrite it to the input, a so-called top-down parser. For example LL parsers are top-down parsers and LR parsers are bottom-up parsers.

Another important distinction is whether the parser generates a leftmost derivation or a rightmost derivation (see context-free grammar). LL parsers will generate a leftmost derivation and LR parsers will generate a rightmost derivation (although usually in reverse).

Contents

Overview of parsers

Top-down parsers

Some of the parsers that use top-down parsing include:

Bottom-up parsers

Some of the parsers that use bottom-up parsing include:

See also

References

External links

11-30-2008 18:11:33
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details
Science kits, science lessons, science toys, maths toys, hobby kits, science games and books - these are some of many products that can help give your kid an edge in their science fair projects, and develop a tremendous interest in the study of science. When shopping for a science kit or other supplies, make sure that you carefully review the features and quality of the products. Compare prices by going to several online stores. Read product reviews online or refer to magazines.

Start by looking for your science kit review or science toy review. Compare prices but remember, Price $ is not everything. Quality does matter.
Science Fair Coach
What do science fair judges look out for?
ScienceHound
Science Fair Projects for students of all ages
All Science Fair Projects.com Site
All Science Fair Projects Homepage
Search | Browse | Links | From-our-Editor | Books | Help | Contact | Privacy | Disclaimer | Copyright Notice