Re[1]: [CEDET-devel] Regression Test Generic tag format
Brought to you by:
zappo
From: Eric M. L. <er...@si...> - 2003-04-15 15:38:26
|
>>> Klaus Berndl <kla...@sd...> seems to think that: >On Mon, 14 Apr 2003, Eric M. Ludlam wrote: > >> >>> Klaus Berndl <kla...@sd...> seems to think that: >> >On Sat, 12 Apr 2003, Eric M. Ludlam wrote: >> > > >[...] > >> >Are there other slots beside tag-name, tag-type, tag-parents which should >> >be handled specially? > >[...] > >> >> For semantic 1.4, you could copy these functions w/ new names into >> regtest, and then for each 1.4 token: >> >> (apply 'semantic-tag-new-type TAG) >> >> to convert it into 2.0 format, then use the 2.0 converter to finish >> the job. > >I have checked in a new semantic-regtest.el which contains now a first try of >compatibility code which should work with semantic 2.0 and semantic 1.4. Now >the library should be able to run regression-tests also between semantic 1.4 >and semantic 2.0 grammars/parsers. A first test with semantic 1.4 looks good. > >But in general i think i could need some feedback about my changes if they are >senseful or which parts of my code could/must be written better or different. [ ... ] Hi, sorry for the delay. I think in a previous email you said that a 1.4 tag could not be passed into your convert function because of the tags format including properties, documentation, and an overlay. I think this assessment is correct and would cause problems so I am surprised (and glad) that you say it is working now. The code you have checked in like this: (or (fboundp 'semantic-tag-new-type) (defun semantic-tag-new-type (name type members parents &rest attributes) "See semantic 2.X for a description of this function." (apply 'semantic-tag name 'type :type type :members members :superclasses (car parents) :interfaces (cdr parents) attributes))) may need to be augmented to pre-strip the tag for the semantic 2.0 creator. I'm guessing something like this is needed (for the type class of token) (let ((tmp (copy-sequence inputtag))) (setcdr (nthcdr 4 tmp (semantic-token-type-extra-specs inputtag))) (funcall 'semantic-tag-new-type tmp)) which would rebuild the input tag as something compatible with the arguments to the new tag type. Ug, this is all very messy. It might be easier to just know you need to do this: (apply 'semantic-tag-new-type (semantic-token-name tag) (semantic-token-token tag) (semantic-token-type tag) (semantic-token-type-parts tag) (semantic-token-type-parent tag) (semantic-token-type-extra-specs tag)) Indeed, this is the type of mess that inspired us to change the tag format. 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 |