Error running sablecc..
Jules Bean
jmlb2 at hermes.cam.ac.uk
Mon Mar 22 04:51:45 PST 1999
On Sun, 21 Mar 1999, Jules Bean wrote:
> 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.
OK. I updated to CVS (as of today). I still doesn't work. Error exactly
as above.
I know my way around gdb, I'm happy to give more helpful info, but I'm not
sure what would help..
(To try it yourself, download sablecc from http://www.sable.mcgill.ca)
Jules
/----------------+-------------------------------+---------------------\
| Jelibean aka | jules at jellybean.co.uk | 6 Evelyn Rd |
| Jules aka | | 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