Hugo xverb grammar bug

This is a discussion / support forum for the Hugo programming language by Kent Tessman. Hugo is a powerful programming language for making text games / interactive fiction with multimedia support.

Hugo download links: https://www.generalcoffee.com/hugo
Roody Yogurt's Hugo Blog: https://notdeadhugo.blogspot.com
The Hugor interpreter by RealNC: http://ifwiki.org/index.php/Hugor

Moderators: Ice Cream Jonsey, joltcountry

Roody_Yogurt
Posts: 2180
Joined: Mon Apr 29, 2002 6:23 pm
Location: Milwaukee

Hugo xverb grammar bug

Post by Roody_Yogurt »

Yesterday, I tracked down a bug that had resulted in some unexpected behavior over the years (but not so unexpected that I thought there was necessarily anything wrong). I finally discovered that in grammar definitions like the following:

Code: Select all

xverb "record"
*                 DoRecordOnOff
* "on"\"off"       DoRecordOnOff
only the first line was correctly being understood as xverbs.

Breaking it up into two definitions does fix the problem, so the latest version of roodylib now pre-declares all of the troublesome grammar definitions.

I thought this was fairly important news so it gets its own thread. As always, you can get the latest release (v 2.3) at:
http://roody.gerynarsabode.org/notdead/ ... _suite.zip