基本的R解析器有一些代码吗? [英] is there some code for a basic R parser?
问题描述
我正在寻找用于解析R代码的Bison/Flex实现,以便可以在C ++程序中使用它来实现利用R表达式的编程语言.
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.
除此以外,我在Google上找不到任何可用的东西:
I couldn't find anything available on Google, other than this:
https://github.com/halpo/parser
,这似乎不是一个R解析器. (例如,我找不到R表达式的BNF语法.)
and this does not seem to be quite an R parser. (For example, I couldn't find the BNF grammar for R expressions.)
实际上是下载R源代码并使用它的唯一途径吗? R是一个非常复杂的软件,我不确定将解析器与其余代码隔离会非常容易.
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.
推荐答案
您应该拥有更好的外观: https://github.com/halpo/parser/blob/master /inst/grammar/gram.y
You should have a better look: https://github.com/halpo/parser/blob/master/inst/grammar/gram.y
这篇关于基本的R解析器有一些代码吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!