instaparse

If you're not trampolining your parser, why bother getting up in the morning?
aengelberg 2017-03-09T00:00:19.000297Z

@bherrmann: in comparison, instaparse is slow and memory-inefficient, but far easier to use and accepts more types of grammars

aengelberg 2017-03-09T00:00:44.000298Z

I've never actually used ANTLR so I'm just guessing on both points

bherrmann 2017-03-09T00:00:53.000299Z

Ha!

bherrmann 2017-03-09T00:01:42.000300Z

We have a large oracle grammar… in ANTLR and I’m curious about using instaparse instead

aengelberg 2017-03-09T00:02:30.000301Z

So it's already working in ANTLR?

aengelberg 2017-03-09T00:02:34.000302Z

Why would you want to switch?

aengelberg 2017-03-09T00:05:15.000303Z

(genuinely curious)

bherrmann 2017-03-09T00:08:12.000304Z

well. This might be the wrong reason

bherrmann 2017-03-09T00:08:36.000305Z

by when we make changes to the ANTLR grammar, it generates a java file which is too big to be compiled

1😳
bherrmann 2017-03-09T00:09:02.000306Z

so at the moment, we have to giggle the rules to keep the output small enough to be compiled.

bherrmann 2017-03-09T00:09:10.000307Z

It is ANTLR V3

seylerius 2017-03-09T00:10:08.000308Z

That sounds... clumsy.

bherrmann 2017-03-09T00:11:33.000310Z

well, it that old song of someone understanding how ANTLR v3 works and them leaving the company....

bherrmann 2017-03-09T00:16:56.000311Z

I’m working with a modified version of this http://www.antlr3.org/grammar/1209225566284/PLSQL3.g

bherrmann 2017-03-09T00:17:34.000312Z

I should really read this https://tomassetti.me/antlr-mega-tutorial/

bherrmann 2017-03-09T00:18:10.000314Z

although that page is ANTLR V4

bherrmann 2017-03-09T00:18:44.000315Z

I’m curious if the PLSQL3.g could easily be consumed by Instaparse

aengelberg 2017-03-09T00:20:45.000316Z

The is_sql thing actually looks like something unique to ANTLR (not standard BNF)

aengelberg 2017-03-09T00:20:52.000317Z

i.e. setting local variables

bherrmann 2017-03-09T00:23:50.000318Z

yea, that is weird

bherrmann 2017-03-09T00:24:24.000319Z

we dont use the is_sql in our copy.

bherrmann 2017-03-09T00:28:18.000320Z

so the grammar has about 1600 lines (ours has around 2k)… They appear otherwise very similar