At 11:39 AM 4/24/00 -0400, you wrote:
>Would that be something that would be worth the time to make
>configurable?


The JDE has a function, jde-make-imenu-patterns, that generates the regular
expressions used by imenu to index the contents of a jde-mode Java source
buffer. (speedbar uses the imenu index by default). The next release will
allow you to specify your own regex generator function for imenu. The idea
is that you could take the standard pattern generator and modify it to suit
your needs.

As a longer term solution, I am currently experimenting with the bovinator,
Eric Ludlam's new parser generator for Emacs. The bovinator is conceptually
similar to yacc and bison. It accepts a BNF grammar and outputs a parser
for a language that conforms to that grammar. The beauty of the bovinator
is that the parsers emitted by the bovinator are coded  in Emacs Lisp
rather than C.  This means that Emacs can run the parser directly on the
contents of the buffer. Further the generated parsers are potentially much
speedier and more accurate than are regular expressions. I am currently
creating a basic grammar for Java and plan to include a parser-generated
index for speedbar as an option in the next release of the JDE.

- Paul


>Jeff
>
>Paul Kinnucan wrote:
>> 
>> At 02:25 PM 4/19/00 -0500, you wrote:
>> >>>>
>> 
>>      Paul,
>> 
>>      Thanks for your response. Here is a (correctly formed) method that 
>does not seem to show up in the speedbar:
>>      /**
>>      * Returns a server communication manager object which allows the
user of
>>      * this task context to monitor or control a Metaphase method server
>>      * throughout the duration of one or more Metaphase method calls.
>>      */
>>      public final _ServerCommunicationMgr _getServerCommunicationMgr()
>> 
>> ^
>> 
>> Here is the problem. The regular expressions used to index a buffer assume 
>the convention that class names begin with a capital letter. Variable names 
>are assumed to begin with an underscore or lower case letter. If I modify 
>the regular expressions to allow class names to begin with an underscore, 
>the indexer will not be able to differentiate between class names and 
>variable names and this will invalidate all of the regular expressions. The 
>dilemma is either variable names or class names can begin with an 
>underscore, but not both. If your coding convention allows class names but 
>not variables to begin with underscores, it would be feasible to alter the 
>regular expressions to support your convention.
>> 
>> - Paul

------------------------------------------------------------
TECH SUPPORT POLICY

I respond only to requests that contain a complete problem report. The
easiest way to ensure that your report is complete is to include the output
of the JDE->Help->Submit Problem Report command in your request. 

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

JDE website: http://sunsite.auc.dk/jde/

JDE mailing list archive: 
http://www.mail-archive.com/[email protected]/maillist.html


Reply via email to