Skip to Content.
Sympa Menu

k-user - [K-user] How to control the scanner (lexer) of K parser?

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

[K-user] How to control the scanner (lexer) of K parser?


Chronological Thread 
  • From: "Park, Daejun" <dpark69 AT illinois.edu>
  • To: "k-user AT cs.uiuc.edu" <k-user AT cs.uiuc.edu>
  • Subject: [K-user] How to control the scanner (lexer) of K parser?
  • Date: Fri, 1 Nov 2013 17:50:30 +0000
  • Accept-language: en-US
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user/>
  • List-id: <k-user.cs.uiuc.edu>

Hi all,

How can I parse a string enclosed by a single quote(')? More generally, how
can I redefine the "String" sort?

What I've found is that it has something to do with the following line at
builtins/string.k:
rule #parseToken("#String",S:String) => (S)
but I don't know where '#String' comes from.

Also, I want to know how to control the scanner (lexer) of K parser. For
example, when it comes to handling unicode characters or parsing in a line
break sensitive manner, what should I do?

Thanks,
Daejun




Archive powered by MHonArc 2.6.16.

Top of Page