k-user AT lists.cs.illinois.edu
Subject: K-user mailing list
List archive
- From: Sandeep Dasgupta <sdasgup3 AT illinois.edu>
- To: <k-user AT lists.cs.illinois.edu>
- Cc: <sdasgup3 AT illinois.edu>
- Subject: [[K-user] ] Help Needed: Hex to String
- Date: Mon, 27 Nov 2017 17:02:17 -0600
- Authentication-results: illinois.edu; spf=pass smtp.mailfrom=sdasgup3 AT illinois.edu
Hello Team, I would like to parse a hex constant like ``` syntax HexConstant ::= r"0x[0-9a-fA-F]*" [token] ``` and use the hook `STRING.string2base` to get the `Int` equivalent, like ``` syntax Int ::= HexStringtToInt(String, Int) [function, hook(STRING.string2base)] rule convert(S:String) => HexStringtToInt(S, 16) ``` but for that i need the hex as String, which I could not find how to get. Can you guys please me with that? Regards, Sandeep |
- [[K-user] ] Help Needed: Hex to String, Sandeep Dasgupta, 11/27/2017
Archive powered by MHonArc 2.6.19.