private int singleQuote(boolean commandState) throws IOException { int label = isLabelPossible(commandState) ? str_label : 0; lex_strterm = new StringTerm(str_squote|label, '\0', '\'', ruby_sourceline); yaccValue = Q; return RubyParser.tSTRING_BEG; }
private int doubleQuote(boolean commandState) throws IOException { int label = isLabelPossible(commandState) ? str_label : 0; lex_strterm = new StringTerm(str_dquote|label, '\0', '"', ruby_sourceline); yaccValue = QQ; return RubyParser.tSTRING_BEG; }
private int doubleQuote(boolean commandState) throws IOException { int label = isLabelPossible(commandState) ? str_label : 0; lex_strterm = new StringTerm(str_dquote|label, '\0', '"', ruby_sourceline); yaccValue = QQ; return RubyParser.tSTRING_BEG; }
private int singleQuote(boolean commandState) throws IOException { int label = isLabelPossible(commandState) ? str_label : 0; lex_strterm = new StringTerm(str_squote|label, '\0', '\'', ruby_sourceline); yaccValue = Q; return RubyParser.tSTRING_BEG; }
protected int restore(RubyLexer lexer) { lexer.heredoc_restore(this); lexer.setStrTerm(new StringTerm(flags | STR_FUNC_TERM, 0, 0, line)); // weird way to terminate heredoc. return EOF; }
protected int restore(RubyLexer lexer) { lexer.heredoc_restore(this); lexer.setStrTerm(new StringTerm(flags | STR_FUNC_TERM, 0, 0, line)); // weird way to terminate heredoc. return EOF; }
private int doubleQuote() throws IOException { lex_strterm = new StringTerm(str_dquote, '\0', '"'); yaccValue = new Token("\"", getPosition()); return Tokens.tSTRING_BEG; }
private int singleQuote() throws IOException { lex_strterm = new StringTerm(str_squote, '\0', '\''); yaccValue = new Token("'", getPosition()); return Tokens.tSTRING_BEG; }
private int doubleQuote() throws IOException { lex_strterm = new StringTerm(str_dquote, '\0', '"'); yaccValue = new Token("\"", getPosition()); return Tokens.tSTRING_BEG; }
private int singleQuote() throws IOException { lex_strterm = new StringTerm(str_squote, '\0', '\''); yaccValue = new Token("'", getPosition()); return Tokens.tSTRING_BEG; }
private int backtick(boolean commandState) throws IOException { yaccValue = BACKTICK; if (isLexState(lex_state, EXPR_FNAME)) { setState(EXPR_ENDFN); return RubyParser.tBACK_REF2; } if (isLexState(lex_state, EXPR_DOT)) { setState(commandState ? EXPR_CMDARG : EXPR_ARG); return RubyParser.tBACK_REF2; } lex_strterm = new StringTerm(str_xquote, '\0', '`', ruby_sourceline); return RubyParser.tXSTRING_BEG; }
private int backtick(boolean commandState) throws IOException { yaccValue = new Token("`", getPosition()); switch (lex_state) { case EXPR_FNAME: setState(isOneEight ? LexState.EXPR_END : LexState.EXPR_ENDFN); return Tokens.tBACK_REF2; case EXPR_DOT: setState(commandState ? LexState.EXPR_CMDARG : LexState.EXPR_ARG); return Tokens.tBACK_REF2; default: lex_strterm = new StringTerm(str_xquote, '\0', '`'); return Tokens.tXSTRING_BEG; } }
private int backtick(boolean commandState) throws IOException { yaccValue = BACKTICK; if (isLexState(lex_state, EXPR_FNAME)) { setState(EXPR_ENDFN); return RubyParser.tBACK_REF2; } if (isLexState(lex_state, EXPR_DOT)) { setState(commandState ? EXPR_CMDARG : EXPR_ARG); return RubyParser.tBACK_REF2; } lex_strterm = new StringTerm(str_xquote, '\0', '`', ruby_sourceline); return RubyParser.tXSTRING_BEG; }
private int backtick(boolean commandState) throws IOException { yaccValue = new Token("`", getPosition()); switch (lex_state) { case EXPR_FNAME: setState(isOneEight ? LexState.EXPR_END : LexState.EXPR_ENDFN); return Tokens.tBACK_REF2; case EXPR_DOT: setState(commandState ? LexState.EXPR_CMDARG : LexState.EXPR_ARG); return Tokens.tBACK_REF2; default: lex_strterm = new StringTerm(str_xquote, '\0', '`'); return Tokens.tXSTRING_BEG; } }
private int slash(boolean spaceSeen) throws IOException { if (isBEG()) { lex_strterm = new StringTerm(str_regexp, '\0', '/', ruby_sourceline); yaccValue = SLASH; return RubyParser.tREGEXP_BEG; } int c = nextc(); if (c == '=') { setState(EXPR_BEG); yaccValue = SLASH; return RubyParser.tOP_ASGN; } pushback(c); if (isSpaceArg(c, spaceSeen)) { arg_ambiguous(); lex_strterm = new StringTerm(str_regexp, '\0', '/', ruby_sourceline); yaccValue = SLASH; return RubyParser.tREGEXP_BEG; } setState(isAfterOperator() ? EXPR_ARG : EXPR_BEG); yaccValue = SLASH; warn_balanced(c, spaceSeen, "/", "regexp literal"); return RubyParser.tDIVIDE; }
private int slash(boolean spaceSeen) throws IOException { if (isBEG()) { lex_strterm = new StringTerm(str_regexp, '\0', '/', ruby_sourceline); yaccValue = SLASH; return RubyParser.tREGEXP_BEG; } int c = nextc(); if (c == '=') { setState(EXPR_BEG); yaccValue = SLASH; return RubyParser.tOP_ASGN; } pushback(c); if (isSpaceArg(c, spaceSeen)) { arg_ambiguous(); lex_strterm = new StringTerm(str_regexp, '\0', '/', ruby_sourceline); yaccValue = SLASH; return RubyParser.tREGEXP_BEG; } setState(isAfterOperator() ? EXPR_ARG : EXPR_BEG); yaccValue = SLASH; warn_balanced(c, spaceSeen, "/", "regexp literal"); return RubyParser.tDIVIDE; }
lex_strterm = new StringTerm(str_ssym, '\0', c, ruby_sourceline); break; case '"': lex_strterm = new StringTerm(str_dsym, '\0', c, ruby_sourceline); break; default:
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; }
lex_strterm = new StringTerm(str_ssym, '\0', c); break; case '"': lex_strterm = new StringTerm(str_dsym, '\0', c); break; default: