silent syntax errors/inform bug

silent syntax errors/inform bug

Postby adev » Tue Sep 01, 2015 2:07 am

I'm writing an Inform parser and use your codebase as a test to handle a large -mostly custom- codebase.

I stumbled across this line: add ( "Snake" ) to infections of tailweapon; <- note parens instead of braces

and while verifying what that is supposed to do noticed a probable inform bug - this line -according to my tests- does not do what you (or any sane person) would think it does....

Either use braces or remove the parens since you add only one entry anyway.

This problem appears several times in your code

add ( "Snake" ) to infections of tailweapon;
add ( "Triceratops" ) to infections of tailweapon;
add ( "Killer Whale" ) to infections of tailweapon;
add ( "Squid" ) to infections of tailweapon;
add ( "Reptaur" ) to infections of tailweapon;
adev
 
Posts: 3
Joined: Tue Sep 01, 2015 1:37 am

Re: silent syntax errors/inform bug

Postby TigerStripes » Tue Sep 01, 2015 4:39 pm

adev wrote:<syntax error w/tailweapon>

I appreciate the heads up on this. I'm quite certain this formatting worked in the past, as these were all creatures added fairly soon after the tailweapon feature was added. One of the debugging commands I've made (bfandi5) provides a list of all creatures falling into the various flag and marker lists. In the past, it would include those creatures, but checking it this morning instead found '(' listed several times. My guess would be that the most recent update to Inform caused this to no longer be parsed properly.

A fix for this will be sent out shortly.

---

Oh, I should also add that using us as a test for your parser is a good choice, given the extent of the material that we have, though I'd certainly recommend you use a few others as well. We do a lot of non-standard things with Inform (which is a plus for your testing), but you'll want to make sure you're testing those areas and features of Inform we don't use. One of the main ones is we don't handle inventory and objects as Inform normally does, nor do we use the spacial placement stuff (x is in the box, y is on the table and so on).

Please let us know how your development goes.
User avatar
TigerStripes
 
Posts: 592
Joined: Mon Dec 09, 2013 4:39 pm

Re: silent syntax errors/inform bug

Postby adev » Tue Sep 01, 2015 11:31 pm

np - thought you might want to know as the current behaviour breaks part of the game.

TigerStripes wrote:Oh, I should also add that using us as a test for your parser is a good choice, given the extent of the material that we have, though I'd certainly recommend you use a few others as well. We do a lot of non-standard things with Inform (which is a plus for your testing), but you'll want to make sure you're testing those areas and features of Inform we don't use. One of the main ones is we don't handle inventory and objects as Inform normally does, nor do we use the spacial placement stuff (x is in the box, y is on the table and so on).


Well I planned to handle these the standard way - containers have a list of objects they contain, and items a contained by property. in/on/part of relationships are just different variations of the same principle. Anything special I need to look out for?

TigerStripes wrote:Please let us know how your development goes.


The tokenizer currently reads through the complete source. This is then grouped in sentences/paragraphs/headings etc. Currently I work on transforming the when play begins sections to get a starting point for an input parser.

Which reminds me of another issue with your source - I had to add a hack for stuff like this "Section 3.1.1". The second dot should be treated as a line end since there is no language construct containing multiple dots that i know of. In fact an inform error message says that no dots at all are allowed in headings because of potential parsing issues. Beats me why you normally do not see this error then...
This error is less critical though since it does not affect the function of the game.
adev
 
Posts: 3
Joined: Tue Sep 01, 2015 1:37 am

Re: silent syntax errors/inform bug

Postby adev » Sat Oct 03, 2015 6:44 am

Found some more potential issues in your source while I was working on table/object export. These do add additional objects or create most likely unwanted names:

the scent of dirty bottle is "The dirty water smells a little off, but is still potable.". -> scent of dirty water
The icon of MasterMind is Figure of MasterMind_icon. -> icon of Master Mind
Now Pertho is resolved; -> remove now outside of rules, it creates the situation "Now Pertho" otherwise

Current progress:
when play begins sections running up to the first prompt in firefox:
Attachments
Clipboard01.png
Clipboard01.png (10.86 KiB) Viewed 15349 times
adev
 
Posts: 3
Joined: Tue Sep 01, 2015 1:37 am

Re: silent syntax errors/inform bug

Postby TigerStripes » Sun Oct 04, 2015 3:59 am

adev wrote:Found some more potential issues in your source while I was working on table/object export. These do add additional objects or create most likely unwanted names:

It took me a little bit to figure out what you meant with some of these, as my mind would auto-substitute the expected text. They've been found and resolved. Thanks for pointing these out.

when play begins sections running up to the first prompt in firefox:

My guess is that this is an issue with your interpreter, as the 'yes or no message' should be displaying the hyperlink choice: "yes or no" That's what the [yes or no message] is. I believe it was done in this manner to prevent some interpreters from having a shit fit because of the hyperlinks if they cannot handle them, so it sounds like you'll be working on hyperlinks soon.
User avatar
TigerStripes
 
Posts: 592
Joined: Mon Dec 09, 2013 4:39 pm


Return to Dev Chat

Who is online

Users browsing this forum: No registered users and 14 guests