Inform - Support - Patches

About Patches  

Compiler  
Library  

DM4 Errata  

Issue L61120     [previous patch]

Preposition parsing is too simplistic
Submitted by: Andrew Plotkin     Appeared in: Library 6/11 or before     Fixed in: -
Problem

The problem comes with a command like PUT PURSE OF GOLD ON TABLE. The parser (parserm.h line 1696) has a comment "Advance past the last preposition". It does this in order to parse second=table, so that it can handle the multiexcept token correctly.

Good in theory, but it actually advances to the word "OF". Which is a preposition because of the grammar line "lie on top of noun". (And I believe we're adding "get off of noun".) It then accepts "gold on table" as the second noun token, and pops a disambiguation question -- even though "of" is not a valid preposition for "put X on Y".

Solution

The parser tests "(l->#dict_par1) &8", examining the preposition flag in the dictionary. It would be better if it instead searched for the specific preposition(s) in the grammar line it's testing.


Last updated 17 April 2013. This web site has not been fully supported since April 2008. Information may be out of date. This page was originally managed by Roger Firth.