Skip to main content

1979 | OriginalPaper | Buchkapitel

Top-down Syntax Analysis

verfasst von : Richard Bornat

Erschienen in: Understanding and Writing Compilers

Verlag: Macmillan Education UK

Aktivieren Sie unsere intelligente Suche um passende Fachinhalte oder Patente zu finden.

search-config
loading …

The most difficult task when writing a top-down syntax analyser is that of preparing a grammar which is suitable for top-down analysis. Once you have manipulated the grammar so that it possesses certain simple properties, which I describe below, it is trivially easy to write a syntax analyser as a collection of mutually recursive procedures, one for each non-terminal symbol in the grammar. Each procedure has the task of recognising and analysing a section of the input which represents a phrase described by its particular non-terminal symbol. It does so by checking the output of the lexical analyser, and by calling procedures associated with the non-terminals of the grammar, in the sequence defined by the production on which it is based.

Metadaten
Titel
Top-down Syntax Analysis
verfasst von
Richard Bornat
Copyright-Jahr
1979
Verlag
Macmillan Education UK
DOI
https://doi.org/10.1007/978-1-349-16178-2_17