Setup Ragel for JRuby and load things the hard way

This commit is contained in:
Yorick Peterse 2014-05-06 19:06:04 +02:00
parent aea8378fbb
commit 6e685378e0
2 changed files with 20 additions and 2 deletions

View File

@ -26,6 +26,18 @@ public class Lexer extends RubyObject
@JRubyMethod
public IRubyObject advance_native(ThreadContext context)
{
int act = 0;
int cs = 0;
int ts = 0;
int te = 0;
int p = 0;
int pe = 0;
int eof = 0;
int top = 0;
int[] data = {};
int[] stack = {};
%% write init;
%% write exec;

View File

@ -1,11 +1,17 @@
require 'set'
require_relative 'liboga'
require_relative 'oga/xml/lexer'
require_relative 'oga/xml/parser'
require_relative 'oga/xml/pull_parser'
require_relative 'liboga'
# FIXME: it looks like this should not be needed but stuff doesn't load without
# it.
if RUBY_ENGINE == 'jruby'
org.liboga.LibogaService.new.basicLoad(JRuby.runtime)
end
require_relative 'oga/xml/node'
require_relative 'oga/xml/element'
require_relative 'oga/xml/document'