Skip to content

Instantly share code, notes, and snippets.

@NotFound
Created April 25, 2012 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NotFound/2490975 to your computer and use it in GitHub Desktop.
Save NotFound/2490975 to your computer and use it in GitHub Desktop.
Testing dynamic lex with winxed
// dynamic lex test
function main [main]()
{
string lex[2];
var dynlex = lex;
${ .lex "dynlex", dynlex };
dynlex[0] = "main";
test();
say(dynlex);
test2();
say(dynlex);
}
function test()
{
var p0;
${ find_dynamic_lex p0, "dynlex" };
p0[1] = "test";
}
function test2()
{
string p0[1] = [ "test2 rules" ];
${ store_dynamic_lex "dynlex", p0 };
}
// End
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment