k-user AT lists.cs.illinois.edu
Subject: K-user mailing list
List archive
- From: Gary Leavens <leavens AT cs.ucf.edu>
- To: K-User List <k-user AT lists.cs.illinois.edu>
- Subject: [[K-user] ] How to specify a new style of comments for a language?
- Date: Tue, 20 Jun 2017 21:25:53 -0400
Hi,
In defining the syntax of a new language in K, how do I specify the comment convention for that language? For example, suppose I want comments to start with
-- and continue to the end of the line, as in Haskell. It seems like something along the lines of
syntax Comment ::= Token{"--" ~[\n\r]*[\n\r]}
should work, but then how do I get the parser to ignore these Comment tokens?
Regards,
Gary T. Leavens
437D Harris Center (Bldg. 116)
Computer Science, University of Central Florida
4000 Central Florida Blvd., Orlando, FL 32816-2362 USA
http://www.cs.ucf.edu/~leavens phone: +1-407-823-4758
- [[K-user] ] How to specify a new style of comments for a language?, Gary Leavens, 06/20/2017
- Re: [[K-user] ] How to specify a new style of comments for a language?, Christos Kloukinas, 06/21/2017
- Re: [[K-user] ] How to specify a new style of comments for a language?, Radu Mereuta, 06/21/2017
- Re: [[K-user] ] How to specify a new style of comments for a language?, Christos Kloukinas, 06/21/2017
Archive powered by MHonArc 2.6.19.