Error running sablecc..
Jules Bean
jmlb2 at hermes.cam.ac.uk
Sun Mar 21 15:29:59 PST 1999
I'm just about to start writing a parser using SableCC (which I found out
about from the link on the transvirtual page).
Unfortunately, I can't even run the supplied example parsers..
The problem is in this snippet of java code:
(from ca/mcgill/sablecc/parser/Parser.java)
public Parser(Lexer lexer)
{
this.lexer = lexer;
try
{
ObjectInputStream s = new
ObjectInputStream(getClass().getResourceAsStream("parser.dat"));
actionTable = (int[][][]) s.readObject();
gotoTable = (int[][]) s.readObject();
errors = (String[]) s.readObject();
s.close();
}
catch(Exception e)
{
throw new RuntimeException("Unable to read parser.dat.");
}
}
..the code throws the exception. So, it looks like there's a problem with
either kaffe's serialisation stuff, or kaffe's getResource stuff.
I'm using 1.0b3 - I rather suspect the answer is going to be 'upgrade to
the CVS version', but I though I'd check here first.
Jules
/----------------+-------------------------------+---------------------\
| Jelibean aka | jules at jellybean.co.uk | 6 Evelyn Rd |
| Jules aka | jules at debian.org | Richmond, Surrey |
| Julian Bean | jmlb2 at hermes.cam.ac.uk | TW9 2TF *UK* |
+----------------+-------------------------------+---------------------+
| War doesn't demonstrate who's right... just who's left. |
| When privacy is outlawed... only the outlaws have privacy. |
\----------------------------------------------------------------------/
More information about the kaffe
mailing list