Hi Alex, Sebastian,
That works, but it doesn't look really nice, because i have large arrays
with objects that describe various widgets and regular expressions
belong to it. Is there any way to patch this issue in generator.py?
>> i have(as an example) following object:
>>
>> var text = [{'typ':'textfield', 'name':'date', 'regexp':/^[0-9]$/ }];
>>
>> with a regular expression in it.
>> generator.py throws following error:
>>
>> ....expected expression but found token/DIV: ...
>>
>> Any ideas why regular expression causes this error?
>>
>> Best Regards,
>> alex.d
as Sebastian already noticed, the tokenizer doesn't seem to detect
expressions in hash-maps.
I made a simple patch which should solve the problem. Alex, can you try it
on your application? If it doesn't break other code it could be
applied to the svn version.
Cheers,
Alessandro
--- tokenizer.orig.py 2006-09-23 21:58:32.000000000 +0200
+++ tokenizer.py 2006-09-23 22:08:08.000000000 +0200
@@ -27,7 +27,7 @@
S_REGEXP = "(\/[^\t\n\r\f\v]+?\/[mgi]*)"
S_REGEXP_A = "\.(match|search|split)\(" + S_REGEXP + "\)"
S_REGEXP_B = "\.(replace)\(" + S_REGEXP + ","
-S_REGEXP_C = "\s*=\s*" + S_REGEXP
+S_REGEXP_C = "\s*(=|:)\s*" + S_REGEXP
S_REGEXP_D = S_REGEXP + "\.(test|exec)\("
S_REGEXP_ALL = S_REGEXP_A + "|" + S_REGEXP_B + "|" + S_REGEXP_C + "|" +
S_REGEXP_D
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel