|
> You missed one---you could always use global variables and avoid Carg() or
> building a separate grammer entirely.
You can also use closures, avoiding global variables. The functions
in the pattern use external local variables, and some helper
functions allow you to change the values of these variables.
do
local X
function helperX (newx) X = newx end
-- your pattern goes here, using 'X'
...
end
-- Roberto