private int slash(boolean spaceSeen) throws IOException { if (isBEG()) { lex_strterm = new StringTerm(str_regexp, '\0', '/'); yaccValue = new Token("/",getPosition()); return Tokens.tREGEXP_BEG; } int c = src.read(); if (c == '=') { yaccValue = new Token("/", getPosition()); setState(LexState.EXPR_BEG); return Tokens.tOP_ASGN; } src.unread(c); if (isSpaceArg(c, spaceSeen)) { arg_ambiguous(); lex_strterm = new StringTerm(str_regexp, '\0', '/'); yaccValue = new Token("/",getPosition()); return Tokens.tREGEXP_BEG; } determineExpressionState(); yaccValue = new Token("/", getPosition()); warn_balanced(c, spaceSeen, "/", "regexp literal"); return Tokens.tDIVIDE; }
private int slash(boolean spaceSeen) throws IOException { if (isBEG()) { lex_strterm = new StringTerm(str_regexp, '\0', '/'); yaccValue = new Token("/",getPosition()); return Tokens.tREGEXP_BEG; } int c = src.read(); if (c == '=') { yaccValue = new Token("/", getPosition()); setState(LexState.EXPR_BEG); return Tokens.tOP_ASGN; } src.unread(c); if (isSpaceArg(c, spaceSeen)) { arg_ambiguous(); lex_strterm = new StringTerm(str_regexp, '\0', '/'); yaccValue = new Token("/",getPosition()); return Tokens.tREGEXP_BEG; } determineExpressionState(); yaccValue = new Token("/", getPosition()); warn_balanced(c, spaceSeen, "/", "regexp literal"); return Tokens.tDIVIDE; }
if (isARG()) arg_ambiguous(); setState(LexState.EXPR_BEG); src.unread(c);
if (isARG()) arg_ambiguous(); setState(LexState.EXPR_BEG); src.unread(c);
if (isARG()) arg_ambiguous(); setState(LexState.EXPR_BEG); src.unread(c);
if (isARG()) arg_ambiguous(); setState(LexState.EXPR_BEG); src.unread(c);