🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3611

Translation phases

#3611
From: Richard A. O'Keefe
Date: Wed, 02 Aug 1995 05:53
25 lines
1410 bytes
I'm trying to write an ever-so-simple little statement counter for C.
Basically, I want to count lines, comment (blocks), functions,
executable statements, and a few other things.

The thing which is proving unexpectedly hard is the tokeniser.
Could someone confirm that I have understood correctly that the order
of translation phases is to be taken in deadly earnest, that
"backslash new line" can appear _anywhere_, so that for example
	|L\
	|'x\
	|'
is a valid long character constant, and
	|/\
	|* wow *\
	|/
is a valid comment?

I am in the process of adding support for this to my tokeniser, but if it's
true, then it simply adds more fuel to my distaste for text-based tools
such as found in "Software Engineering with Perl" (Dichter & Pease).

-- 
"conventional orthography is ... a near optimal system for the
 lexical representation of English words." Chomsky & Halle, S.P.E.
Richard A. O'Keefe; http://www.cs.rmit.edu.au/~ok; RMIT Comp.Sci.
Technical Details
Message-ID: <3vn3sp$qi6@goanna.cs.rmit.edu.au>
Path: arc1-ca.pugleaf.net!goanna.cs.rmit.edu.au!not-for-mail

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!goanna.cs.rmit.edu.au!not-for-mail
From: ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe)
Newsgroups: comp.std.c
Subject: Translation phases
Date: 2 Aug 1995 15:53:29 +1000
Organization: Comp Sci, RMIT, Melbourne, Australia
Message-ID: <3vn3sp$qi6@goanna.cs.rmit.edu.au>
NNTP-Posting-Host: goanna.cs.rmit.edu.au
NNTP-Posting-User: ok
Keywords: \ <newline> can happen ANYWHERE
X-Newsreader: NN version 6.5.0 #0 (NOV)