You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to closure-comp...@googlegroups.com
Is it possible to generate a CFG for code within a closure using only command line options? For example, with the following snippet: var f = function(){ ... }
...I get a CFG for the assignment to f, but not for whatever the code in { ... } is. I understand that these two CFGs would be unconnected, but that's fine for my purposes. It doesn't seem too complicated to me to make this modification, but I wanted to make sure I'm not missing something before I start hacking away.
Thanks, -Kyle
Mike Samuel
unread,
May 8, 2012, 4:03:03 PM5/8/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
If by CFG, you mean context-free grammar, the grammatical production
for { ... } in your example is the FunctionBody production as defined
at http://es5.github.com/#x13 I believe Rhino just uses
http://www.jarvana.com/jarvana/view/org/mozilla/rhino/1.7R3/rhino-1.7R3-javadoc.jar!/org/mozilla/javascript/ast/Block.html as the node type since it allows FunctionDeclarations in any block
which is not strictly allowed in ES5.
There are additional syntactic constraints around break/continue
labels and whether or not an enclosing function/program is in strict
mode that are not expressed in that grammar.
Alan Leung
unread,
May 10, 2012, 1:20:26 PM5/10/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to closure-comp...@googlegroups.com
If you are talking about the Control Flow Graph. You can run control flow analysis on any Node object to get one.