Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] cdt parser change in behavior

Hi,

The parser is not public API you should not be using it. If you need support for a specific language extension, you should make this part of CDT, configurable via ICPPParserExtensionConfiguration. See for example ICPPParserExtensionConfiguration.supportFunctionStyleAssembler().

 

In the parser, where a  ‘BacktrackException’ is caught, the token stream is also restored to a previously saved state. Therefore the change does not make a difference for the parser itself.

In that sense the change was not intentional.

Markus.

 

From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Graydon Carla-RZ1029
Sent: Mittwoch, 06. April 2011 00:30
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] cdt parser change in behavior
Importance: Low

 

I would like to find out if a behavioral change in the consume() methods in AbstractGNUSourceCodeParser class was intentional (v. 1.128 as part of https://bugs.eclipse.org/bugs/show_bug.cgi?id=264666).

 

The javadoc comments for consume(int) and consume(int, int) imply that a token will not be consumed unless token types match. This was the behavior for Ganymede, but for Helios both methods now consume the token regardless of whether or not there is a match. If this is intentional, then Freescale can work around it, but currently, we catch a BacktrackException in AbstractGNUSourceCodeParser.asmExpression() to handle some Freescale-specific syntax and the fact that the tokens are consumed regardless of a token type match is breaking our custom support.

 

Thanks. --Carla Graydon, Freescale Semiconductor

 


Back to the top