Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] A util for expression evaluation in CDT?

Evaluating expressions is required for dealing correctly with generalized constant expressions. In https://bugs.eclipse.org/bugs/show_bug.cgi?id=332829 (still open) Sergey states that the evaluation of constexpr functions has been added (Comment 5). I currently can't access the repository, but if that functionality has not been revoked, there needs to be some kind of facility to do such evaluation. At least for simple expressions like requested below. Yet, I don't know if it is accessible from other plug-ins or whether it is internal.

________________________________________
Von: cdt-dev-bounces@xxxxxxxxxxx [cdt-dev-bounces@xxxxxxxxxxx]" im Auftrag von "Doug Schaefer [dschaefer@xxxxxxx]
Gesendet: Dienstag, 6. Mai 2014 15:52
An: CDT General developers list.
Betreff: Re: [cdt-dev] A util for expression evaluation in CDT?

We don't have a facility to evaluate expressions. That would be cool, though. We generally rely on the debugger to do things like that (gdb can, for example).

Doug.

________________________________________
From: cdt-dev-bounces@xxxxxxxxxxx [cdt-dev-bounces@xxxxxxxxxxx] on behalf of Nathan Ridge [zeratul976@xxxxxxxxxxx]
Sent: Tuesday, May 06, 2014 12:14 AM
To: CDT Mailing List
Subject: Re: [cdt-dev] A util for expression evaluation in CDT?

Hi Andrey,

> I need to evaluate a constant expression that is used to specify a size
> of an array in C. I have variable substitutions with constant values
> done and have a string of form “1+2*3”. Is there a utility in CDT I can
> use to evaluate the result of such expression?

It's not clear to me what you are asking.

Are you writing a plugin, and asking how to evaluate an expression
using the CDT API?

Or are you asking how can you, as a user of CDT, evalaute an
expression in the editor?

Regards,
Nate

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev

Back to the top