File Information
File: 05-lr/acl_arc_1_sum/cleansed_text/xml_by_section/intro/91/e91-1012_intro.xml
Size: 1,944 bytes
Last Modified: 2025-10-06 14:05:02
<?xml version="1.0" standalone="yes"?> <Paper uid="E91-1012"> <Title>Non-deterministic Recursive Ascent Parsing Ren~ Leermakers</Title> <Section position="3" start_page="0" end_page="0" type="intro"> <SectionTitle> 2 Recursive descent </SectionTitle> <Paragraph position="0"> Consider CF grammar G, with terminals VT and non-terminals V/v. Let V = VN U VT. A well-known top-down parsing technique is the recursive descent parser. Recursive descent parsers consist of a number of procedures, usually one for each non-terminal. Here we present a variant that consists of functions, one for each item (dotted rule). We use the unorthodox embracing operator \[.\] to map each item to its function: (we use greek letters for arbitrary elements of V*) \[A -~ a.~\] : N --. 2 N where N is the set of integers, or a subset (0...nm~x), with nma= the maximum seutence length. The functions are to meet the following specification:</Paragraph> <Paragraph position="2"> with x~...xn the sentence to be parsed. A recursive implementation for these functions is given by (b * VT, B * v,,)</Paragraph> <Paragraph position="4"> We keep to the custom of omitting existential quantification (here for k,/f) in definitions of this kind.</Paragraph> <Paragraph position="5"> The proof is elementary and ba#ed on</Paragraph> <Paragraph position="7"> If we add a grammar rule S' --* S to G, with S' (\[ V then S --** x~...xn is equivalent to n * \[S' --* .S\](0).</Paragraph> <Paragraph position="8"> The recursive descent recognizer works for any CF grammar except for grammars for which ~A~(A ---* aAcr --** A3). For such left-recursive grammars the recognizer does not terminate, as execution of \[A --* .a\](i) will lead to a call of itself. The recognition is not a linear process in general: the function calls \[A --- a.B3&quot;\](i) lead to calls \[B --* ./i\](i) for all values of ~ such that B ---, is a grammar rule.</Paragraph> </Section> class="xml-element"></Paper>