Related articles |
---|
JCUP Termination nkg25@hermes.cam.ac.uk (Nitin Kumar Goel) (2000-12-18) |
Re: JCUP Termination maratb@CS.Berkeley.EDU (Marat Boshernitsan) (2000-12-18) |
From: | Marat Boshernitsan <maratb@CS.Berkeley.EDU> |
Newsgroups: | comp.compilers |
Date: | 18 Dec 2000 12:15:19 -0500 |
Organization: | University of California at Berkeley |
References: | 00-12-071 |
Keywords: | Java, lex |
Posted-Date: | 18 Dec 2000 12:15:19 EST |
Nitin Kumar Goel <nkg25@hermes.cam.ac.uk> writes:
> I am having difficulty getting JCUP (with a JLex Lexer) to terminate
> when reaching an EOF. Instead it throws a
> Java.lang.NullPointerException exception.
The trick is to do the right thing on EOF in the lexer (the default
action is to return null, hence the exception). Look up %eofval in the
Jlex manual.
Marat Boshernitsan.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.