Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buggy HBL parser 2 #3

Closed
spond opened this issue Sep 8, 2011 · 1 comment
Closed

Buggy HBL parser 2 #3

spond opened this issue Sep 8, 2011 · 1 comment
Assignees

Comments

@spond
Copy link
Member

spond commented Sep 8, 2011

Expressions that use inline object definitions (e.g. matrices, dictionaries, substituted strings) are evaluated once and not updated if the inline object definitions change between calls.

For example

for (k = 0; k < 10; k+=1)
{
    str = ""+k;
    substitutedString = "`str`-substituted";
    fprintf (stdout, substitutedString, "\n");
}

Prints 0-substituted 10 times.

@ghost ghost assigned spond Sep 8, 2011
@spond
Copy link
Member Author

spond commented Sep 13, 2011

This issue has been resolved by introducing 'volatile' commands into the HBL parser. Basically, anything that has an inline variable definition that could change between calls (a matrix or a dictionary or a string with variable substitutions via backquotes) is now NOT compiled into an internal representation, but rather re-parsed from the command string in every call.

The fix is in nlhepler@671a668

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant