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:
parent
c693b2518a
commit
e6ce9e4053
4 changed files with 2906 additions and 1923 deletions
|
@ -45,7 +45,6 @@ public class C99CompleteParser2Tests extends CompleteParser2Tests {
|
|||
} catch(Exception _) {
|
||||
return;
|
||||
}
|
||||
|
||||
fail();
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
%options la=2
|
||||
%options package=org.eclipse.cdt.internal.core.dom.lrparser.cpp
|
||||
%options template=btParserTemplateD.g
|
||||
%options template=TrialUndoParserTemplate.g
|
||||
|
||||
|
||||
|
||||
|
@ -148,7 +148,7 @@ $End
|
|||
$Define
|
||||
-- These macros allow the template and header code to be customized by an extending parser.
|
||||
$ast_class /.Object./
|
||||
$additional_interfaces /. , IParserActionTokenProvider, IParser ./
|
||||
$additional_interfaces /. ./
|
||||
|
||||
$build_action_class /. CPPBuildASTParserAction ./
|
||||
$resolve_action_class /. C99TypedefTrackerParserAction ./
|
||||
|
@ -176,9 +176,9 @@ $Define
|
|||
$builder /. action.builder./
|
||||
|
||||
-- comment out when using trial/undo
|
||||
$Action /. $BeginAction ./
|
||||
$BeginFinal /. ./
|
||||
$EndFinal /. ./
|
||||
--$Action /. $BeginAction ./
|
||||
--$BeginFinal /. ./
|
||||
--$EndFinal /. ./
|
||||
|
||||
$End
|
||||
|
||||
|
@ -188,8 +188,8 @@ $Headers
|
|||
private $action_class action;
|
||||
|
||||
// uncomment to use with backtracking parser
|
||||
public $action_type() { // constructor
|
||||
}
|
||||
//public $action_type() { // constructor
|
||||
//}
|
||||
|
||||
private void initActions(IASTTranslationUnit tu) {
|
||||
// binding resolution actions need access to IASTName nodes, temporary
|
||||
|
@ -199,7 +199,7 @@ $Headers
|
|||
//action.builder.setTokenMap(CPPParsersym.orderedTerminalSymbols);
|
||||
|
||||
// comment this line to use with backtracking parser
|
||||
//setParserAction(action);
|
||||
setParserAction(action);
|
||||
}
|
||||
|
||||
|
||||
|
@ -231,7 +231,7 @@ $Headers
|
|||
action = null;
|
||||
|
||||
// Comment this line to use with backtracking parser
|
||||
//parserAction = null;
|
||||
parserAction = null;
|
||||
|
||||
return compNode;
|
||||
}
|
||||
|
@ -258,9 +258,9 @@ $Headers
|
|||
|
||||
|
||||
// uncomment this method to use with backtracking parser
|
||||
public List getRuleTokens() {
|
||||
return Collections.unmodifiableList(getTokens().subList(getLeftSpan(), getRightSpan() + 1));
|
||||
}
|
||||
//public List getRuleTokens() {
|
||||
// return Collections.unmodifiableList(getTokens().subList(getLeftSpan(), getRightSpan() + 1));
|
||||
//}
|
||||
|
||||
|
||||
./
|
||||
|
|
|
@ -98,7 +98,7 @@ public abstract class BuildASTParserAction {
|
|||
|
||||
// turn debug tracing on and off
|
||||
// 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;
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue