Antlr4 + SmaCC

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Antlr4 + SmaCC

Santiago Bragagnolo
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
Reply | Threaded
Open this post in threaded view
|

Re: Antlr4 + SmaCC

Nicolas Anquetil
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


Reply | Threaded
Open this post in threaded view
|

Re: Antlr4 + SmaCC

Tudor Girba-2
In reply to this post by Santiago Bragagnolo
SmaCC ships with Antlr4Parser.

Cheers,
Doru



> On Oct 3, 2019, at 11:54 AM, Santiago Bragagnolo <[hidden email]> 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."







Reply | Threaded
Open this post in threaded view
|

Re: Antlr4 + SmaCC

Stephan Eggermont-3
In reply to this post by Nicolas Anquetil
Nicolas Anquetil <[hidden email]> 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