Handling Grammar Cycles in the 1997 Standard ML Definition
Fully general parsers permit the syntax specification of formal languages to be unrestricted, allowing language designers to use a syntax specification that supports semantics specification, but also permitting ambiguity. Language workbenches that support fully general grammars need tools which can generate robust default behaviour but also allow experienced designers to specify particular choices when ambiguity is encountered. The standard longest match approach to ambiguity resolution is not robust when a grammar contains cycles. Although cycles can be removed from a grammar, this disrupts the syntax specification. We present an algorithm that safely removes cycles from the shared packed parse forests generated by general parsers and explore the application of the algorithm to the 1997 SML Definition. The algorithm results in a sub-forest to which further designer-specified or default disambiguation rules can be applied.
Thu 12 JunDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
11:00 - 12:30 | SLE Session 1: Parsing and Attribute GrammarsSLE 2025 at M 001 Chair(s): Georg Hinkel RheinMain University of Applied Sciences, Wiesbaden, Germany | ||
11:00 22mTalk | Handling Grammar Cycles in the 1997 Standard ML Definition SLE 2025 Elizabeth Scott Royal Holloway University of London, Adrian Johnstone Royal Holloway University of London, UK Pre-print | ||
11:22 22mTalk | Property-based Testing of Attribute Grammars SLE 2025 José Nuno Macedo University of Minho, Marcos Viera University of the Republic, Uruguay, João Saraiva HASLab/INESC TEC, University of Minho | ||
11:45 22mTalk | Scheduling the Construction and Interrogation of Scope Graphs Using Attribute Grammars SLE 2025 Luke Bessant University of Minnesota, Twin Cities, Eric Van Wyk University of Minnesota, Twin Cities Pre-print | ||
12:07 22mTalk | Boosting Parallel Parsing through Cyclic Operator Precedence Grammars SLE 2025 Michele Chiari TU Wien, Michele Giornetta Politecnico di Milano, Dino Mandrioli Politecnico di Milano, Matteo Pradella Politecnico di Milano, Italy Pre-print |