From: | Bjarte Mayanja "Østvold" <bjartem@idi.ntnu.no> |
Newsgroups: | comp.compilers |
Date: | 24 Mar 1998 22:38:12 -0500 |
Organization: | Dept. of Computer and Information Science, NTNU |
References: | 98-03-032 98-03-098 98-03-141 98-03-147 98-03-159 98-03-183 |
Keywords: | syntax |
Stefan Monnier <monnier+comp/compilers/news/@tequila.cs.yale.edu> writes:
| What languages allow recursive comments ?
Haskell does:
> {- this {- stuff {- is -} a -} nested comment -}
>
> -- a couple of strings:
> str1 = "-}"
> str2 = "--"
| What languages enforce a "lexing" of the content of comments (so that an
| end-comment inside a string inside a comment is ignored) ?
Haskell does not do this. Commenting out str1 above using {- ... -}
gives a compiler error. Details are in Sec. 2.2 of the Haskell
Report: http://www.haskell.org/onlinereport/lexemes.html
Bjarte
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.