Written by Malcolm Bolton
A parser is a program that is able to recognize the underlying structure in a source text. For example, a Pascal compiler uses a parser to recognize the if, while, repeat and case statements and the procedures, functions and expressions in a Pascal source file. Parsers are used not only with programming languages but also with command interpreters to interpret user input for various types of programs—expert system shells and natural-language interfaces, for example. a scanner (sometimes this is referred to as the lexical analyzer).
This Parser Generator is a program that generates a parser from the specification of a grammar. Thus, from a BNF-like grammar, our parser generator produces a Prolog program capable of recognizing sentences conforming to that grammar.
A parser generator makes it easier to write parsers. Even with Prolog, which was originally designed with natural language parsing in mind, it is still a relatively complicated task to write a parser on your own. Since not everyone has the time to develop expertise in writing parsers (as well as in everything else they must know about in computing), a parser generator allows even non-experts to construct parsers.
The version of the Parcer Generator for Visual Prolog 5 was created by the Prolog Development Center (PDC).
Download the project.