Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Kucera2009-04-20 18:24:34 +0000
committerMike Kucera2009-04-20 18:24:34 +0000
commit0a80b06634e712cbe7c7a5e3256e87db8b464594 (patch)
tree86faef3455a40a88a9843f4819cb14588f4aed92 /lrparser/org.eclipse.cdt.core.lrparser/grammar/template
parent21e1364cb500e824afcec492012db84094d92db5 (diff)
downloadorg.eclipse.cdt-0a80b06634e712cbe7c7a5e3256e87db8b464594.tar.gz
org.eclipse.cdt-0a80b06634e712cbe7c7a5e3256e87db8b464594.tar.xz
org.eclipse.cdt-0a80b06634e712cbe7c7a5e3256e87db8b464594.zip
[272950] [LR Parser] Add ability to pass properties to extending parsers and update (regenerate) the parsers to support this.
Diffstat (limited to 'lrparser/org.eclipse.cdt.core.lrparser/grammar/template')
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/grammar/template/LRParserTemplate.g10
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/grammar/template/LRSecondaryParserTemplate.g4
2 files changed, 7 insertions, 7 deletions
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/grammar/template/LRParserTemplate.g b/lrparser/org.eclipse.cdt.core.lrparser/grammar/template/LRParserTemplate.g
index f5be287b827..9c7070f74bc 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/grammar/template/LRParserTemplate.g
+++ b/lrparser/org.eclipse.cdt.core.lrparser/grammar/template/LRParserTemplate.g
@@ -296,7 +296,7 @@ $End
$Notice
-- Copied into all files generated by LPG
/./*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -353,17 +353,17 @@ $Headers
private IASTCompletionNode compNode;
- public $action_type(IScanner scanner, IDOMTokenMap tokenMap, IBuiltinBindingsProvider builtinBindingsProvider, IIndex index, Set<IParser.Options> options) {
- initActions(options);
+ public $action_type(IScanner scanner, IDOMTokenMap tokenMap, IBuiltinBindingsProvider builtinBindingsProvider, IIndex index, Map<String,String> properties) {
+ initActions(properties);
action.initializeTranslationUnit(scanner, builtinBindingsProvider, index);
CPreprocessorAdapter.runCPreprocessor(scanner, this, tokenMap);
}
- private void initActions(Set<IParser.Options> options) {
+ private void initActions(Map<String,String> properties) {
ScopedStack<Object> astStack = new ScopedStack<Object>();
action = new $build_action_class(this, astStack, $node_factory_create_expression, $parser_factory_create_expression);
- action.setParserOptions(options);
+ action.setParserProperties(properties);
$action_initializations
}
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/grammar/template/LRSecondaryParserTemplate.g b/lrparser/org.eclipse.cdt.core.lrparser/grammar/template/LRSecondaryParserTemplate.g
index b449829d1f6..50c66497a53 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/grammar/template/LRSecondaryParserTemplate.g
+++ b/lrparser/org.eclipse.cdt.core.lrparser/grammar/template/LRSecondaryParserTemplate.g
@@ -56,8 +56,8 @@ $Headers
addToken(new Token(null, 0, 0, $sym_type.TK_EOF_TOKEN));
}
- public $action_type(ITokenStream stream, Set<IParser.Options> options) { // constructor for creating secondary parser
- initActions(options);
+ public $action_type(ITokenStream stream, Map<String,String> properties) { // constructor for creating secondary parser
+ initActions(properties);
tokenMap = new TokenMap($sym_type.orderedTerminalSymbols, stream.getOrderedTerminalSymbols());
}

Back to the top