kjs grammar change

Bernd Buschinski b.buschinski at googlemail.com
Wed Feb 29 15:22:36 GMT 2012


hi,

I am trying to change the kjs grammar to accept
var obj = {};
obj.for = 1;
which is valid

The attached diff works fine, but I am not sure if this is the 100% correct 
way, I am not even sure how the new Identifier is handled, I fear I am 
creating a memory leak?

Also there current is a problem with RESERVED
if we have 2 RESERVED keywords, like
a.enum = 1;
a.super = 2;
document.write(a.enum + " " + a.super)
it will output "2 2", which is wrong.

I could change the keywords.table but I am not sure if this the correct way.
Please give me some feedback or ideas on how to improve it :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20120229/cc4f8908/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grammar.diff
Type: text/x-patch
Size: 4928 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20120229/cc4f8908/attachment.bin>


More information about the kfm-devel mailing list