Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R support #382

Open
jimhester opened this issue Nov 14, 2019 · 4 comments
Open

R support #382

jimhester opened this issue Nov 14, 2019 · 4 comments

Comments

@jimhester
Copy link

@jimhester jimhester commented Nov 14, 2019

R is a widely used, growing language often used in Data Science and Statistics.

While it does not have a published formal specification, there is a draft specification that describes lexing and parsing the language.

In the most widely used implementation the parsing is done with a bison parser defined in gram.y.

The lexing rules for R are somewhat complex, but the parsing is relatively straightforward, as generally everything is an expression.

It would very beneficial to the R community to have support for R in semantic!

@XVilka

This comment has been minimized.

Copy link

@XVilka XVilka commented Nov 15, 2019

A first step would be creating a tree sitter grammar for R. See more in their documentation on creating new parsers.
After that, the hardest part begins - implementing the semantic part: https://github.com/github/semantic/blob/master/docs/adding-new-languages.md

@tclem

This comment has been minimized.

Copy link
Member

@tclem tclem commented Nov 18, 2019

Definitely start with a tree-sitter parser.

After that, the hardest part begins - implementing the semantic part

This is about to get much, much easier as we are almost entirely automating the semantic part. My advise would be to get the tree-sitter grammar in good shape and then check in again with the team so see if we can use the new path for supporting languages in semantic.

@2yz

This comment has been minimized.

Copy link

@2yz 2yz commented Dec 3, 2019

Definitely start with a tree-sitter parser.

After that, the hardest part begins - implementing the semantic part

This is about to get much, much easier as we are almost entirely automating the semantic part. My advise would be to get the tree-sitter grammar in good shape and then check in again with the team so see if we can use the new path for supporting languages in semantic.

Is the new path for supporting languages available soon?

@tclem

This comment has been minimized.

Copy link
Member

@tclem tclem commented Dec 4, 2019

Is the new path for supporting languages available soon?

I don't have a specific timeline to give you, but you can see an example for java and python of what's required to generate code from the new node-types.json. Obviously part of the work here is to better surface our documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.