12 research outputs found
Recursive ascent parsing : from Earley to Marcus
An overview is given of recursive ascent parsing, a new functional implementation technique for parsers for context-free grammars. The theory behind it unifies the treatment of hitherto virtually unrelated parsing methods, such as the Earley algorithm and LR parsing. This is effected by banning the distinguishing factors, such as stacks and parsing tables: stacks are replaced by recursive functions, parsing tables by function memoization. In addition to this unification, the theory provides a high-level view on parsing compared to the standard theory. Nevertheless, the functional implementations are as efficient as conventional ones, especially if the functions that constitute the parsers are formulated in low-level imperative languages with efficient function calls, like C. This means that they are important in practice, for parsing both artificial and natural languages. The recursive ascent treatment of LR(0) parsing has a natural generalization that leads to a new family of look-ahead parsers. This family is akin to the one proposed by Marcus a decade ago to model the processing of a natural language in the human mind
Compact storage of syntax trees for ambiguous sentences
We discuss the computation of parse forests, i.e., compact representations of all syntax trees for a given sentence. Conventional parsing algorithms can be adapted in a simple way to produce parse forests. Recently, the subject of parse forests was brought up in the context of generalized LR(O) parsing, a new parsing method for general context-free grammars. It is widely held that this parsing method is particularly suited to producing parse forests. The contrary is true: generalized LR(O) parsers are poor tools for producing compact parse forests
The functional treatment of parsing
no abstrac
Quantum-kinetic equations for time correlation functions in higher-order perturbation theory
The memory kernel of the kinetic equation for the time correlation function of a quantum fluid is determined both in third order of the interaction strength and in the low-density approximation. The results are obtained with the help of a diagram representation for the kernel. The connection with the kinetic theory for classical fluids is establishe
A functional LR parser
A purely functional implementation of LR(0) parsers is given, together with a simple correctness proof. For non-LR(0) grammars its time complexity is cubic if the functions that constitute the parser are implemented as memo-functions, i.e. functions that memorize the results of previous invocations. For LR(0) grammars, our algorithm is closely related to the recursive ascent parsers recently discovered by Kruseman Aretz (1988), Barnard and Cordy (1988) and Roberts (1988)