Codebase list jlex / ad4e5330-8324-4503-9bd3-f5c17e6c09a3/main bug12.txt
ad4e5330-8324-4503-9bd3-f5c17e6c09a3/main

Tree @ad4e5330-8324-4503-9bd3-f5c17e6c09a3/main (Download .tar.gz)

bug12.txt @ad4e5330-8324-4503-9bd3-f5c17e6c09a3/mainraw · history · blame

Date: Wed, 10 Sep 1997 21:47:06 -0400
To: appel@princeton.edu
From: William Uther <will+@cs.cmu.edu>
Subject: JLex Bug

Hi,
  I'm using JLex 1.2 on a macintosh using the Metrowerks compiler and VM.
I've been having problems with the EOLN char (\r and/or \n).

  Might I suggest you use java.lang.System.getProperty("line.separator") to
get the line separation string?  You could even include an EOLN macro
containing the correct end of line regular expression.  (On old DOS
systems, end of line is two characters, \r\n, so a single character for
EOLN wont work if you want to support these).

  If you were really tricky you might be able to work the EOLN format back
into the parser (not just the generator) so that it has the
System.getProperty call in it and it will work on any system.

I've solved the problem by having my own EOLN=[\r\n] macro. (note, this is
not \r\n that I seem to get with m_unix set to false).

later,

\x/ill        :-}

William Uther               "Most people would sooner die than think;
will@cs.cmu.edu                In fact, they do so."
Dept. of Computer Science,       - Bertrand Russell
Carnegie Mellon University         http://www.cs.cmu.edu/~will/