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

Some insights on coAST #2

Open
tushar-rishav opened this issue Mar 14, 2016 · 10 comments
Open

Some insights on coAST #2

tushar-rishav opened this issue Mar 14, 2016 · 10 comments

Comments

@tushar-rishav
Copy link
Member

It'd be helpful if we get to know more about what problems coAST would solve? Prefereably in some detail
cc @sils1297

@sils
Copy link
Member

sils commented Mar 14, 2016

well the idea is I can have any programming language, transform it to coAST and then I have a lot of algorithms that operate on coAST and do cool code analysis. I only need to write the algorithms once for all languages then, right?

Would you mind clarifying it in the repo a bit?

@tushar-rishav
Copy link
Member Author

@sils1297 Sure thing!
So that's cool. What sort of algorithms you are expecting to run on AST? I assume language specifics checks won't apply here. We can run something which is more general. Maybe things like Cyclomatic complexity? Is there anything else in particular?

@tushar-rishav
Copy link
Member Author

@sils1297 I'd summarize what we discuss here and update the idea page in the end? Probably, I'd have better content then

@sils
Copy link
Member

sils commented Mar 14, 2016

nothing in particular, if coast is good it can be rather complicated things
too

Sincerely,

Lasse Schuirmann

contact@viperdev.io
http://viperdev.io/

2016-03-14 22:35 GMT+01:00 Tushar notifications@github.com:

@sils1297 https://github.com/sils1297 Sure thing!
So that's cool. What sort of algorithms you are expecting to run on AST? I
assume language specifics checks won't apply here. We can run something
which is more general. Maybe things like Cyclomatic complexity? Is there
anything else in particular?


Reply to this email directly or view it on GitHub
#2 (comment).

@Makman2
Copy link
Member

Makman2 commented Mar 15, 2016

@tushar-rishav you are aware that coAST is mainly for having a language-independent AST generation?

@tushar-rishav
Copy link
Member Author

@sils1297 @Makman2 IIUC we need to create a rule/grammar to create a parser that works for all languages? If we want coAST to create AST for all the languages. One rule that fits all?

@sils
Copy link
Member

sils commented Mar 18, 2016

I think there'll be no way around making a parser for every language. Do
you know https://github.com/BNFC/bnfc ? I talked to the maintainer briefly
last guadec, that could be a possible thing...

Sincerely,

Lasse Schuirmann

contact@viperdev.io
http://viperdev.io/

2016-03-18 14:36 GMT+01:00 Tushar notifications@github.com:

@sils1297 https://github.com/sils1297 @Makman2
https://github.com/Makman2 IIUC we need to create a rule/grammar to
create a parser that works for all languages? If we want coAST to
create AST for all the languages. One rule that fits all?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#2 (comment)

@tushar-rishav
Copy link
Member Author

@sils1297 True! It's difficult task. I was going through https://github.com/orlandohill/waxeye or http://waxeye.org/ . They seem to parse C, Java, Javascript, Python, Ruby , Scheme. So once we have AST we can do analysis on it.

@Makman2
Copy link
Member

Makman2 commented Mar 18, 2016

Performance is also something we need to consider. Writing a parser in pure python could be fairly slow^^ Using Flex and Bison is in fact the right approach for this kind of work imo^^

@Makman2
Copy link
Member

Makman2 commented Mar 18, 2016

(If we write them ourselves)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants