Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion CFGs with Closures
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mike Samuel  
View profile  
 More options May 8 2012, 4:03 pm
From: Mike Samuel <mikesam...@gmail.com>
Date: Tue, 8 May 2012 16:03:03 -0400
Local: Tues, May 8 2012 4:03 pm
Subject: Re: [closure-compiler-discuss] CFGs with Closures
2012/5/7  <kyle.t.de...@gmail.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

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.7...
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.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.