Re[1]: [cedet-semantic] Calling functions for default values in C++.
Brought to you by:
zappo
From: Eric M. L. <er...@si...> - 2002-06-04 12:27:54
|
>>> Thomas Maier <T....@ep...> seems to think that: >Hello again :) > >and yet another thing semantic does not parse. Not too bad as it >doesn't keep me from using ecb, but anyway. In C++ I can write > >int g(); >void f(int i=g()); > >However, semantic doesn't parse the "()" from "g()". I wrote a very >very simple fix for that because I do not have time to really create >something better. And, even worse, I do not know if this breaks >something else. Anyway, it might be the right place where a better fix >should be applied. > >I added function-call and changed expression: > > >function-call: symbol semantic-list > ; > ># Use expression for parsing only. Don't actually return anything ># for now. Hopefully we can fix this later. >expression : number > ( (identity start) (identity end) ) > | function-call > ( (identity start) (identity end) ) > | symbol > ( (identity start) (identity end) ) > | string > ( (identity start) (identity end)) > | type-cast expression # A cast to some other type > ( (identity start) (identity end) ) > | semantic-list > ( (identity start) (identity end) ) > | punctuation "[-+*/%^|&]" expression > ( (identity start) (identity end) ) > ; > > >But unfortunately I'm still not too comfortable with semantic and c.bnf >so beware and maybe you better ignore the fix and write a real one. [ ... ] That seems like a reasonable fix for this situation. The expression parser has always been a bit overly simple for the reason you cite above. Thanks Eric -- Eric Ludlam: za...@gn..., er...@si... Home: www.ultranet.com/~zappo Siege: www.siege-engine.com Emacs: http://cedet.sourceforge.net GNU: www.gnu.org |