in reply to Re: 10 languages
in thread 10 languages

If you open a paren in PostScript, it just starts a string, which you can cancel later with `pop'. And a paren is a quite harmless character in most other languages. See the 1st two lines in my original code.

Replies are listed 'Best First'.
Re^3: 10 languages
by truedfx (Monk) on Jan 17, 2006 at 19:36 UTC
    Thanks. Unfortunately, the problem is that a C program (again, unless you don't mind making it invalid) can't start with a (; it must start with a keyword after preprocessing, and before preprocessing, the only ways around that are by starting with #, %:, //, /*, or _Pragma, possibly combined with \. (Technically, trigraphs could also be used, but ?? causes even bigger problems.) Comments in Lisp start with ; or are embedded in #|...|#, so the opening must be a valid Lisp expression. The two things that don't break C that I could find are //, and #\ followed by a newline. Both seem to unconditionally break PostScript, but if you have a way around that, I'd be very interested.