kloop
kloop

Reputation: 4721

is there some code for a basic R parser?

I am looking for a Bison/Flex implementation for parsing R code, so that I can use it in a C++ program to implement a programming language that makes use of R expressions.

I couldn't find anything available on Google, other than this:

https://github.com/halpo/parser

and this does not seem to be quite an R parser. (For example, I couldn't find the BNF grammar for R expressions.)

Is the only way left actually to download R source code and play with it? R is quite a complex piece of software, and I am not sure it would be very easy to isolate the parser from the rest of the code.

Upvotes: 6

Views: 2158

Answers (1)

Karl Forner
Karl Forner

Reputation: 4414

You should have a better look: https://github.com/halpo/parser/blob/master/inst/grammar/gram.y

Upvotes: 1

Related Questions