On Wed, 25 Aug 2010, Hans Hagen wrote:
On 25-8-2010 12:07, Jaroslav Hajtmar wrote:Ok. Thanx Hans. I solve it with \#\type{patt} it look like as have it and therefore isnt problem.BUT now I have problem with \starttyping - \stoptyping environment too. here is example: This works OK... \starttyping c = re.compile([[ longstring <- ('[' {:eq: '='* :} '[' <close>) => void close <- ']' =eq ']' / . <close> ] ] , {void = function () return true end}) \stoptyping But when I add last row, then stop work and get error message: \starttyping c = re.compile([[ longstring <- ('[' {:eq: '='* :} '[' <close>) => void close <- ']' =eq ']' / . <close> ] ] , {void = function () return true end}) print(c:match'[==[]]===]]]]==]===[]') --> 17 \stoptyping Message error surprised me:mkiv happens to use === itself so either change your example to use 4 ='s or adapt this:\unprotect \def\!!bs{[=====[} \def\!!es{]=====]} \protect (i might even move to == instead of === as it's saves tokens)
Is there a more robust way to do this? Perhaps making the number of equal signs user configurable?
Aditya ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
