I'll give you a short answer now, and perhaps I'll have time to
investigate more fully later.
Compound statements, like
import this, that
needs to get expanded into multiple tags.
In wisent-java-tags.el, see the line:
semantic-tag-expand-function 'semantic-java-expand-tag
and the function semantic-java-expand-tag. If the import is modified to
have all the names in it, a python version the expand-tag function could
expand it into multiple tags.
The name list will need to explicitly start consing the names together.
See qualified_name_list in wisent-java-tags.wy for an example.
Good Luck
Eric
On 02/06/2012 01:06 PM, Thomas Bach wrote:
> Hello there,
>
> I tried to figure out, why in Python imports of the form
>
> import foo, bar
>
> are not properly handled and I narrowed it down to the following lines
> in semantic/wisent/python.wy:
>
> import_stmt
> : IMPORT dotted_as_name_list
> (INCLUDE-TAG $2 nil)
> | FROM dotted_name IMPORT star_or_import_as_name_list
> (INCLUDE-TAG $2 nil)
> ;
>
> ;; dotted_as_name (',' dotted_as_name)*
> dotted_as_name_list
> : dotted_as_name
> | dotted_as_name_list COMMA dotted_as_name
> ;
>
> `dotted_as_name_list' is only used by import_stmt, so I renamed it and
> tried to call the `INCLUDE-TAG' macro there:
>
> import_stmt
> : IMPORT dotted_as_name_import_list
> | FROM dotted_name IMPORT star_or_import_as_name_list
> (INCLUDE-TAG $2 nil)
> ;
>
> ;; dotted_as_name (',' dotted_as_name)*
> dotted_as_name_import_list
> : dotted_as_name
> (INCLUDE-TAG $1 nil)
> | dotted_as_name_import_list COMMA dotted_as_name
> (INCLUDE-TAG $3 nil)
> ;
>
> but, I cannot get this to work and I'm currently pretty lost in the info
> pages. Anyway, it seems like something that one who knows about
> semantic/wisent can solve in one minute. :)
>
> Regards,
> vince
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> cedet-semantic mailing list
> cedet-semantic@...
> https://lists.sourceforge.net/lists/listinfo/cedet-semantic
>
|