Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b4f8171ef6d0
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c2a2bfbc4285
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Nov 27, 2016

  1. Copy the full SHA
    0987659 View commit details
  2. Copy the full SHA
    c2a2bfb View commit details
Original file line number Diff line number Diff line change
@@ -140,7 +140,8 @@
import static org.jruby.truffle.parser.lexer.LexingCommon.EXPR_ENDFN;
import static org.jruby.truffle.parser.lexer.LexingCommon.EXPR_FNAME;
import static org.jruby.truffle.parser.lexer.LexingCommon.EXPR_LABEL;


@SuppressWarnings({"unchecked", "fallthrough"})
public class RubyParser {
protected final ParserSupport support;
protected final RubyLexer lexer;
@@ -156,7 +157,7 @@ public void setWarnings(IRubyWarnings warnings) {
support.setWarnings(warnings);
lexer.setWarnings(warnings);
}
// line 160 "-"
// line 161 "-"
// %token constants
public static final int kCLASS = 257;
public static final int kMODULE = 258;
@@ -3664,7 +3665,7 @@ public Object yyparse (RubyLexer yyLex) throws java.io.IOException {
};
states[461] = new ParserState() {
@Override public Object execute(ParserSupport support, RubyLexer lexer, Object yyVal, Object[] yyVals, int yyTop) {
yyVal = support.newRegexpNode(support.getPosition(((ParseNode)yyVals[-1+yyTop])), ((ParseNode)yyVals[-1+yyTop]), (RegexpParseNode) ((RegexpParseNode)yyVals[0+yyTop]));
yyVal = support.newRegexpNode(support.getPosition(((ParseNode)yyVals[-1+yyTop])), ((ParseNode)yyVals[-1+yyTop]), ((RegexpParseNode)yyVals[0+yyTop]));
return yyVal;
}
};
@@ -4024,7 +4025,7 @@ public Object yyparse (RubyLexer yyLex) throws java.io.IOException {
};
states[520] = new ParserState() {
@Override public Object execute(ParserSupport support, RubyLexer lexer, Object yyVal, Object[] yyVals, int yyTop) {
yyVal = new FileParseNode(lexer.getPosition(), new ByteList(lexer.getFile().getBytes(),
yyVal = new FileParseNode(lexer.getPosition(), new ByteList(lexer.getFile().getBytes(),
support.getConfiguration().getContext().getEncodingManager().getLocaleEncoding()));
return yyVal;
}
@@ -4665,7 +4666,7 @@ public Object yyparse (RubyLexer yyLex) throws java.io.IOException {
}
};
}
// line 2576 "RubyParser.y"
// line 2577 "RubyParser.y"

/** The parse method use an lexer stream and parse it to an AST node
* structure
@@ -4680,4 +4681,4 @@ public RubyParserResult parse(ParserConfiguration configuration) throws IOExcept
return support.getResult();
}
}
// line 10086 "-"
// line 10087 "-"
Original file line number Diff line number Diff line change
@@ -137,7 +137,8 @@ import static org.jruby.truffle.parser.lexer.LexingCommon.EXPR_ENDARG;
import static org.jruby.truffle.parser.lexer.LexingCommon.EXPR_ENDFN;
import static org.jruby.truffle.parser.lexer.LexingCommon.EXPR_FNAME;
import static org.jruby.truffle.parser.lexer.LexingCommon.EXPR_LABEL;


@SuppressWarnings({"unchecked", "fallthrough"})
public class RubyParser {
protected final ParserSupport support;
protected final RubyLexer lexer;
@@ -1934,7 +1935,7 @@ xstring : tXSTRING_BEG xstring_contents tSTRING_END {
}

regexp : tREGEXP_BEG regexp_contents tREGEXP_END {
$$ = support.newRegexpNode(support.getPosition($2), $2, (RegexpParseNode) $3);
$$ = support.newRegexpNode(support.getPosition($2), $2, $3);
}

words : tWORDS_BEG ' ' tSTRING_END {