Hi there! I am trying to build a parser for visual basic. For doing so i found the Antlr definition of VB on the microsoft site. I was wondering if it would be possible to use SmaCC for generating this parser. Does any have experience in adapting Antlr4 grammars to the SmaCC format ?? Or any clue about where to start checking for a clue about it would be helpful also! Thanks in advance. Santiago
On Thu, 2019-10-03 at 11:54 +0200, Santiago Bragagnolo wrote:
Hi there! I am trying to build a parser for visual basic. For doing so i found the Antlr definition of VB on the microsoft site.
I was wondering if it would be possible to use SmaCC for generating this parser. Does any have experience in adapting Antlr4 grammars to the SmaCC format ?? Or any clue about where to start checking for a clue about it would be helpful also!
Hi, I tried with fortran and the answer was: Not so easy. But then again, Fortran predates the theory of languages and it was not defined to be easily parseable with a formal grammar. Be aware however that parsing is only half of the problem. After you must also do name resolution i.e. this method call correspond to which method definition. In some language like C or Fortran, this is relatively easy because there is only one namespace, no overloading, etc. In OO languages, it can be a really difficult issue. That's why we try to use external parsers/compilers (like Roselyn) We can talk next week nicolas
Thanks in advance.
Santiago -- Nicolas Anquetil RMod team -- Inria Lille
Nicolas Anquetil <nicolas.anquetil@inria.fr> wrote:
On Thu, 2019-10-03 at 11:54 +0200, Santiago Bragagnolo wrote:
Hi there! I am trying to build a parser for visual basic. For doing so i found the Antlr definition of VB on the microsoft site.
I tried with fortran and the answer was: Not so easy. But then again, Fortran predates the theory of languages and it was not defined to be easily parseable with a formal grammar.
On the other hand, you know that you can parse these kinds of languages with 16K of ram, one 80 character line at a time. Stephan
SmaCC ships with Antlr4Parser. Cheers, Doru
On Oct 3, 2019, at 11:54 AM, Santiago Bragagnolo <santiagobragagnolo@gmail.com> wrote:
Hi there! I am trying to build a parser for visual basic. For doing so i found the Antlr definition of VB on the microsoft site.
I was wondering if it would be possible to use SmaCC for generating this parser. Does any have experience in adapting Antlr4 grammars to the SmaCC format ?? Or any clue about where to start checking for a clue about it would be helpful also!
Thanks in advance.
Santiago
-- feenk.com "We cannot reach the flow of things unless we let go."
participants (4)
-
Nicolas Anquetil -
Santiago Bragagnolo -
Stephan Eggermont -
Tudor Girba