Re[3]: [cedet-semantic] Trying to add a new language
Brought to you by:
zappo
From: Eric M. L. <er...@si...> - 2004-01-19 00:45:07
|
>>> myr...@us... seems to think that: >Eric M. Ludlam writes: [ ... ] > > Are line-endings important. You may need to add semantic-lex-newline > > into your lexer, instead of semantic-lex-ignore-newline. > >Yes. > >I've been reading over the docs that I have and I'm trying to get >the hang of this, there are -- though -- few things I'm not sure >about: > >* The relationship between what I put in .by files and what ECB > displays in it's "Methods" buffer. > > Or in other words, the relationship between the tag table and > semantic-symbol->name-assoc-list (I think). Every tag has a "class". The class of a tag is a symbol. Semantic defines a set of classes which are pretty common among languages, and then uses that standard to perform the more complicated tasks. Some default classes include 'function, 'variable, and 'type. See the 'Tag Structure' and 'Tag Basics' nodes in the doc. For creating tags, see the 'Creating Tags' node which, as I look in the doc, appears to be in the wrong place. Oi. Anyway, the assoc list you identified is a way of translating a tag class with some more descriptive string. The string is then used by imenu, summary strings, and a few other things. I do not know what ECB uses. For example, in C, a function has a string "Functions", representing a nicely formatted way to describe a bunch of them. A Makefile on the other hand says they are "Rules" despite classifying them as functions. >* TAG, in the docs there are mentions of EXPAND, EXPANDFULL and ASSOC > but no TAG (in the "Optional Lambda Expressions"). > > I assume that TAG is new since 1.4 then. Correct. In 1.4, the TAG entity was implied. All commands you identified are macros that translate into Emacs Lisp code when you build your grammar. If you look in the `Creating Tags' node, if a function is `semantic-tag-new-code' then there is a macro that would be `TAG-CODE' with the same arguments. I will update the doc to also include these macros. > [ ... ] > > > Getting a bovine or wisent parser to work by parsing the entire file > > is that syntax errors will be highlighted as you make them. Nifty! > >Yes, and when I've got something that works for this -- I'm pretty >sure I'll start to add support for MuPAD (mathematical language) and >perhaps some more. [ ... ] That sounds pretty spiff to me! I know I got carried away and implemented several languages once I got the system working. Good Luck Eric -- Eric Ludlam: za...@gn..., er...@si... Home: http://www.ludlam.net Siege: www.siege-engine.com Emacs: http://cedet.sourceforge.net GNU: www.gnu.org |