Parse and create an AST for a new language with SSLR

Hi everyone,

I finally finished to write the grammar for a new language inspiring myself from Python’s grammar here:

So according to: , I should now write a parser. However, I really have no idea on how to do that, and when I go to Python’s parser (, I don’t understand because it seems there is nothing to write. Can you help me please ?


Indeed, using SSLR makes it rather easy to have a parser once you have the grammar. According to the doc you mention:

a parser simply parses an input based on your grammar to yield a parse tree

As you started having a look at the Python analyzer, I suppose that you could check PythonSquidSensor and PythonScanner. That should help you understand how you can use the parser to feed metrics and issues to the SonarQube API.

Does that help you?


Oh I’m sorry, I don’t know why, but I never saw that you replied ! Well, that’s what I did and it is now working, but thank you very much for your answer !

1 Like