coAST
coAST copied to clipboard
Some insights on coAST
It'd be helpful if we get to know more about what problems coAST would solve? Prefereably in some detail cc @sils1297
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?
@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?
@sils1297 I'd summarize what we discuss here and update the idea page in the end? Probably, I'd have better content then
nothing in particular, if coast is good it can be rather complicated things too
Sincerely,
Lasse Schuirmann
[email protected] http://viperdev.io/
2016-03-14 22:35 GMT+01:00 Tushar [email protected]:
@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 https://github.com/coala-analyzer/coAST/issues/2#issuecomment-196531026.
@tushar-rishav you are aware that coAST is mainly for having a language-independent AST generation?
@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?
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
[email protected] http://viperdev.io/
2016-03-18 14:36 GMT+01:00 Tushar [email protected]:
@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 https://github.com/coala-analyzer/coAST/issues/2#issuecomment-198361209
@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.
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^^
(If we write them ourselves)