CommonTree char_literal35_tree = null;
CommonTree IDENT36_tree = null;
CommonTree char_literal37_tree = null;
CommonTree IDENT38_tree = null;
CommonTree IDENT39_tree = null;
RewriteRuleTokenStream stream_IDENT = new RewriteRuleTokenStream(adaptor, "token IDENT");
RewriteRuleTokenStream stream_35 = new RewriteRuleTokenStream(adaptor, "token 35");
RewriteRuleTokenStream stream_36 = new RewriteRuleTokenStream(adaptor, "token 36");
RewriteRuleTokenStream stream_37 = new RewriteRuleTokenStream(adaptor, "token 37");
try {
// /home/langera/dev/freud/src/grammar/Css.g:82:2: ( '*' -> ^( UNIVERSAL ) | '#' IDENT -> ^( ID IDENT ) | '.' IDENT -> ^( CLASS IDENT ) | IDENT -> ^( TAG IDENT ) )
int alt17 = 4;
switch (input.LA(1)) {
case 35: {
alt17 = 1;
}
break;
case 36: {
alt17 = 2;
}
break;
case 37: {
alt17 = 3;
}
break;
case IDENT: {
alt17 = 4;
}
break;
default:
NoViableAltException nvae =
new NoViableAltException("", 17, 0, input);
throw nvae;
}
switch (alt17) {
case 1:
// /home/langera/dev/freud/src/grammar/Css.g:82:4: '*'
{
char_literal34 = (Token) match(input, 35, FOLLOW_35_in_elem421);
stream_35.add(char_literal34);
// AST REWRITE
// elements:
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 82:8: -> ^( UNIVERSAL )
{
// /home/langera/dev/freud/src/grammar/Css.g:82:11: ^( UNIVERSAL )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot((CommonTree) adaptor.create(UNIVERSAL, "UNIVERSAL"), root_1);
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
break;
case 2:
// /home/langera/dev/freud/src/grammar/Css.g:83:4: '#' IDENT
{
char_literal35 = (Token) match(input, 36, FOLLOW_36_in_elem434);
stream_36.add(char_literal35);
IDENT36 = (Token) match(input, IDENT, FOLLOW_IDENT_in_elem436);
stream_IDENT.add(IDENT36);
// AST REWRITE
// elements: IDENT
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 83:14: -> ^( ID IDENT )
{
// /home/langera/dev/freud/src/grammar/Css.g:83:17: ^( ID IDENT )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot((CommonTree) adaptor.create(ID, "ID"), root_1);
adaptor.addChild(root_1, stream_IDENT.nextNode());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
break;
case 3:
// /home/langera/dev/freud/src/grammar/Css.g:84:4: '.' IDENT
{
char_literal37 = (Token) match(input, 37, FOLLOW_37_in_elem451);
stream_37.add(char_literal37);
IDENT38 = (Token) match(input, IDENT, FOLLOW_IDENT_in_elem453);
stream_IDENT.add(IDENT38);