k-user AT lists.cs.illinois.edu
Subject: K-user mailing list
List archive
- From: Radu Mereuta <headness13 AT gmail.com>
- To: Joshua Cranmer <cranmer2 AT illinois.edu>
- Cc: k-user AT cs.uiuc.edu
- Subject: Re: [K-user] Using an external parser
- Date: Mon, 10 Dec 2012 23:40:41 +0200
- List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user/>
- List-id: <k-user.cs.uiuc.edu>
I hope this helps.
You need to modify your parser to create a K like AST. You can look at some examples in the K distribution and use the `kast` tool on some small programs to see how it looks like. To integrate your external parser, you need to call krun with the option -parser.
Type `krun --help` to get more information (like below).
--parser <STRING> Command used to parse programs (default: kast).
You need to specify the path where you parser
is located on the disk
You need to specify the path where you parser
is located on the disk
If you still have problems, then I think Dwight can give you more details.
So, Dwight, any thoughts?
Radu
On Mon, Dec 10, 2012 at 11:31 PM, Joshua Cranmer <cranmer2 AT illinois.edu> wrote:
I'm trying to implement the regular expressions in _javascript_. To do this, I need to be able to take the "a*b" from new RegExp("a*b") and turn that into an internal AST representation of the regular _expression_. I have an external parser which can produce an AST of the regular _expression_, but I don't know how to get K to call this external parser and get an internal AST represntation back.On 12/10/2012 3:25 PM, Radu Mereuta wrote:
Hy Joshua,
Could you give as a little bit more details of what you want to do and where is your problem? I don't really understand where you are stuck.
-- Joshua Cranmer Source code archæologist
- [K-user] Using an external parser, Joshua Cranmer, 12/10/2012
- Re: [K-user] Using an external parser, Radu Mereuta, 12/10/2012
- Re: [K-user] Using an external parser, Joshua Cranmer, 12/10/2012
- Re: [K-user] Using an external parser, Radu Mereuta, 12/10/2012
- Re: [K-user] Using an external parser, Joshua Cranmer, 12/10/2012
- Re: [K-user] Using an external parser, Guth, Dwight, 12/10/2012
- Re: [K-user] Using an external parser, Radu Mereuta, 12/10/2012
- Re: [K-user] Using an external parser, Joshua Cranmer, 12/10/2012
- Re: [K-user] Using an external parser, Radu Mereuta, 12/10/2012
Archive powered by MHonArc 2.6.16.