diff options
author | Marc Englund <marc@vaadin.com> | 2012-10-04 15:49:12 +0300 |
---|---|---|
committer | Marc Englund <marc@vaadin.com> | 2012-10-04 15:49:12 +0300 |
commit | 43256e1e897313b4a323f6f231a699c108b8e0a7 (patch) | |
tree | 2e5330552611d8b64ade4e021fd8d4f2ba4ee3bc /theme-compiler | |
parent | c380ecbe45dbb507e12f5cf22c72313229e66530 (diff) | |
download | vaadin-framework-43256e1e897313b4a323f6f231a699c108b8e0a7.tar.gz vaadin-framework-43256e1e897313b4a323f6f231a699c108b8e0a7.zip |
Fully fixes #9846, sass mixins with multiple optional params (author: seba)
Change-Id: I8330c6c0a7022b3485bbfee5c6a4833ef5cb4e1d
Diffstat (limited to 'theme-compiler')
-rw-r--r-- | theme-compiler/src/com/vaadin/sass/parser/Parser.java | 1221 | ||||
-rw-r--r-- | theme-compiler/src/com/vaadin/sass/parser/Parser.jj | 67 | ||||
-rw-r--r-- | theme-compiler/tests/resources/scss/mixins.scss | 2 |
3 files changed, 679 insertions, 611 deletions
diff --git a/theme-compiler/src/com/vaadin/sass/parser/Parser.java b/theme-compiler/src/com/vaadin/sass/parser/Parser.java index eb4c52ae0d..f5a2e4e432 100644 --- a/theme-compiler/src/com/vaadin/sass/parser/Parser.java +++ b/theme-compiler/src/com/vaadin/sass/parser/Parser.java @@ -3111,6 +3111,7 @@ boolean isPseudoElement = false; final public ArrayList<VariableNode> arglist() throws ParseException { ArrayList<VariableNode> args = new ArrayList<VariableNode>(); VariableNode arg; + boolean hasNonOptionalArgument = false; arg = mixinArg(); label_89: while (true) { @@ -3135,83 +3136,100 @@ boolean isPseudoElement = false; } jj_consume_token(S); } - args.add(arg); + hasNonOptionalArgument = checkMixinForNonOptionalArguments(arg, hasNonOptionalArgument); args.add(arg); arg = mixinArg(); } - args.add(arg); + hasNonOptionalArgument = checkMixinForNonOptionalArguments(arg, hasNonOptionalArgument); args.add(arg); {if (true) return args;} throw new Error("Missing return statement in function"); } - void checkMixinOptionalArguments(LexicalUnitImpl arg, String name) throws ParseException { - boolean currentArgHasArguments = arg.getLexicalUnitType() == LexicalUnitImpl.SCSS_VARIABLE; + boolean checkMixinForNonOptionalArguments(VariableNode arg, boolean hasNonOptionalArguments) throws ParseException { + boolean currentArgHasArguments = arg.getExpr() != null && arg.getExpr().getLexicalUnitType() == LexicalUnitImpl.SCSS_VARIABLE && arg.getExpr().getNextLexicalUnit() != null; if(currentArgHasArguments) { - throw new ParseException("Sass Error: Required argument "+ name +" must come before any optional arguments."); + if(hasNonOptionalArguments) + { + throw new ParseException("Sass Error: Required argument $"+ arg.getName() +" must come before any optional arguments."); + } + return hasNonOptionalArguments; + }else + { + return true; } } final public VariableNode mixinArg() throws ParseException { String name; + Token variable = null; LexicalUnitImpl first = null; - LexicalUnitImpl next = null; LexicalUnitImpl prev = null; + LexicalUnitImpl next = null; name = variableName(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COLON: - jj_consume_token(COLON); - label_91: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S: - ; - break; - default: - jj_la1[139] = jj_gen; - break label_91; - } - jj_consume_token(S); - } - first = term(null); - prev = first; - label_92: - while (true) { - if (jj_2_10(2)) { - ; - } else { - break label_92; + case VARIABLE: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COLON: + jj_consume_token(COLON); + label_91: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[139] = jj_gen; + break label_91; + } + jj_consume_token(S); } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - jj_consume_token(COMMA); - label_93: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S: - ; - break; - default: - jj_la1[140] = jj_gen; - break label_93; + first = nonVariableTerm(null); + prev = first; + label_92: + while (true) { + if (jj_2_10(3)) { + ; + } else { + break label_92; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: + jj_consume_token(COMMA); + label_93: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[140] = jj_gen; + break label_93; + } + jj_consume_token(S); } - jj_consume_token(S); + break; + default: + jj_la1[141] = jj_gen; + ; } - break; - default: - jj_la1[141] = jj_gen; - ; + prev = nonVariableTerm(prev); } - next = term(prev); - if(next.getLexicalUnitType() == LexicalUnitImpl.SCSS_VARIABLE) - { - {if (true) throw new ParseException("Sass Error: Required argument "+ next.toString() +" must come before any optional arguments.");} - } - prev.setNextLexicalUnit(next); prev = next; + break; + case VARIABLE: + variable = jj_consume_token(VARIABLE); + first = LexicalUnitImpl.createVariable(token.beginLine, token.beginColumn, + prev, variable.image); + break; + default: + jj_la1[142] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); } break; default: - jj_la1[142] = jj_gen; + jj_la1[143] = jj_gen; ; } VariableNode arg = new VariableNode(name, first, false); @@ -3260,7 +3278,7 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[143] = jj_gen; + jj_la1[144] = jj_gen; break label_94; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -3273,14 +3291,14 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[144] = jj_gen; + jj_la1[145] = jj_gen; break label_95; } jj_consume_token(S); } break; default: - jj_la1[145] = jj_gen; + jj_la1[146] = jj_gen; ; } next = term(prev); @@ -3293,7 +3311,7 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[146] = jj_gen; + jj_la1[147] = jj_gen; break label_96; } jj_consume_token(COMMA); @@ -3304,7 +3322,7 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[147] = jj_gen; + jj_la1[148] = jj_gen; break label_97; } jj_consume_token(S); @@ -3345,7 +3363,7 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[148] = jj_gen; + jj_la1[149] = jj_gen; break label_98; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -3358,14 +3376,14 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[149] = jj_gen; + jj_la1[150] = jj_gen; break label_99; } jj_consume_token(S); } break; default: - jj_la1[150] = jj_gen; + jj_la1[151] = jj_gen; ; } next = term(prev); @@ -3387,7 +3405,7 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[151] = jj_gen; + jj_la1[152] = jj_gen; break label_100; } jj_consume_token(S); @@ -3402,7 +3420,7 @@ boolean isPseudoElement = false; jj_consume_token(RPARAN); break; default: - jj_la1[152] = jj_gen; + jj_la1[153] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -3416,7 +3434,7 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[153] = jj_gen; + jj_la1[154] = jj_gen; break label_102; } jj_consume_token(S); @@ -3426,7 +3444,7 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[154] = jj_gen; + jj_la1[155] = jj_gen; break label_101; } } @@ -3451,7 +3469,7 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[155] = jj_gen; + jj_la1[156] = jj_gen; break label_103; } jj_consume_token(S); @@ -3464,7 +3482,7 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[156] = jj_gen; + jj_la1[157] = jj_gen; break label_104; } jj_consume_token(S); @@ -3477,7 +3495,7 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[157] = jj_gen; + jj_la1[158] = jj_gen; break label_105; } jj_consume_token(S); @@ -3488,7 +3506,7 @@ boolean isPseudoElement = false; jj_consume_token(RPARAN); break; default: - jj_la1[158] = jj_gen; + jj_la1[159] = jj_gen; ; } jj_consume_token(COMMA); @@ -3499,7 +3517,7 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[159] = jj_gen; + jj_la1[160] = jj_gen; break label_106; } jj_consume_token(S); @@ -3515,7 +3533,7 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[160] = jj_gen; + jj_la1[161] = jj_gen; break label_107; } jj_consume_token(S); @@ -3529,14 +3547,14 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[161] = jj_gen; + jj_la1[162] = jj_gen; break label_108; } jj_consume_token(S); } break; default: - jj_la1[162] = jj_gen; + jj_la1[163] = jj_gen; ; } jj_consume_token(RPARAN); @@ -3547,7 +3565,7 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[163] = jj_gen; + jj_la1[164] = jj_gen; break label_109; } jj_consume_token(S); @@ -3560,7 +3578,7 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[164] = jj_gen; + jj_la1[165] = jj_gen; break label_110; } jj_consume_token(S); @@ -3673,7 +3691,7 @@ boolean isPseudoElement = false; exclusive = false; break; default: - jj_la1[165] = jj_gen; + jj_la1[166] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -3685,7 +3703,7 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[166] = jj_gen; + jj_la1[167] = jj_gen; break label_111; } jj_consume_token(S); @@ -3714,7 +3732,7 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[167] = jj_gen; + jj_la1[168] = jj_gen; break label_112; } jj_consume_token(S); @@ -3730,7 +3748,7 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[168] = jj_gen; + jj_la1[169] = jj_gen; break label_114; } jj_consume_token(S); @@ -3740,7 +3758,7 @@ boolean isPseudoElement = false; ; break; default: - jj_la1[169] = jj_gen; + jj_la1[170] = jj_gen; break label_113; } } @@ -3775,7 +3793,7 @@ LexicalUnit exp; ; break; default: - jj_la1[170] = jj_gen; + jj_la1[171] = jj_gen; break label_115; } jj_consume_token(S); @@ -3788,7 +3806,7 @@ LexicalUnit exp; ; break; default: - jj_la1[171] = jj_gen; + jj_la1[172] = jj_gen; break label_116; } jj_consume_token(S); @@ -3799,7 +3817,7 @@ LexicalUnit exp; declaration(); break; default: - jj_la1[172] = jj_gen; + jj_la1[173] = jj_gen; ; } label_117: @@ -3809,7 +3827,7 @@ LexicalUnit exp; ; break; default: - jj_la1[173] = jj_gen; + jj_la1[174] = jj_gen; break label_117; } jj_consume_token(SEMICOLON); @@ -3820,7 +3838,7 @@ LexicalUnit exp; ; break; default: - jj_la1[174] = jj_gen; + jj_la1[175] = jj_gen; break label_118; } jj_consume_token(S); @@ -3830,7 +3848,7 @@ LexicalUnit exp; declaration(); break; default: - jj_la1[175] = jj_gen; + jj_la1[176] = jj_gen; ; } } @@ -3843,7 +3861,7 @@ LexicalUnit exp; ; break; default: - jj_la1[176] = jj_gen; + jj_la1[177] = jj_gen; break label_119; } jj_consume_token(S); @@ -3870,7 +3888,7 @@ LexicalUnit exp; ; break; default: - jj_la1[177] = jj_gen; + jj_la1[178] = jj_gen; break label_120; } jj_consume_token(S); @@ -3909,7 +3927,7 @@ LexicalUnit exp; important = prio(); break; default: - jj_la1[178] = jj_gen; + jj_la1[179] = jj_gen; ; } Token next = getToken(1); @@ -3934,7 +3952,7 @@ LexicalUnit exp; ; break; default: - jj_la1[179] = jj_gen; + jj_la1[180] = jj_gen; break label_121; } jj_consume_token(S); @@ -3945,7 +3963,7 @@ LexicalUnit exp; declaration(); break; default: - jj_la1[180] = jj_gen; + jj_la1[181] = jj_gen; ; } label_122: @@ -3955,7 +3973,7 @@ LexicalUnit exp; ; break; default: - jj_la1[181] = jj_gen; + jj_la1[182] = jj_gen; break label_122; } jj_consume_token(SEMICOLON); @@ -3966,7 +3984,7 @@ LexicalUnit exp; ; break; default: - jj_la1[182] = jj_gen; + jj_la1[183] = jj_gen; break label_123; } jj_consume_token(S); @@ -3976,7 +3994,7 @@ LexicalUnit exp; declaration(); break; default: - jj_la1[183] = jj_gen; + jj_la1[184] = jj_gen; ; } } @@ -3988,7 +4006,7 @@ LexicalUnit exp; ; break; default: - jj_la1[184] = jj_gen; + jj_la1[185] = jj_gen; break label_124; } jj_consume_token(S); @@ -3996,7 +4014,7 @@ LexicalUnit exp; documentHandler.endNestedProperties(name); break; default: - jj_la1[185] = jj_gen; + jj_la1[186] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -4053,7 +4071,7 @@ LexicalUnit exp; ; break; default: - jj_la1[186] = jj_gen; + jj_la1[187] = jj_gen; break label_125; } jj_consume_token(S); @@ -4064,7 +4082,7 @@ LexicalUnit exp; important = prio(); break; default: - jj_la1[187] = jj_gen; + jj_la1[188] = jj_gen; ; } documentHandler.property(name, exp, important); @@ -4114,7 +4132,7 @@ LexicalUnit exp; ; break; default: - jj_la1[188] = jj_gen; + jj_la1[189] = jj_gen; break label_126; } jj_consume_token(S); @@ -4132,7 +4150,7 @@ LexicalUnit exp; ; break; default: - jj_la1[189] = jj_gen; + jj_la1[190] = jj_gen; break label_127; } jj_consume_token(S); @@ -4156,7 +4174,7 @@ LexicalUnit exp; ; break; default: - jj_la1[190] = jj_gen; + jj_la1[191] = jj_gen; break label_128; } jj_consume_token(S); @@ -4174,7 +4192,7 @@ LexicalUnit exp; ; break; default: - jj_la1[191] = jj_gen; + jj_la1[192] = jj_gen; break label_129; } jj_consume_token(S); @@ -4184,7 +4202,7 @@ LexicalUnit exp; prev);} break; default: - jj_la1[192] = jj_gen; + jj_la1[193] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -4212,7 +4230,7 @@ LexicalUnit exp; res = operator(res); break; default: - jj_la1[193] = jj_gen; + jj_la1[194] = jj_gen; ; } res = term(res); @@ -4235,7 +4253,7 @@ LexicalUnit exp; {if (true) return '+';} break; default: - jj_la1[194] = jj_gen; + jj_la1[195] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -4249,7 +4267,6 @@ LexicalUnit exp; LexicalUnitImpl result = null; Token n = null; char op = ' '; - String varName; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: case MINUS: @@ -4277,125 +4294,153 @@ LexicalUnit exp; case HASH: case UNICODERANGE: case FUNCTION: + result = nonVariableTerm(prev); + break; + case VARIABLE: + result = variableTerm(prev); + break; + default: + jj_la1[196] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + {if (true) return result;} + throw new Error("Missing return statement in function"); + } + + final public LexicalUnitImpl variableTerm(LexicalUnitImpl prev) throws ParseException { + LexicalUnitImpl result = null; + String varName = ""; + varName = variableName(); + result = LexicalUnitImpl.createVariable(token.beginLine, token.beginColumn, + prev, varName); {if (true) return result;} + throw new Error("Missing return statement in function"); + } + + final public LexicalUnitImpl nonVariableTerm(LexicalUnitImpl prev) throws ParseException { +LexicalUnitImpl result = null; + Token n = null; + char op = ' '; + String varName; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case PLUS: + case MINUS: + case NUMBER: + case PERCENTAGE: + case PT: + case MM: + case CM: + case PC: + case IN: + case PX: + case EMS: + case EXS: + case DEG: + case RAD: + case GRAD: + case MS: + case SECOND: + case HZ: + case KHZ: + case DIMEN: + case FUNCTION: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: case MINUS: + op = unaryOperator(); + break; + default: + jj_la1[197] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case NUMBER: - case PERCENTAGE: - case PT: - case MM: - case CM: - case PC: - case IN: - case PX: - case EMS: - case EXS: - case DEG: - case RAD: - case GRAD: - case MS: - case SECOND: - case HZ: - case KHZ: - case DIMEN: - case FUNCTION: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case PLUS: - case MINUS: - op = unaryOperator(); - break; - default: - jj_la1[195] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case NUMBER: - n = jj_consume_token(NUMBER); + n = jj_consume_token(NUMBER); result = LexicalUnitImpl.createNumber(n.beginLine, n.beginColumn, prev, number(op, n, 0)); - break; - case PERCENTAGE: - n = jj_consume_token(PERCENTAGE); + break; + case PERCENTAGE: + n = jj_consume_token(PERCENTAGE); result = LexicalUnitImpl.createPercentage(n.beginLine, n.beginColumn, prev, number(op, n, 1)); - break; - case PT: - n = jj_consume_token(PT); + break; + case PT: + n = jj_consume_token(PT); result = LexicalUnitImpl.createPT(n.beginLine, n.beginColumn, prev, number(op, n, 2)); - break; - case CM: - n = jj_consume_token(CM); + break; + case CM: + n = jj_consume_token(CM); result = LexicalUnitImpl.createCM(n.beginLine, n.beginColumn, prev, number(op, n, 2)); - break; - case MM: - n = jj_consume_token(MM); + break; + case MM: + n = jj_consume_token(MM); result = LexicalUnitImpl.createMM(n.beginLine, n.beginColumn, prev, number(op, n, 2)); - break; - case PC: - n = jj_consume_token(PC); + break; + case PC: + n = jj_consume_token(PC); result = LexicalUnitImpl.createPC(n.beginLine, n.beginColumn, prev, number(op, n, 2)); - break; - case IN: - n = jj_consume_token(IN); + break; + case IN: + n = jj_consume_token(IN); result = LexicalUnitImpl.createIN(n.beginLine, n.beginColumn, prev, number(op, n, 2)); - break; - case PX: - n = jj_consume_token(PX); + break; + case PX: + n = jj_consume_token(PX); result = LexicalUnitImpl.createPX(n.beginLine, n.beginColumn, prev, number(op, n, 2)); - break; - case EMS: - n = jj_consume_token(EMS); + break; + case EMS: + n = jj_consume_token(EMS); result = LexicalUnitImpl.createEMS(n.beginLine, n.beginColumn, prev, number(op, n, 2)); - break; - case EXS: - n = jj_consume_token(EXS); + break; + case EXS: + n = jj_consume_token(EXS); result = LexicalUnitImpl.createEXS(n.beginLine, n.beginColumn, prev, number(op, n, 2)); - break; - case DEG: - n = jj_consume_token(DEG); + break; + case DEG: + n = jj_consume_token(DEG); result = LexicalUnitImpl.createDEG(n.beginLine, n.beginColumn, prev, number(op, n, 3)); - break; - case RAD: - n = jj_consume_token(RAD); + break; + case RAD: + n = jj_consume_token(RAD); result = LexicalUnitImpl.createRAD(n.beginLine, n.beginColumn, prev, number(op, n, 3)); - break; - case GRAD: - n = jj_consume_token(GRAD); + break; + case GRAD: + n = jj_consume_token(GRAD); result = LexicalUnitImpl.createGRAD(n.beginLine, n.beginColumn, prev, number(op, n, 3)); - break; - case SECOND: - n = jj_consume_token(SECOND); + break; + case SECOND: + n = jj_consume_token(SECOND); result = LexicalUnitImpl.createS(n.beginLine, n.beginColumn, prev, number(op, n, 1)); - break; - case MS: - n = jj_consume_token(MS); + break; + case MS: + n = jj_consume_token(MS); result = LexicalUnitImpl.createMS(n.beginLine, n.beginColumn, prev, number(op, n, 2)); - break; - case HZ: - n = jj_consume_token(HZ); + break; + case HZ: + n = jj_consume_token(HZ); result = LexicalUnitImpl.createHZ(n.beginLine, n.beginColumn, prev, number(op, n, 2)); - break; - case KHZ: - n = jj_consume_token(KHZ); + break; + case KHZ: + n = jj_consume_token(KHZ); result = LexicalUnitImpl.createKHZ(n.beginLine, n.beginColumn, prev, number(op, n, 3)); - break; - case DIMEN: - n = jj_consume_token(DIMEN); + break; + case DIMEN: + n = jj_consume_token(DIMEN); String s = n.image; int i = 0; while (i < s.length() @@ -4405,31 +4450,31 @@ LexicalUnit exp; result = LexicalUnitImpl.createDimen(n.beginLine, n.beginColumn, prev, Float.valueOf(s.substring(0, i)).floatValue(), s.substring(i)); - break; - case FUNCTION: - result = function(op, prev); - break; - default: - jj_la1[196] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } break; + case FUNCTION: + result = function(op, prev); + break; + default: + jj_la1[198] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + case STRING: + case IDENT: + case URL: + case HASH: + case UNICODERANGE: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STRING: - case IDENT: - case URL: - case HASH: - case UNICODERANGE: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case STRING: - n = jj_consume_token(STRING); + n = jj_consume_token(STRING); result = LexicalUnitImpl.createString(n.beginLine, n.beginColumn, prev, convertStringIndex(n.image, 1, n.image.length() -1)); - break; - case IDENT: - n = jj_consume_token(IDENT); + break; + case IDENT: + n = jj_consume_token(IDENT); String s = convertIdent(n.image); if ("inherit".equals(s)) { result = LexicalUnitImpl.createInherit(n.beginLine, n.beginColumn, @@ -4462,51 +4507,40 @@ LexicalUnit exp; } / */ - break; - case HASH: - result = hexcolor(prev); - break; - case URL: - result = url(prev); - break; - case UNICODERANGE: - result = unicode(prev); - break; - default: - jj_la1[197] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } + break; + case HASH: + result = hexcolor(prev); + break; + case URL: + result = url(prev); + break; + case UNICODERANGE: + result = unicode(prev); break; default: - jj_la1[198] = jj_gen; + jj_la1[199] = jj_gen; jj_consume_token(-1); throw new ParseException(); } - label_131: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S: - ; - break; - default: - jj_la1[199] = jj_gen; - break label_131; - } - jj_consume_token(S); - } - break; - case VARIABLE: - varName = variableName(); - result = LexicalUnitImpl.createVariable(token.beginLine, token.beginColumn, - prev, varName); break; default: jj_la1[200] = jj_gen; jj_consume_token(-1); throw new ParseException(); } - {if (true) return result;} + label_131: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[201] = jj_gen; + break label_131; + } + jj_consume_token(S); + } + {if (true) return result;} throw new Error("Missing return statement in function"); } @@ -4525,7 +4559,7 @@ LexicalUnit exp; ; break; default: - jj_la1[201] = jj_gen; + jj_la1[202] = jj_gen; break label_132; } jj_consume_token(S); @@ -4567,7 +4601,7 @@ LexicalUnit exp; params = expr(); break; default: - jj_la1[202] = jj_gen; + jj_la1[203] = jj_gen; ; } jj_consume_token(RPARAN); @@ -5045,7 +5079,7 @@ LexicalUnit exp; ; break; default: - jj_la1[203] = jj_gen; + jj_la1[204] = jj_gen; break label_133; } jj_consume_token(S); @@ -5074,7 +5108,7 @@ LexicalUnit exp; fontFace(); break; default: - jj_la1[204] = jj_gen; + jj_la1[205] = jj_gen; ret = skipStatement(); if ((ret == null) || (ret.length() == 0)) { {if (true) return;} @@ -5096,7 +5130,7 @@ LexicalUnit exp; ; break; default: - jj_la1[205] = jj_gen; + jj_la1[206] = jj_gen; break label_134; } jj_consume_token(S); @@ -5112,7 +5146,7 @@ LexicalUnit exp; ; break; default: - jj_la1[206] = jj_gen; + jj_la1[207] = jj_gen; break label_135; } jj_consume_token(S); @@ -5128,7 +5162,7 @@ LexicalUnit exp; ; break; default: - jj_la1[207] = jj_gen; + jj_la1[208] = jj_gen; break label_136; } jj_consume_token(S); @@ -5138,7 +5172,7 @@ LexicalUnit exp; declaration(); break; default: - jj_la1[208] = jj_gen; + jj_la1[209] = jj_gen; ; } label_137: @@ -5148,7 +5182,7 @@ LexicalUnit exp; ; break; default: - jj_la1[209] = jj_gen; + jj_la1[210] = jj_gen; break label_137; } jj_consume_token(SEMICOLON); @@ -5159,7 +5193,7 @@ LexicalUnit exp; ; break; default: - jj_la1[210] = jj_gen; + jj_la1[211] = jj_gen; break label_138; } jj_consume_token(S); @@ -5169,7 +5203,7 @@ LexicalUnit exp; declaration(); break; default: - jj_la1[211] = jj_gen; + jj_la1[212] = jj_gen; ; } } @@ -5185,7 +5219,7 @@ LexicalUnit exp; ; break; default: - jj_la1[212] = jj_gen; + jj_la1[213] = jj_gen; break label_139; } jj_consume_token(S); @@ -5275,41 +5309,42 @@ LexicalUnit exp; finally { jj_save(10, xla); } } - private boolean jj_3R_218() { - if (jj_scan_token(FUNCTION)) return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_scan_token(1)) { jj_scanpos = xsp; break; } - } - xsp = jj_scanpos; - if (jj_3R_226()) jj_scanpos = xsp; - if (jj_scan_token(RPARAN)) return true; - return false; - } - private boolean jj_3_1() { if (jj_3R_140()) return true; return false; } - private boolean jj_3R_162() { - if (jj_3R_174()) return true; + private boolean jj_3R_196() { + if (jj_scan_token(IDENT)) return true; return false; } - private boolean jj_3R_215() { - if (jj_3R_221()) return true; + private boolean jj_3R_195() { + if (jj_scan_token(STRING)) return true; return false; } - private boolean jj_3R_214() { - if (jj_3R_220()) return true; + private boolean jj_3R_194() { + if (jj_3R_218()) return true; return false; } - private boolean jj_3R_213() { - if (jj_3R_219()) return true; + private boolean jj_3R_163() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_195()) { + jj_scanpos = xsp; + if (jj_3R_196()) { + jj_scanpos = xsp; + if (jj_3R_197()) { + jj_scanpos = xsp; + if (jj_3R_198()) { + jj_scanpos = xsp; + if (jj_3R_199()) return true; + } + } + } + } return false; } @@ -5324,7 +5359,12 @@ LexicalUnit exp; return false; } - private boolean jj_3R_169() { + private boolean jj_3R_193() { + if (jj_scan_token(DIMEN)) return true; + return false; + } + + private boolean jj_3R_172() { if (jj_scan_token(COLON)) return true; return false; } @@ -5334,8 +5374,33 @@ LexicalUnit exp; return false; } - private boolean jj_3R_212() { - if (jj_scan_token(IDENT)) return true; + private boolean jj_3R_192() { + if (jj_scan_token(KHZ)) return true; + return false; + } + + private boolean jj_3R_191() { + if (jj_scan_token(HZ)) return true; + return false; + } + + private boolean jj_3R_190() { + if (jj_scan_token(MS)) return true; + return false; + } + + private boolean jj_3R_189() { + if (jj_scan_token(SECOND)) return true; + return false; + } + + private boolean jj_3R_188() { + if (jj_scan_token(GRAD)) return true; + return false; + } + + private boolean jj_3R_187() { + if (jj_scan_token(RAD)) return true; return false; } @@ -5344,13 +5409,13 @@ LexicalUnit exp; return false; } - private boolean jj_3R_211() { - if (jj_scan_token(STRING)) return true; + private boolean jj_3R_186() { + if (jj_scan_token(DEG)) return true; return false; } - private boolean jj_3R_210() { - if (jj_3R_218()) return true; + private boolean jj_3R_185() { + if (jj_scan_token(EXS)) return true; return false; } @@ -5359,93 +5424,146 @@ LexicalUnit exp; return false; } - private boolean jj_3R_173() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_211()) { - jj_scanpos = xsp; - if (jj_3R_212()) { - jj_scanpos = xsp; - if (jj_3R_213()) { - jj_scanpos = xsp; - if (jj_3R_214()) { - jj_scanpos = xsp; - if (jj_3R_215()) return true; - } - } - } - } + private boolean jj_3R_184() { + if (jj_scan_token(EMS)) return true; return false; } - private boolean jj_3R_209() { - if (jj_scan_token(DIMEN)) return true; + private boolean jj_3R_183() { + if (jj_scan_token(PX)) return true; return false; } - private boolean jj_3R_208() { - if (jj_scan_token(KHZ)) return true; + private boolean jj_3R_182() { + if (jj_scan_token(IN)) return true; return false; } - private boolean jj_3R_207() { - if (jj_scan_token(HZ)) return true; + private boolean jj_3R_181() { + if (jj_scan_token(PC)) return true; return false; } - private boolean jj_3R_206() { - if (jj_scan_token(MS)) return true; + private boolean jj_3R_180() { + if (jj_scan_token(MM)) return true; return false; } - private boolean jj_3R_205() { - if (jj_scan_token(SECOND)) return true; + private boolean jj_3R_179() { + if (jj_scan_token(CM)) return true; return false; } - private boolean jj_3R_223() { - if (jj_scan_token(INTERPOLATION)) return true; + private boolean jj_3R_161() { + if (jj_scan_token(LBRACE)) return true; return false; } - private boolean jj_3R_204() { - if (jj_scan_token(GRAD)) return true; + private boolean jj_3R_178() { + if (jj_scan_token(PT)) return true; return false; } - private boolean jj_3R_203() { - if (jj_scan_token(RAD)) return true; + private boolean jj_3R_177() { + if (jj_scan_token(PERCENTAGE)) return true; return false; } - private boolean jj_3R_160() { - if (jj_scan_token(LBRACE)) return true; + private boolean jj_3R_166() { + if (jj_3R_202()) return true; return false; } - private boolean jj_3R_202() { - if (jj_scan_token(DEG)) return true; + private boolean jj_3R_176() { + if (jj_scan_token(NUMBER)) return true; return false; } - private boolean jj_3R_201() { - if (jj_scan_token(EXS)) return true; + private boolean jj_3R_228() { + if (jj_scan_token(INTERPOLATION)) return true; return false; } - private boolean jj_3R_170() { - if (jj_scan_token(LBRACKET)) return true; + private boolean jj_3R_175() { + if (jj_3R_217()) return true; return false; } - private boolean jj_3R_200() { - if (jj_scan_token(EMS)) return true; + private boolean jj_3R_162() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_175()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_3R_176()) { + jj_scanpos = xsp; + if (jj_3R_177()) { + jj_scanpos = xsp; + if (jj_3R_178()) { + jj_scanpos = xsp; + if (jj_3R_179()) { + jj_scanpos = xsp; + if (jj_3R_180()) { + jj_scanpos = xsp; + if (jj_3R_181()) { + jj_scanpos = xsp; + if (jj_3R_182()) { + jj_scanpos = xsp; + if (jj_3R_183()) { + jj_scanpos = xsp; + if (jj_3R_184()) { + jj_scanpos = xsp; + if (jj_3R_185()) { + jj_scanpos = xsp; + if (jj_3R_186()) { + jj_scanpos = xsp; + if (jj_3R_187()) { + jj_scanpos = xsp; + if (jj_3R_188()) { + jj_scanpos = xsp; + if (jj_3R_189()) { + jj_scanpos = xsp; + if (jj_3R_190()) { + jj_scanpos = xsp; + if (jj_3R_191()) { + jj_scanpos = xsp; + if (jj_3R_192()) { + jj_scanpos = xsp; + if (jj_3R_193()) { + jj_scanpos = xsp; + if (jj_3R_194()) return true; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } return false; } - private boolean jj_3R_158() { - if (jj_scan_token(IDENT)) return true; + private boolean jj_3R_160() { + if (jj_3R_174()) return true; + return false; + } + + private boolean jj_3R_147() { Token xsp; + xsp = jj_scanpos; + if (jj_3R_162()) { + jj_scanpos = xsp; + if (jj_3R_163()) return true; + } while (true) { xsp = jj_scanpos; if (jj_scan_token(1)) { jj_scanpos = xsp; break; } @@ -5453,228 +5571,214 @@ LexicalUnit exp; return false; } - private boolean jj_3R_199() { - if (jj_scan_token(PX)) return true; + private boolean jj_3R_173() { + if (jj_scan_token(LBRACKET)) return true; return false; } - private boolean jj_3R_142() { - if (jj_3R_145()) return true; + private boolean jj_3R_159() { + if (jj_scan_token(IDENT)) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + } return false; } - private boolean jj_3R_174() { - if (jj_scan_token(VARIABLE)) return true; + private boolean jj_3R_145() { + if (jj_3R_159()) return true; + if (jj_scan_token(COLON)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_scan_token(1)) { jj_scanpos = xsp; break; } } + xsp = jj_scanpos; + if (jj_3R_160()) { + jj_scanpos = xsp; + if (jj_3R_161()) return true; + } return false; } - private boolean jj_3R_198() { - if (jj_scan_token(IN)) return true; + private boolean jj_3R_142() { + if (jj_3R_145()) return true; return false; } - private boolean jj_3R_190() { - if (jj_scan_token(PARENT)) return true; + private boolean jj_3R_222() { + if (jj_scan_token(VARIABLE)) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + } return false; } - private boolean jj_3R_159() { - if (jj_3R_171()) return true; + private boolean jj_3R_219() { + if (jj_scan_token(HASH)) return true; return false; } - private boolean jj_3R_189() { - if (jj_scan_token(ANY)) return true; + private boolean jj_3R_202() { + if (jj_3R_222()) return true; return false; } - private boolean jj_3R_197() { - if (jj_scan_token(PC)) return true; + private boolean jj_3R_140() { + if (jj_scan_token(VARIABLE)) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + } + if (jj_scan_token(COLON)) return true; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + } + if (jj_scan_token(REMOVE)) return true; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + } + if (true) { jj_la = 0; jj_scanpos = jj_lastpos; return false;} return false; } - private boolean jj_3R_196() { - if (jj_scan_token(MM)) return true; + private boolean jj_3R_216() { + if (jj_scan_token(PARENT)) return true; return false; } - private boolean jj_3R_195() { - if (jj_scan_token(CM)) return true; + private boolean jj_3R_215() { + if (jj_scan_token(ANY)) return true; return false; } - private boolean jj_3R_222() { + private boolean jj_3R_227() { if (jj_scan_token(IDENT)) return true; return false; } - private boolean jj_3R_216() { + private boolean jj_3R_223() { Token xsp; xsp = jj_scanpos; - if (jj_3R_222()) { + if (jj_3R_227()) { jj_scanpos = xsp; - if (jj_3R_223()) return true; + if (jj_3R_228()) return true; } return false; } - private boolean jj_3R_145() { - if (jj_3R_158()) return true; - if (jj_scan_token(COLON)) return true; + private boolean jj_3R_214() { Token xsp; + if (jj_3R_223()) return true; while (true) { xsp = jj_scanpos; - if (jj_scan_token(1)) { jj_scanpos = xsp; break; } - } - xsp = jj_scanpos; - if (jj_3R_159()) { - jj_scanpos = xsp; - if (jj_3R_160()) return true; + if (jj_3R_223()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_166() { + private boolean jj_3R_169() { Token xsp; xsp = jj_scanpos; - if (jj_3R_188()) { + if (jj_3R_214()) { jj_scanpos = xsp; - if (jj_3R_189()) { + if (jj_3R_215()) { jj_scanpos = xsp; - if (jj_3R_190()) return true; + if (jj_3R_216()) return true; } } return false; } - private boolean jj_3R_188() { - Token xsp; - if (jj_3R_216()) return true; - while (true) { - xsp = jj_scanpos; - if (jj_3R_216()) { jj_scanpos = xsp; break; } - } + private boolean jj_3R_165() { + if (jj_3R_147()) return true; return false; } - private boolean jj_3R_194() { - if (jj_scan_token(PT)) return true; + private boolean jj_3R_220() { + if (jj_scan_token(URL)) return true; return false; } - private boolean jj_3R_140() { - if (jj_scan_token(VARIABLE)) return true; + private boolean jj_3R_149() { Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_scan_token(1)) { jj_scanpos = xsp; break; } - } - if (jj_scan_token(COLON)) return true; - while (true) { - xsp = jj_scanpos; - if (jj_scan_token(1)) { jj_scanpos = xsp; break; } - } - if (jj_scan_token(REMOVE)) return true; - while (true) { - xsp = jj_scanpos; - if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + xsp = jj_scanpos; + if (jj_3R_165()) { + jj_scanpos = xsp; + if (jj_3R_166()) return true; } - if (true) { jj_la = 0; jj_scanpos = jj_lastpos; return false;} return false; } - private boolean jj_3R_185() { + private boolean jj_3R_211() { if (jj_scan_token(S)) return true; return false; } - private boolean jj_3R_184() { + private boolean jj_3R_210() { if (jj_scan_token(DOT)) return true; return false; } - private boolean jj_3R_193() { - if (jj_scan_token(PERCENTAGE)) return true; + private boolean jj_3R_209() { + if (jj_scan_token(EQ)) return true; return false; } - private boolean jj_3R_183() { - if (jj_scan_token(EQ)) return true; + private boolean jj_3R_148() { + if (jj_3R_164()) return true; return false; } - private boolean jj_3R_182() { + private boolean jj_3R_208() { if (jj_scan_token(RPARAN)) return true; return false; } - private boolean jj_3R_191() { - if (jj_3R_217()) return true; + private boolean jj_3R_207() { + if (jj_scan_token(FUNCTION)) return true; return false; } - private boolean jj_3R_181() { - if (jj_scan_token(FUNCTION)) return true; + private boolean jj_3R_206() { + if (jj_scan_token(COLON)) return true; return false; } - private boolean jj_3R_192() { - if (jj_scan_token(NUMBER)) return true; + private boolean jj_3R_141() { + if (jj_3R_150()) return true; return false; } - private boolean jj_3R_180() { - if (jj_scan_token(COLON)) return true; + private boolean jj_3R_205() { + if (jj_scan_token(INTERPOLATION)) return true; return false; } - private boolean jj_3R_141() { - if (jj_3R_149()) return true; + private boolean jj_3R_204() { + if (jj_scan_token(NUMBER)) return true; return false; } - private boolean jj_3R_179() { - if (jj_scan_token(INTERPOLATION)) return true; + private boolean jj_3_9() { + if (jj_3R_145()) return true; return false; } - private boolean jj_3R_178() { - if (jj_scan_token(NUMBER)) return true; + private boolean jj_3R_203() { + if (jj_scan_token(IDENT)) return true; return false; } - private boolean jj_3R_172() { + private boolean jj_3R_167() { Token xsp; xsp = jj_scanpos; - if (jj_3R_191()) jj_scanpos = xsp; - xsp = jj_scanpos; - if (jj_3R_192()) { - jj_scanpos = xsp; - if (jj_3R_193()) { - jj_scanpos = xsp; - if (jj_3R_194()) { - jj_scanpos = xsp; - if (jj_3R_195()) { - jj_scanpos = xsp; - if (jj_3R_196()) { - jj_scanpos = xsp; - if (jj_3R_197()) { - jj_scanpos = xsp; - if (jj_3R_198()) { - jj_scanpos = xsp; - if (jj_3R_199()) { - jj_scanpos = xsp; - if (jj_3R_200()) { - jj_scanpos = xsp; - if (jj_3R_201()) { - jj_scanpos = xsp; - if (jj_3R_202()) { - jj_scanpos = xsp; if (jj_3R_203()) { jj_scanpos = xsp; if (jj_3R_204()) { @@ -5689,53 +5793,9 @@ LexicalUnit exp; jj_scanpos = xsp; if (jj_3R_209()) { jj_scanpos = xsp; - if (jj_3R_210()) return true; - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - return false; - } - - private boolean jj_3_9() { - if (jj_3R_145()) return true; - return false; - } - - private boolean jj_3R_164() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_177()) { - jj_scanpos = xsp; - if (jj_3R_178()) { - jj_scanpos = xsp; - if (jj_3R_179()) { - jj_scanpos = xsp; - if (jj_3R_180()) { + if (jj_3R_210()) { jj_scanpos = xsp; - if (jj_3R_181()) { - jj_scanpos = xsp; - if (jj_3R_182()) { - jj_scanpos = xsp; - if (jj_3R_183()) { - jj_scanpos = xsp; - if (jj_3R_184()) { - jj_scanpos = xsp; - if (jj_3R_185()) return true; + if (jj_3R_211()) return true; } } } @@ -5747,46 +5807,40 @@ LexicalUnit exp; return false; } - private boolean jj_3R_177() { - if (jj_scan_token(IDENT)) return true; + private boolean jj_3R_225() { + if (jj_scan_token(PLUS)) return true; return false; } - private boolean jj_3R_161() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_172()) { - jj_scanpos = xsp; - if (jj_3R_173()) return true; - } - while (true) { - xsp = jj_scanpos; - if (jj_scan_token(1)) { jj_scanpos = xsp; break; } - } + private boolean jj_3R_224() { + if (jj_scan_token(MINUS)) return true; return false; } - private boolean jj_3R_147() { + private boolean jj_3R_217() { Token xsp; xsp = jj_scanpos; - if (jj_3R_161()) { + if (jj_3R_224()) { jj_scanpos = xsp; - if (jj_3R_162()) return true; + if (jj_3R_225()) return true; } return false; } - private boolean jj_3R_148() { - if (jj_3R_163()) return true; + private boolean jj_3R_171() { + if (jj_scan_token(DOT)) return true; return false; } - private boolean jj_3R_168() { - if (jj_scan_token(DOT)) return true; + private boolean jj_3_11() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_148()) jj_scanpos = xsp; + if (jj_3R_149()) return true; return false; } - private boolean jj_3R_149() { + private boolean jj_3R_150() { if (jj_scan_token(MICROSOFT_RULE)) return true; Token xsp; while (true) { @@ -5794,20 +5848,25 @@ LexicalUnit exp; if (jj_scan_token(1)) { jj_scanpos = xsp; break; } } if (jj_scan_token(COLON)) return true; - if (jj_3R_164()) return true; + if (jj_3R_167()) return true; while (true) { xsp = jj_scanpos; - if (jj_3R_164()) { jj_scanpos = xsp; break; } + if (jj_3R_167()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_219() { - if (jj_scan_token(HASH)) return true; + private boolean jj_3R_146() { + if (jj_scan_token(COMMA)) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + } return false; } - private boolean jj_3R_187() { + private boolean jj_3R_213() { if (jj_scan_token(PRECEDES)) return true; return false; } @@ -5822,42 +5881,37 @@ LexicalUnit exp; return false; } - private boolean jj_3R_186() { - if (jj_scan_token(PLUS)) return true; + private boolean jj_3R_174() { + if (jj_3R_149()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3_11()) { jj_scanpos = xsp; break; } + } return false; } - private boolean jj_3R_225() { + private boolean jj_3R_212() { if (jj_scan_token(PLUS)) return true; return false; } - private boolean jj_3R_224() { - if (jj_scan_token(MINUS)) return true; - return false; - } - - private boolean jj_3R_217() { + private boolean jj_3R_168() { Token xsp; xsp = jj_scanpos; - if (jj_3R_224()) { + if (jj_3R_212()) { jj_scanpos = xsp; - if (jj_3R_225()) return true; + if (jj_3R_213()) return true; } return false; } - private boolean jj_3R_165() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_186()) { - jj_scanpos = xsp; - if (jj_3R_187()) return true; - } + private boolean jj_3R_221() { + if (jj_scan_token(UNICODERANGE)) return true; return false; } - private boolean jj_3R_151() { + private boolean jj_3R_152() { if (jj_scan_token(PRECEDES)) return true; Token xsp; while (true) { @@ -5872,23 +5926,20 @@ LexicalUnit exp; return false; } - private boolean jj_3_11() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_148()) jj_scanpos = xsp; - if (jj_3R_147()) return true; + private boolean jj_3R_226() { + if (jj_3R_174()) return true; return false; } - private boolean jj_3R_152() { + private boolean jj_3R_153() { if (jj_scan_token(S)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_165()) jj_scanpos = xsp; + if (jj_3R_168()) jj_scanpos = xsp; return false; } - private boolean jj_3R_150() { + private boolean jj_3R_151() { if (jj_scan_token(PLUS)) return true; Token xsp; while (true) { @@ -5901,27 +5952,25 @@ LexicalUnit exp; private boolean jj_3R_143() { Token xsp; xsp = jj_scanpos; - if (jj_3R_150()) { - jj_scanpos = xsp; if (jj_3R_151()) { jj_scanpos = xsp; - if (jj_3R_152()) return true; + if (jj_3R_152()) { + jj_scanpos = xsp; + if (jj_3R_153()) return true; } } return false; } - private boolean jj_3R_220() { - if (jj_scan_token(URL)) return true; - return false; - } - - private boolean jj_3R_171() { + private boolean jj_3_10() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_146()) jj_scanpos = xsp; if (jj_3R_147()) return true; return false; } - private boolean jj_3R_146() { + private boolean jj_3R_201() { if (jj_scan_token(COMMA)) return true; Token xsp; while (true) { @@ -5931,91 +5980,91 @@ LexicalUnit exp; return false; } - private boolean jj_3R_176() { - if (jj_scan_token(COMMA)) return true; + private boolean jj_3R_218() { + if (jj_scan_token(FUNCTION)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_scan_token(1)) { jj_scanpos = xsp; break; } } + xsp = jj_scanpos; + if (jj_3R_226()) jj_scanpos = xsp; + if (jj_scan_token(RPARAN)) return true; return false; } - private boolean jj_3R_157() { - if (jj_3R_170()) return true; + private boolean jj_3R_200() { + if (jj_scan_token(DIV)) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + } return false; } - private boolean jj_3_10() { + private boolean jj_3R_164() { Token xsp; xsp = jj_scanpos; - if (jj_3R_146()) jj_scanpos = xsp; - if (jj_3R_147()) return true; + if (jj_3R_200()) { + jj_scanpos = xsp; + if (jj_3R_201()) return true; + } return false; } - private boolean jj_3R_156() { - if (jj_3R_169()) return true; + private boolean jj_3R_199() { + if (jj_3R_221()) return true; return false; } - private boolean jj_3R_163() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_175()) { - jj_scanpos = xsp; - if (jj_3R_176()) return true; - } + private boolean jj_3R_198() { + if (jj_3R_220()) return true; return false; } - private boolean jj_3R_175() { - if (jj_scan_token(DIV)) return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_scan_token(1)) { jj_scanpos = xsp; break; } - } + private boolean jj_3R_158() { + if (jj_3R_173()) return true; return false; } - private boolean jj_3R_155() { - if (jj_3R_168()) return true; + private boolean jj_3R_197() { + if (jj_3R_219()) return true; return false; } - private boolean jj_3R_154() { - if (jj_3R_167()) return true; + private boolean jj_3R_157() { + if (jj_3R_172()) return true; return false; } - private boolean jj_3R_221() { - if (jj_scan_token(UNICODERANGE)) return true; + private boolean jj_3R_156() { + if (jj_3R_171()) return true; return false; } - private boolean jj_3R_226() { - if (jj_3R_171()) return true; + private boolean jj_3R_155() { + if (jj_3R_170()) return true; return false; } - private boolean jj_3R_153() { - if (jj_3R_166()) return true; + private boolean jj_3R_154() { + if (jj_3R_169()) return true; return false; } private boolean jj_3R_144() { Token xsp; xsp = jj_scanpos; - if (jj_3R_153()) { - jj_scanpos = xsp; if (jj_3R_154()) { jj_scanpos = xsp; if (jj_3R_155()) { jj_scanpos = xsp; if (jj_3R_156()) { jj_scanpos = xsp; - if (jj_3R_157()) return true; + if (jj_3R_157()) { + jj_scanpos = xsp; + if (jj_3R_158()) return true; } } } @@ -6023,7 +6072,7 @@ LexicalUnit exp; return false; } - private boolean jj_3R_167() { + private boolean jj_3R_170() { if (jj_scan_token(HASH)) return true; return false; } @@ -6038,7 +6087,7 @@ LexicalUnit exp; private Token jj_scanpos, jj_lastpos; private int jj_la; private int jj_gen; - final private int[] jj_la1 = new int[213]; + final private int[] jj_la1 = new int[214]; static private int[] jj_la1_0; static private int[] jj_la1_1; static private int[] jj_la1_2; @@ -6050,16 +6099,16 @@ LexicalUnit exp; jj_la1_init_3(); } private static void jj_la1_init_0() { - jj_la1_0 = new int[] {0x0,0xc02,0xc02,0x0,0xc00,0x2,0x2,0x2,0x0,0xe8000000,0xc00,0x2,0xc00,0x2,0x0,0x2,0x0,0x2,0x2,0x2,0xe9f45400,0xe9f45400,0x2,0x400000,0x2,0x2,0x2,0x2,0x0,0x0,0x2,0x0,0x800000,0x2,0x0,0x2,0x2,0x2,0x2,0x0,0x800000,0x2,0x0,0x2,0x1f45400,0x2,0x2,0x1100000,0x2,0x1100000,0x1100002,0x2,0x80080002,0x80080002,0x2,0x2,0x2,0x2,0x2,0xe8000000,0x0,0x0,0x0,0xe8000000,0x2,0x400000,0x2,0x2,0x88000000,0x88000000,0x88000000,0x88000000,0x88000000,0x88000000,0x88000000,0x88000000,0x88000000,0x88000000,0xe8000000,0x0,0x0,0x0,0x0,0x60000000,0x2,0x2,0xfc000,0x2,0x0,0x2,0xfc000,0x0,0x2,0x2,0x0,0x2,0x0,0x2,0x800000,0x27380002,0x2,0xe8000000,0x0,0xe8000000,0x2,0x0,0x2,0x27380002,0x0,0x2,0xe8000000,0x0,0xe8000000,0x2,0x27380002,0x2,0x2,0x2,0x0,0x2,0xe8000000,0x0,0x0,0xe8000000,0x2,0x2,0x400000,0x2,0x2,0x2,0x2,0x0,0x2,0xe8000000,0x0,0xe8000000,0x2,0x400000,0x2,0x2,0x2,0x400000,0x0,0x300000,0x2,0x0,0x400000,0x2,0x300000,0x2,0x0,0x2,0x0,0x2,0x800000,0x2,0x2,0x2,0x0,0x2,0x2,0x2,0x400000,0x2,0x2,0x0,0x2,0x2,0x2,0x800000,0x2,0x2,0x0,0x800000,0x2,0x0,0x2,0x2,0x0,0x2,0x0,0x800000,0x2,0x0,0x2,0x301000,0x2,0x0,0x2,0x2,0x2,0x2,0x4400000,0x4400000,0x300000,0x300000,0x0,0x0,0x300000,0x2,0x300000,0x2,0x300000,0x2,0xe8000000,0x2,0x2,0x2,0x0,0x800000,0x2,0x0,0x2,}; + jj_la1_0 = new int[] {0x0,0xc02,0xc02,0x0,0xc00,0x2,0x2,0x2,0x0,0xe8000000,0xc00,0x2,0xc00,0x2,0x0,0x2,0x0,0x2,0x2,0x2,0xe9f45400,0xe9f45400,0x2,0x400000,0x2,0x2,0x2,0x2,0x0,0x0,0x2,0x0,0x800000,0x2,0x0,0x2,0x2,0x2,0x2,0x0,0x800000,0x2,0x0,0x2,0x1f45400,0x2,0x2,0x1100000,0x2,0x1100000,0x1100002,0x2,0x80080002,0x80080002,0x2,0x2,0x2,0x2,0x2,0xe8000000,0x0,0x0,0x0,0xe8000000,0x2,0x400000,0x2,0x2,0x88000000,0x88000000,0x88000000,0x88000000,0x88000000,0x88000000,0x88000000,0x88000000,0x88000000,0x88000000,0xe8000000,0x0,0x0,0x0,0x0,0x60000000,0x2,0x2,0xfc000,0x2,0x0,0x2,0xfc000,0x0,0x2,0x2,0x0,0x2,0x0,0x2,0x800000,0x27380002,0x2,0xe8000000,0x0,0xe8000000,0x2,0x0,0x2,0x27380002,0x0,0x2,0xe8000000,0x0,0xe8000000,0x2,0x27380002,0x2,0x2,0x2,0x0,0x2,0xe8000000,0x0,0x0,0xe8000000,0x2,0x2,0x400000,0x2,0x2,0x2,0x2,0x0,0x2,0xe8000000,0x0,0xe8000000,0x2,0x400000,0x2,0x2,0x2,0x400000,0x0,0x0,0x300000,0x2,0x0,0x400000,0x2,0x300000,0x2,0x0,0x2,0x0,0x2,0x800000,0x2,0x2,0x2,0x0,0x2,0x2,0x2,0x400000,0x2,0x2,0x0,0x2,0x2,0x2,0x800000,0x2,0x2,0x0,0x800000,0x2,0x0,0x2,0x2,0x0,0x2,0x0,0x800000,0x2,0x0,0x2,0x301000,0x2,0x0,0x2,0x2,0x2,0x2,0x4400000,0x4400000,0x300000,0x300000,0x300000,0x0,0x0,0x300000,0x2,0x2,0x300000,0x2,0xe8000000,0x2,0x2,0x2,0x0,0x800000,0x2,0x0,0x2,}; } private static void jj_la1_init_1() { - jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x83000c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc2,0xc2,0x0,0x0,0x0,0x0,0x0,0xa82000c0,0x0,0x20000000,0x88200000,0xc0,0x0,0x0,0x0,0x0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xc0,0x80,0x80,0x80,0x80,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0x0,0x802000c0,0x80200000,0xc0,0x0,0x40000000,0x0,0x3f,0x0,0x0,0x802000c0,0x80200000,0xc0,0x0,0x3f,0x0,0x0,0x0,0x0,0x0,0x802000c0,0x200000,0x80000000,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x882000c0,0x88200000,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x40,0x0,0x40,0x0,0x0,0x40,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x60000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; + jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x83000c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc2,0xc2,0x0,0x0,0x0,0x0,0x0,0xa82000c0,0x0,0x20000000,0x88200000,0xc0,0x0,0x0,0x0,0x0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xc0,0x80,0x80,0x80,0x80,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0x0,0x802000c0,0x80200000,0xc0,0x0,0x40000000,0x0,0x3f,0x0,0x0,0x802000c0,0x80200000,0xc0,0x0,0x3f,0x0,0x0,0x0,0x0,0x0,0x802000c0,0x200000,0x80000000,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x882000c0,0x88200000,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x40,0x40,0x0,0x40,0x0,0x0,0x40,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x60000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; } private static void jj_la1_init_2() { - jj_la1_2 = new int[] {0x80000000,0x0,0x0,0x20000000,0x0,0x0,0x0,0x0,0x400,0x50000440,0x0,0x0,0x0,0x0,0x220,0x0,0x40,0x0,0x0,0x0,0xf0000ae0,0xf0000ae0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x40,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x40,0x0,0xe0000aa0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x50000444,0x44,0x0,0x40000400,0x10000040,0x0,0x0,0x0,0x0,0x10000000,0x10000000,0x0,0x0,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000040,0x40,0x40,0x40,0x40,0x40,0x0,0x0,0x0,0x0,0x60,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x10,0x0,0x0,0x4c0,0x0,0x50000440,0x40000400,0x10000040,0x0,0x0,0x0,0x4c0,0x8,0x0,0x50000440,0x40000400,0x10000040,0x0,0x4c0,0x0,0x0,0x0,0x440,0x0,0x50000440,0x0,0x40000400,0x10000040,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x50000440,0x40000400,0x10000040,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ffffee0,0x0,0x0,0x0,0x0,0x1ffffee0,0x0,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x40,0x0,0x1ffffee0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xffff880,0x10000260,0x1ffffae0,0x0,0x1ffffee0,0x0,0x1ffffee0,0x0,0x70000040,0x0,0x0,0x0,0x40,0x0,0x0,0x40,0x0,}; + jj_la1_2 = new int[] {0x80000000,0x0,0x0,0x20000000,0x0,0x0,0x0,0x0,0x400,0x50000440,0x0,0x0,0x0,0x0,0x220,0x0,0x40,0x0,0x0,0x0,0xf0000ae0,0xf0000ae0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x40,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x40,0x0,0xe0000aa0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x50000444,0x44,0x0,0x40000400,0x10000040,0x0,0x0,0x0,0x0,0x10000000,0x10000000,0x0,0x0,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000040,0x40,0x40,0x40,0x40,0x40,0x0,0x0,0x0,0x0,0x60,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x10,0x0,0x0,0x4c0,0x0,0x50000440,0x40000400,0x10000040,0x0,0x0,0x0,0x4c0,0x8,0x0,0x50000440,0x40000400,0x10000040,0x0,0x4c0,0x0,0x0,0x0,0x440,0x0,0x50000440,0x0,0x40000400,0x10000040,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x50000440,0x40000400,0x10000040,0x0,0x0,0x0,0x0,0x0,0x0,0x400,0x400,0x1ffffee0,0x0,0x0,0x0,0x0,0x1ffffee0,0x0,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x40,0x0,0x1ffffee0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ffffee0,0x0,0xffff880,0x10000260,0x1ffffae0,0x0,0x0,0x1ffffee0,0x0,0x70000040,0x0,0x0,0x0,0x40,0x0,0x0,0x40,0x0,}; } private static void jj_la1_init_3() { - jj_la1_3 = new int[] {0x0,0x4,0x4,0x0,0x4,0x0,0x0,0x0,0x0,0x3,0x4,0x0,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1a00f,0x1a00f,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1a00f,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xa000,0x0,0x0,0x0,0x0,0xa000,0x0,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0xa000,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000,0x2000,0xa000,0x0,0xa000,0x0,0xa000,0x0,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; + jj_la1_3 = new int[] {0x0,0x4,0x4,0x0,0x4,0x0,0x0,0x0,0x0,0x3,0x4,0x0,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1a00f,0x1a00f,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1a00f,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xa000,0x0,0x0,0x0,0x0,0xa000,0x0,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0xa000,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xa000,0x0,0x8000,0x2000,0xa000,0x0,0x0,0xa000,0x0,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; } final private JJCalls[] jj_2_rtns = new JJCalls[11]; private boolean jj_rescan = false; @@ -6071,7 +6120,7 @@ LexicalUnit exp; token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 213; i++) jj_la1[i] = -1; + for (int i = 0; i < 214; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -6081,7 +6130,7 @@ LexicalUnit exp; token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 213; i++) jj_la1[i] = -1; + for (int i = 0; i < 214; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -6091,7 +6140,7 @@ LexicalUnit exp; token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 213; i++) jj_la1[i] = -1; + for (int i = 0; i < 214; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -6101,7 +6150,7 @@ LexicalUnit exp; token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 213; i++) jj_la1[i] = -1; + for (int i = 0; i < 214; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -6218,7 +6267,7 @@ LexicalUnit exp; la1tokens[jj_kind] = true; jj_kind = -1; } - for (int i = 0; i < 213; i++) { + for (int i = 0; i < 214; i++) { if (jj_la1[i] == jj_gen) { for (int j = 0; j < 32; j++) { if ((jj_la1_0[i] & (1<<j)) != 0) { diff --git a/theme-compiler/src/com/vaadin/sass/parser/Parser.jj b/theme-compiler/src/com/vaadin/sass/parser/Parser.jj index 7503db94d9..ac022413e2 100644 --- a/theme-compiler/src/com/vaadin/sass/parser/Parser.jj +++ b/theme-compiler/src/com/vaadin/sass/parser/Parser.jj @@ -1505,40 +1505,46 @@ ArrayList<VariableNode> arglist() : { ArrayList<VariableNode> args = new ArrayList<VariableNode>(); VariableNode arg; + boolean hasNonOptionalArgument = false; } { - arg=mixinArg() ( <COMMA> (<S>)* { args.add(arg); } + arg=mixinArg() ( <COMMA> (<S>)* { hasNonOptionalArgument = checkMixinForNonOptionalArguments(arg, hasNonOptionalArgument); args.add(arg); } arg=mixinArg() )* - { args.add(arg); + { hasNonOptionalArgument = checkMixinForNonOptionalArguments(arg, hasNonOptionalArgument); args.add(arg); return args; } } JAVACODE -void checkMixinOptionalArguments(LexicalUnitImpl arg, String name)
{ - boolean currentArgHasArguments = arg.getLexicalUnitType() == LexicalUnitImpl.SCSS_VARIABLE; -
if(currentArgHasArguments)
{
throw new ParseException("Sass Error: Required argument "+ name +" must come before any optional arguments."); +boolean checkMixinForNonOptionalArguments(VariableNode arg, boolean hasNonOptionalArguments)
{ + boolean currentArgHasArguments = arg.getExpr() != null && arg.getExpr().getLexicalUnitType() == LexicalUnitImpl.SCSS_VARIABLE && arg.getExpr().getNextLexicalUnit() != null; +
if(currentArgHasArguments)
{ + if(hasNonOptionalArguments)
{
throw new ParseException("Sass Error: Required argument $"+ arg.getName() +" must come before any optional arguments."); + } + return hasNonOptionalArguments; + }else
{
return true; } } VariableNode mixinArg() : { String name; + Token variable = null; LexicalUnitImpl first = null; - LexicalUnitImpl next = null; LexicalUnitImpl prev = null; + LexicalUnitImpl next = null; } { - name=variableName() (":" (<S>)* first=term(null){ prev = first; } - (LOOKAHEAD(2)(< COMMA >(< S >)*)? - next=term(prev){ - if(next.getLexicalUnitType() == LexicalUnitImpl.SCSS_VARIABLE) - { - throw new ParseException("Sass Error: Required argument "+ next.toString() +" must come before any optional arguments."); - } - prev.setNextLexicalUnit(next); prev = next; - - })* )? + name=variableName() (< COLON > (< S >)* + + (
first = nonVariableTerm(null)
{ + prev = first;
} + (LOOKAHEAD(3)(< COMMA >(< S >)*)? prev = nonVariableTerm(prev))*
) + | (variable = < VARIABLE >{ first = LexicalUnitImpl.createVariable(token.beginLine, token.beginColumn, + prev, variable.image);} + + ) + )? { VariableNode arg = new VariableNode(name, first, false); return arg; @@ -1922,10 +1928,28 @@ LexicalUnitImpl term(LexicalUnitImpl prev) : { LexicalUnitImpl result = null; Token n = null; char op = ' '; +} +{ + (result = nonVariableTerm(prev)| result = variableTerm(prev)) + { + return result; + } +} + +LexicalUnitImpl variableTerm(LexicalUnitImpl prev) :
{ + LexicalUnitImpl result = null; + String varName = "";
}
{ + varName = variableName() + {result = LexicalUnitImpl.createVariable(token.beginLine, token.beginColumn, + prev, varName); return result;}
} + +LexicalUnitImpl nonVariableTerm(LexicalUnitImpl prev) :
{
LexicalUnitImpl result = null; + Token n = null; + char op = ' '; String varName; } { - (( ( ( op=unaryOperator() )? +( ( ( op=unaryOperator() )? ( n=<NUMBER> { result = LexicalUnitImpl.createNumber(n.beginLine, n.beginColumn, @@ -2033,13 +2057,8 @@ LexicalUnitImpl term(LexicalUnitImpl prev) : | result=url(prev) | result=unicode(prev) ) ) ( <S> )* - | varName = variableName() - {result = LexicalUnitImpl.createVariable(token.beginLine, token.beginColumn, - prev, varName);}) - { - return result; - } -} + { + return result;
}
} /** * Handle all CSS2 functions. diff --git a/theme-compiler/tests/resources/scss/mixins.scss b/theme-compiler/tests/resources/scss/mixins.scss index 32d8250fe8..cb05cc87e3 100644 --- a/theme-compiler/tests/resources/scss/mixins.scss +++ b/theme-compiler/tests/resources/scss/mixins.scss @@ -58,7 +58,7 @@ $mixinVar : 1px; @include fontType(1px solid black, $color : red); } -@mixin fontType($border, $color : black){ +@mixin fontType($border : 2px solid red, $color : black){ border : $border; font-color: $color; } |