CommonTree IDENT62_tree = null;
CommonTree char_literal63_tree = null;
CommonTree IDENT64_tree = null;
CommonTree char_literal65_tree = null;
CommonTree IDENT66_tree = null;
RewriteRuleTokenStream stream_IDENT = new RewriteRuleTokenStream(adaptor, "token IDENT");
RewriteRuleTokenStream stream_36 = new RewriteRuleTokenStream(adaptor, "token 36");
try {
// /home/langera/dev/freud/src/grammar/Css.g:112:2: ( ( IDENT unit ) | IDENT | '#' IDENT -> ^( COLOUR '#' IDENT ) | '.' IDENT | function )
int alt25 = 5;
alt25 = dfa25.predict(input);
switch (alt25) {
case 1:
// /home/langera/dev/freud/src/grammar/Css.g:112:4: ( IDENT unit )
{
root_0 = (CommonTree) adaptor.nil();
// /home/langera/dev/freud/src/grammar/Css.g:112:4: ( IDENT unit )
// /home/langera/dev/freud/src/grammar/Css.g:112:5: IDENT unit
{
IDENT60 = (Token) match(input, IDENT, FOLLOW_IDENT_in_expr670);
IDENT60_tree = (CommonTree) adaptor.create(IDENT60);
adaptor.addChild(root_0, IDENT60_tree);
pushFollow(FOLLOW_unit_in_expr672);
unit61 = unit();
state._fsp--;
adaptor.addChild(root_0, unit61.getTree());
}
}
break;
case 2:
// /home/langera/dev/freud/src/grammar/Css.g:113:4: IDENT
{
root_0 = (CommonTree) adaptor.nil();
IDENT62 = (Token) match(input, IDENT, FOLLOW_IDENT_in_expr678);
IDENT62_tree = (CommonTree) adaptor.create(IDENT62);
adaptor.addChild(root_0, IDENT62_tree);
}
break;
case 3:
// /home/langera/dev/freud/src/grammar/Css.g:114:4: '#' IDENT
{
char_literal63 = (Token) match(input, 36, FOLLOW_36_in_expr683);
stream_36.add(char_literal63);
IDENT64 = (Token) match(input, IDENT, FOLLOW_IDENT_in_expr685);
stream_IDENT.add(IDENT64);
// AST REWRITE
// elements: 36, 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();
// 114:14: -> ^( COLOUR '#' IDENT )
{
// /home/langera/dev/freud/src/grammar/Css.g:114:17: ^( COLOUR '#' IDENT )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot((CommonTree) adaptor.create(COLOUR, "COLOUR"), root_1);
adaptor.addChild(root_1, stream_36.nextNode());
adaptor.addChild(root_1, stream_IDENT.nextNode());
adaptor.addChild(root_0, root_1);
}