/** Some targets will have some extra scopes like C++ may have * '@headerfile:name {action}' or something. Make sure the * target likes the scopes in action table. */ protected void verifyActionScopesOkForTarget(Map<String, Map<String, Object>> actions) { for (Map.Entry<String, Map<String, Object>> entry : actions.entrySet()) { String scope = entry.getKey(); if ( !target.isValidActionScope(grammar.type, scope) ) { // get any action from the scope to get error location Map<String, Object> scopeActions = entry.getValue(); GrammarAST actionAST = (GrammarAST)scopeActions.values().iterator().next(); ErrorManager.grammarError( ErrorManager.MSG_INVALID_ACTION_SCOPE,grammar, actionAST.getToken(),scope, grammar.getGrammarTypeString()); } } }
/** Some targets will have some extra scopes like C++ may have * '@headerfile:name {action}' or something. Make sure the * target likes the scopes in action table. */ protected void verifyActionScopesOkForTarget(Map<String, Map<String, Object>> actions) { for (Map.Entry<String, Map<String, Object>> entry : actions.entrySet()) { String scope = entry.getKey(); if ( !target.isValidActionScope(grammar.type, scope) ) { // get any action from the scope to get error location Map<String, Object> scopeActions = entry.getValue(); GrammarAST actionAST = (GrammarAST)scopeActions.values().iterator().next(); ErrorManager.grammarError( ErrorManager.MSG_INVALID_ACTION_SCOPE,grammar, actionAST.getToken(),scope, grammar.getGrammarTypeString()); } } }
/** Some targets will have some extra scopes like C++ may have * '@headerfile:name {action}' or something. Make sure the * target likes the scopes in action table. */ protected void verifyActionScopesOkForTarget(Map actions) { Set actionScopeKeySet = actions.keySet(); for (Iterator it = actionScopeKeySet.iterator(); it.hasNext();) { String scope = (String)it.next(); if ( !target.isValidActionScope(grammar.type, scope) ) { // get any action from the scope to get error location Map scopeActions = (Map)actions.get(scope); GrammarAST actionAST = (GrammarAST)scopeActions.values().iterator().next(); ErrorManager.grammarError( ErrorManager.MSG_INVALID_ACTION_SCOPE,grammar, actionAST.getToken(),scope, grammar.getGrammarTypeString()); } } }
/** Some targets will have some extra scopes like C++ may have * '@headerfile:name {action}' or something. Make sure the * target likes the scopes in action table. */ protected void verifyActionScopesOkForTarget(Map actions) { Set actionScopeKeySet = actions.keySet(); for (Iterator it = actionScopeKeySet.iterator(); it.hasNext();) { String scope = (String)it.next(); if ( !target.isValidActionScope(grammar.type, scope) ) { // get any action from the scope to get error location Map scopeActions = (Map)actions.get(scope); GrammarAST actionAST = (GrammarAST)scopeActions.values().iterator().next(); ErrorManager.grammarError( ErrorManager.MSG_INVALID_ACTION_SCOPE,grammar, actionAST.getToken(),scope, grammar.getGrammarTypeString()); } } }
List<Grammar> allgrammars = composite.getRootGrammar().getDelegates(); for (Grammar delegate : allgrammars) { if ( target.isValidActionScope(delegate.type, scope) ) {
List<Grammar> allgrammars = composite.getRootGrammar().getDelegates(); for (Grammar delegate : allgrammars) { if ( target.isValidActionScope(delegate.type, scope) ) {
List<Grammar> allgrammars = composite.getRootGrammar().getDelegates(); for (Grammar delegate : allgrammars) { if ( target.isValidActionScope(delegate.type, scope) ) {