private void addExactActions ( Construction construction , ParserActionSet set , Map < Construction , ParserActionSet > actions ) { for ( Entry < Construction , ParserActionSet > entry : actions . entrySet ( ) ) { Construction c = entry . getKey ( ) ; if ( ! c . getName ( ) . equals ( construction . getName ( ) ) ) { // if name is not equal, it does obviously not fit... continue ; } if ( c . isNonTerminal ( ) != construction . isNonTerminal ( ) ) { // if the type is different, they do not fit either... continue ; } if ( construction . isNonTerminal ( ) ) { /* * if both are non-terminals, the names are the only criterion * for an exact match */ set . addActions ( entry . getValue ( ) ) ; continue ; } Terminal terminal = ( Terminal ) construction ; if ( terminal . getText ( ) == null ) { continue ; } Terminal t = ( Terminal ) c ; if ( grammar . isIgnoreCase ( ) ) { if ( terminal . getText ( ) . equalsIgnoreCase ( t . getText ( ) ) ) { set . addActions ( entry . getValue ( ) ) ; } } else { if ( terminal . getText ( ) . equals ( t . getText ( ) ) ) { set . addActions ( entry . getValue ( ) ) ; } } } }
This method adds all actions which are concrete what means that name and content match exactly .