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
automated completion - choosing matching productions and the next token
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
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
 
Doucette, Charles  
View profile  
 More options Jun 13 2008, 6:57 pm
From: "Doucette, Charles" <cdouce...@vaultus.com>
Date: Fri, 13 Jun 2008 18:57:43 -0400
Local: Fri, Jun 13 2008 6:57 pm
Subject: [antlr-interest] automated completion - choosing matching productions and the next token

I am working on an editor for a language.
I have a grammar definition for a parser that builds a custom AST tree (not a standard Antlr AST tree).
The editor already uses the parser to  automatically flag syntax errors.

Is there any way to automatically determine
a) the current production
b) the current token based on the production
c) semantically choose the appropriate completions based on a) & b) above

The Eclipse Java editor and JDT do this all already, so I know the technology exists.
What I don't know is if it is based on fully automated parser technology (like from Antlr) or if it is based on simple heuristics
(like looking for an identifier after a "." or "=").

Thanks,
Chuck

________________________________

Charles E. Doucette *  617-399-1122 *  Vaultus Mobile Technologies, 263 Summer St., Boston, MA 02210 *  http://www.vaultus.com<http://www.vaultus.com/>


 
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.
Terence Parr  
View profile  
 More options Jun 14 2008, 3:19 am
From: Terence Parr <pa...@cs.usfca.edu>
Date: Sat, 14 Jun 2008 09:19:05 +0200
Local: Sat, Jun 14 2008 3:19 am
Subject: Re: [antlr-interest] automated completion - choosing matching productions and the next token
I'm supposed to be working on book while traveling but spent a few  
hours yesterday thinking about how useful NFAs of the grammar would  
be at runtime.  As we parse, I could update a ptr into the NFA and  
keep a stack of rulenames etc...  At any moment, one could ask the  
NFA for the set of next valid tokens.  This would make the generated  
code simpler as well since I wouldn't have to precompute all those  
damn bitsets for FOLLOWs (error handling sets).

Would be great for autocompletion and other stuff.

if i could do some lookahead prediction with it, i could also avoid  
generating synpreds as separate classes etc...

I'll try to put this together for 3.2

Ter
On Jun 14, 2008, at 12:57 AM, Doucette, Charles wrote:


 
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.
End of messages
« Back to Discussions « Newer topic     Older topic »