Those of you familiar with compilers and
>language analisys might be aware of ANTLR. ANTLR is a free compiler
>compiler.
It should be exceptionally easy. Just insert a disregard rule witihin the
parser grammar (that eats comments i.e. does not tokenise the characters)..
this will disregard everything but the necessary Javascript. Also, all rules
could be written to automatically place a semi-colon at the end of each
valid Javascript statement e.g. (JavaCC code below, not ANTLR)
public void afterProcessing() {
if(!this.result.value.endsWith(";")) {
this.result.value += ";";
}
}
The biggest foreseeable pain will be to get the Javascript grammars for each
respective Browser combined into one parser (if they differ at all).. If the
exact grammars have been published then I will also have a go at producing a
JavaCC implementation of the code packer.
If any of you have pointers to the Javascript grammar specification mail me
back at [EMAIL PROTECTED] ta..
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev