1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

switch back to trial/undo to expose bug

This commit is contained in:
Mike Kucera 2008-02-06 22:34:45 +00:00
parent c693b2518a
commit e6ce9e4053
4 changed files with 2906 additions and 1923 deletions

View file

@ -45,7 +45,6 @@ public class C99CompleteParser2Tests extends CompleteParser2Tests {
} catch(Exception _) { } catch(Exception _) {
return; return;
} }
fail(); fail();
} }

View file

@ -11,7 +11,7 @@
%options la=2 %options la=2
%options package=org.eclipse.cdt.internal.core.dom.lrparser.cpp %options package=org.eclipse.cdt.internal.core.dom.lrparser.cpp
%options template=btParserTemplateD.g %options template=TrialUndoParserTemplate.g
@ -148,7 +148,7 @@ $End
$Define $Define
-- These macros allow the template and header code to be customized by an extending parser. -- These macros allow the template and header code to be customized by an extending parser.
$ast_class /.Object./ $ast_class /.Object./
$additional_interfaces /. , IParserActionTokenProvider, IParser ./ $additional_interfaces /. ./
$build_action_class /. CPPBuildASTParserAction ./ $build_action_class /. CPPBuildASTParserAction ./
$resolve_action_class /. C99TypedefTrackerParserAction ./ $resolve_action_class /. C99TypedefTrackerParserAction ./
@ -176,9 +176,9 @@ $Define
$builder /. action.builder./ $builder /. action.builder./
-- comment out when using trial/undo -- comment out when using trial/undo
$Action /. $BeginAction ./ --$Action /. $BeginAction ./
$BeginFinal /. ./ --$BeginFinal /. ./
$EndFinal /. ./ --$EndFinal /. ./
$End $End
@ -188,8 +188,8 @@ $Headers
private $action_class action; private $action_class action;
// uncomment to use with backtracking parser // uncomment to use with backtracking parser
public $action_type() { // constructor //public $action_type() { // constructor
} //}
private void initActions(IASTTranslationUnit tu) { private void initActions(IASTTranslationUnit tu) {
// binding resolution actions need access to IASTName nodes, temporary // binding resolution actions need access to IASTName nodes, temporary
@ -199,7 +199,7 @@ $Headers
//action.builder.setTokenMap(CPPParsersym.orderedTerminalSymbols); //action.builder.setTokenMap(CPPParsersym.orderedTerminalSymbols);
// comment this line to use with backtracking parser // comment this line to use with backtracking parser
//setParserAction(action); setParserAction(action);
} }
@ -231,7 +231,7 @@ $Headers
action = null; action = null;
// Comment this line to use with backtracking parser // Comment this line to use with backtracking parser
//parserAction = null; parserAction = null;
return compNode; return compNode;
} }
@ -258,9 +258,9 @@ $Headers
// uncomment this method to use with backtracking parser // uncomment this method to use with backtracking parser
public List getRuleTokens() { //public List getRuleTokens() {
return Collections.unmodifiableList(getTokens().subList(getLeftSpan(), getRightSpan() + 1)); // return Collections.unmodifiableList(getTokens().subList(getLeftSpan(), getRightSpan() + 1));
} //}
./ ./

View file

@ -98,7 +98,7 @@ public abstract class BuildASTParserAction {
// turn debug tracing on and off // turn debug tracing on and off
// TODO move this into an AspectJ project // TODO move this into an AspectJ project
protected static final boolean TRACE_ACTIONS = false; protected static final boolean TRACE_ACTIONS = true;
protected static final boolean TRACE_AST_STACK = false; protected static final boolean TRACE_AST_STACK = false;