Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CWEB and Java

2 views
Skip to first unread message

Richard Walker

unread,
Jan 20, 1997, 3:00:00 AM1/20/97
to

DEK claims that CWEB will process Java (see Knuth's CWEB `home page').
But as far as I can see there's no way to turn off the outputting
of #line directives, which are most definitely NOT legal Java!

So what's the story?

Richard.
--
Richard Walker ric...@cs.anu.edu.au
Department of Computer Science Aust: (06) 279 8194
The Australian National University Intl: +61 6 279 8194
Canberra, ACT 0200, Australia Fax: +61 6 249 0010

Beirne Konarski

unread,
Jan 26, 1997, 3:00:00 AM1/26/97
to

Richard Walker wrote:
>
> DEK claims that CWEB will process Java (see Knuth's CWEB `home page').
> But as far as I can see there's no way to turn off the outputting
> of #line directives, which are most definitely NOT legal Java!
>
> So what's the story?
>

I had the same problem. I fixed this by making a makefile rule to
filter the #line directives out of the CWEB output. This means that
errors referencing line numbers don't work, but this hasn't been too
much of a problem.

Beirne

--
Beirne Konarski | Unicycling Home Page:
bei...@ald.net | http://www.unicycling.org
"Untouched by Scandal" | Unicycling Society of America:
| http://www.unicycling.org/usa/

Benedikt Stockebrand

unread,
Jan 26, 1997, 3:00:00 AM1/26/97
to

ric...@cs.anu.edu.au (Richard Walker) writes:

> DEK claims that CWEB will process Java (see Knuth's CWEB `home page').
> But as far as I can see there's no way to turn off the outputting
> of #line directives, which are most definitely NOT legal Java!
>
> So what's the story?

Don't know, I don't use CWEB. But as a workaround, pipe the CWEB
output through

sed '/^#line/d'

for now. I'd be surprised if CWEB didn't have an option to disable
#line directives though.


Ben

--
Ben(edikt)? Stockebrand Runaway ping.de Admin---Never Ever Trust Old Friends
My name and email address are not to be added to any list used for advertising
purposes. Any sender of unsolicited advertisement e-mail to this address im-
plicitly agrees to pay a DM 500 fee to the recipient for proofreading services.

Marc van Leeuwen

unread,
Jan 27, 1997, 3:00:00 AM1/27/97
to

In article <87ybdg4...@devnull.ruhr.de>, Benedikt Stockebrand

<bene...@devnull.ruhr.de> writes:
|> ric...@cs.anu.edu.au (Richard Walker) writes:
|>
|> > DEK claims that CWEB will process Java (see Knuth's CWEB `home page').
|> > But as far as I can see there's no way to turn off the outputting
|> > of #line directives, which are most definitely NOT legal Java!
|>
|> Don't know, I don't use CWEB. But as a workaround, pipe the CWEB
|> output through
|>
|> sed '/^#line/d'
|>
|> for now. I'd be surprised if CWEB didn't have an option to disable
|> #line directives though.

CWEB does _not_ have such an option, but CWEBx does (option -l to CTANGLE).
This does not mean that I claim that CWEBx works well with Java, because I
do not know that language well enough, so I simply cannot tell. What I do
know is that Knuth's claim of applicabilitiy of CWEB to Java was not
accompanied by _any_ changes to CWEB (I checked this, since I like to keep
CWEBx fully compatible with CWEB).

--
Marc van Leeuwen | What has man wrought
CWI, Amsterdam | for the year naughty-naught?
http://www.cwi.nl/~maavl/ | '00-programming will get its revenge!

0 new messages