Path: utzoo!utgpu!watserv1!watmath!att!rutgers!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!ncar!ico!haddock!ima!esegue!compilers-sender From: adamsf@turing.cs.rpi.edu (Frank Adams) Newsgroups: comp.compilers Subject: Re: A Low-Rent Syntax Problem Summary: Put continuation character on continuation line. Keywords: lex, parse, design Message-ID: <=M~%JG&@rpi.edu> Date: 30 Aug 90 23:04:23 GMT References: Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: adamsf@turing.cs.rpi.edu (Frank Adams) Organization: RPI CS Dept. Lines: 25 Approved: compilers@esegue.segue.boston.ma.us Apparently-To: comp-compilers@cis.ohio-state.edu In article mcdaniel@adi.com (Tim McDaniel) writes: >Another problem I've had with low-rent syntax is how to tell the >lexer/parser to continue a source line. > >... > >- "\" followed by newline is removed, as in C. However what does this > mean? > a = 1 2 3 \// comment > ? Or what about > a = 1 2 3 // comment\ I have thought about this problem. My conclusion is that the continuation character should go on the *next* line (like FORTRAN!). You can choose between putting the continuation character as the first character of the line, or the as the first non-blank character. And, yes, a = 1 2 3 // comment \ 4 5 6 would continue the statement, not the comment. -- Send compilers articles to compilers@esegue.segue.boston.ma.us {ima | spdcc | world}!esegue. Meta-mail to compilers-request@esegue.