1
-----------------------------------------------------------------------------------
2
-- Copyright (c) 2006, 2008 IBM Corporation and others.
3
-- All rights reserved. This program and the accompanying materials
4
-- are made available under the terms of the Eclipse Public License v1.0
5
-- which accompanies this distribution, and is available at
6
-- http://www.eclipse.org/legal/epl-v10.html
9
-- IBM Corporation - initial API and implementation
10
-----------------------------------------------------------------------------------
13
%options package=org.eclipse.cdt.internal.core.dom.lrparser.cpp
14
%options template=LRSecondaryParserTemplate.g
16
-- This parser is a bit of a hack.
18
-- There are ambiguities between type_parameter and parameter_declaration
19
-- when parsing a template_parameter.
21
-- I believe the correct disambiguation is to simply favor type_parameter
22
-- over parameter_declaration.
24
-- I have tried to resolve this by refactoring the grammar file so that
25
-- the parser will give precedence to type_parameter, but I have failed.
27
-- So the hacky solution is to reparse the tokens as a type_parameter and if
28
-- it succeeds, throw away the paramter_declaration and use the type_parameter
38
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateParameter;
43
$ast_class /. ICPPASTTemplateParameter ./
55
/. $Build consumeEmpty(); $EndBuild ./
b'\\ No newline at end of file'