Re: Semantic parses function with default argument incorrectly
Eric Ludlam <[email protected]> Tue, 13 Sep 2016 19:12:31 -0400
| Newsgroups | gmane.emacs.semantic |
|---|---|
| Message-ID | <[email protected]> |
I committed your patch with just the simple formatting tests. I'm not familiar with that C++ syntax, and wasn't sure what a good example for the proto-impl toggle might be, though there is a nice test framework for it if there is a simple example. Thanks! Eric On 09/13/2016 04:24 AM, Bastian Beischer wrote: > Hello Eric, > > would it be acceptable to commit my patch to the CEDET repository? If > yes, could you please do it? :-) I don't have commit access. > > Cheers > Bastian > > On Fri, Sep 2, 2016 at 3:47 PM, Bastian Beischer > <[email protected] > <mailto:[email protected]>> wrote: > > Hi Eric, > > I found this issue because semantic-analyze-proto-impl-toggle was > unable to jump between declaration (which had the default value > assignment) and implementation (which didn't). > > I don't know if this makes a good test. > > Cheers > Bastian > > > Am 01.09.2016 03:22 schrieb "Eric Ludlam" <[email protected] > <mailto:[email protected]>>: > > Hi, > > I've experimented with your patch, and agree that this looks > like the right solution to me. > > I also added a test that this will both parse, and then the tag > will format itself correctly. > > Were there any completion related examples you might have I > could add for additional test coverage? > > Thanks > Eric > > On 08/30/2016 06:11 PM, Bastian Beischer wrote: > > I think I may have found the solution, but it would be great if > someone could check this patch: > > diff --git a/lisp/cedet/semantic/bovine/c.by <http://c.by> > b/lisp/cedet/semantic/bovine/c.by <http://c.by> > index 80ed2cf..6c4cea4 100644 > --- a/lisp/cedet/semantic/bovine/c.by <http://c.by> > +++ b/lisp/cedet/semantic/bovine/c.by <http://c.by> > @@ -1250,7 +1250,7 @@ unaryexpression > | multi-stage-dereference > | NEW multi-stage-dereference > | NEW builtintype-types semantic-list > - | symbol > + | namespace-symbol > ;; Klaus Berndl: C/C++ allows sequences of strings which are > ;; concatenated by the precompiler to one string > | string-seq > > On Tue, Aug 30, 2016 at 11:40 PM, Bastian Beischer > <[email protected] > <mailto:[email protected]>> wrote: > > The following piece of code is not correctly parsed by > semantic: > > namespace NS { > enum TestEnum {a,b}; > } > > void f(NS::TestEnum v = NS::a); > > This is with the current master branch of > http://git.code.sf.net/p/cedet/git > <http://git.code.sf.net/p/cedet/git>. > > The issue is that after parsing the buffer > 'semantic-describe-tag' on > the function 'f' reports: > > Functions: void f (NS::TestEnum v[=NS],a) > > "a" is interpreted as a second argument which is not > correct. The > version of semantic included in Emacs 25.1 RC 2 does not > show this > behavior. Instead it reports: > > Functions: void f (NS::TestEnum v[=NS]) > > which is also not correct, it should report the default > value as NS::a. > > I think the grammar needs tweaking? Any help on how to > fix this? > > Cheers > Bastian > > -- > Bastian Beischer > RWTH Aachen University of Technology > > @RWTH Aachen > Office: 28 C 203 > Phone: +49-241-80-27205 <tel:%2B49-241-80-27205> > E-mail: [email protected] > <mailto:[email protected]> > Address: I. Physikalisches Institut B, Sommerfeldstr. > 14, D-52074 Aachen > > @CERN > Office: Bdg 32-4-B12 > Phone: +41-22-76-75750 <tel:%2B41-22-76-75750> > E-mail: [email protected] > <mailto:[email protected]> > Address: CERN, CH-1211 Geneve 23 > > > > > > > > -- > Bastian Beischer > RWTH Aachen University of Technology > > @RWTH Aachen > Office: 28 C 203 > Phone: +49-241-80-27205 > E-mail: [email protected] > <mailto:[email protected]> > Address: I. Physikalisches Institut B, Sommerfeldstr. 14, D-52074 Aachen > > @CERN > Office: Bdg 32-4-B12 > Phone: +41-22-76-75750 > E-mail: [email protected] <mailto:[email protected]> > Address: CERN, CH-1211 Geneve 23 ------------------------------------------------------------------------------