Callback boilerplate for the Java lexer.

This commit is contained in:
Yorick Peterse 2014-05-07 01:01:24 +02:00
parent e271298984
commit b9a4038e42
1 changed files with 13 additions and 5 deletions

View File

@ -1,6 +1,6 @@
package org.liboga.xml; package org.liboga.xml;
%%machine lexer; %%machine java_lexer;
import java.io.IOException; import java.io.IOException;
@ -67,17 +67,25 @@ public class Lexer extends RubyObject
int eof = 0; int eof = 0;
int top = 0; int top = 0;
int[] stack = {}; int[] stack = new int[8];
%% write init; %% write init;
%% write exec; %% write exec;
return context.nil; return context.nil;
} }
public void callback(String name, byte[] data, Encoding enc, int ts, int te)
{
}
public void callback_simple(String name)
{
}
} }
%%{ %%{
main := |* include base_lexer "base_lexer.rl";
any;
*|;
}%% }%%