Thanks! This is great stuff.
You have added many additional capabilities to the parser now. Are
you getting the correct types of output in ECB? Occasionally in the
past I've added support for a stray & or const in type definitions for
variables. Later, when one of the token->text functions are called,
it shows up in the wrong place. For C this has been one of the more
challenging aspects of translating C into a token, then back out
again. When last I ran tests, it was pretty good, but missing the
finer points of * and & placement. With all your new template and
const work it would be good to asses the situation.
You can easily check what the outputs are with the command
`semantic-test-all-token->text-functions' while the cursor is on a
definition in your C code.
>>> "Berndl, Klaus" <klaus.berndl@...> seems to think that:
>In the semantic CVS (branch v1p4!) a new C++-parser is available which
>has a lot of improvements compared to that one shipped with semantic <= 1.4.2.
>Just download semantic-c.el, remove the old version from the semantic install-dir
>and store the new one in this dir. If semantic is byte-compiled the new file
>has to be byte-compiled too!
>Here is the excerpt from the NEWS file:
>** Enhancements to the C/C++ grammar (now really complex C++ can be parsed)
>*** Fixed some aspects of 'using' (e.g. now "using namespace XXX" is possible)
>*** Fixed some aspects with namespaces, e.g. now unnamed namespaces are
> correct parsed and "unnamed" is added as type-name and namespace-qualified
> class-names are now allowed whereever it is necessary
>*** Better and complete handling of builtin-types, means better handling of
> signed and unsigned, supporting composed builtins like 'long int'
>*** Improved template parsing:
>**** Templates in combination with namespaces
>**** Outside method-implementations for template classes are now correct parsed
> and also correct grouped to the type of the template class-declaration
>**** Template-specifier can now contain normal args like "int i" which is very
>**** Template-specifiers are allowed in class-qualifiers
>*** Improving macro-parsing, i.e. now also multiline-macros (every line ending
> with a \) are parsed correctly; same for arbitrary one-liners
>*** C++ keyword 'typename' is recognized and parsed now
>*** operator()() and operator() are parsed correctly
>*** Better parsing of const and volatile (now also allowed to be after the type)
>*** Some minor fixes
>>You could replace the second declmods with opt-cv-qualifier (defined
>>in the obvious way). This would allow more invalid code to be found.
>>But I don't think it's really worth the trouble, your fix seems to
>>PS: Don't you think that Annex A (Grammar Summary) of the current C++
>>standard would be a better source for a rewrite of the C++ parser? At
>>least in theory... :-)
>To be best compliant with the C++-standard of course Annex A would be the
>best grammar. But i suppose that the gcc-grammar is available in bison-
>or bison-like format so its easier to port it to semantic because next
>semantic 2.0 has a bison->wisent ("Elisp Bison") converter. At least i think
>this could be a good reason to use gcc instead plain Annex A grammar?!
>This SF.NET email is sponsored by:
>SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
>cedet-semantic mailing list
Eric Ludlam: zappo@..., eric@...
Home: http://www.ludlam.net Siege: http://www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org