Setup Ragel for JRuby and load things the hard way
This commit is contained in:
parent
aea8378fbb
commit
6e685378e0
|
@ -26,6 +26,18 @@ public class Lexer extends RubyObject
|
||||||
@JRubyMethod
|
@JRubyMethod
|
||||||
public IRubyObject advance_native(ThreadContext context)
|
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 init;
|
||||||
%% write exec;
|
%% write exec;
|
||||||
|
|
||||||
|
|
10
lib/oga.rb
10
lib/oga.rb
|
@ -1,11 +1,17 @@
|
||||||
require 'set'
|
require 'set'
|
||||||
|
|
||||||
require_relative 'liboga'
|
|
||||||
|
|
||||||
require_relative 'oga/xml/lexer'
|
require_relative 'oga/xml/lexer'
|
||||||
require_relative 'oga/xml/parser'
|
require_relative 'oga/xml/parser'
|
||||||
require_relative 'oga/xml/pull_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/node'
|
||||||
require_relative 'oga/xml/element'
|
require_relative 'oga/xml/element'
|
||||||
require_relative 'oga/xml/document'
|
require_relative 'oga/xml/document'
|
||||||
|
|
Loading…
Reference in New Issue