[antlr-interest] Creating extension libraries for a DSL

Cliff Hudson cliff.s.hudson at gmail.com
Fri Apr 2 20:29:27 PDT 2010


Have you looked at other languages and seen a pattern you like?  You could
then follow that pattern.  Typically adding extensions as keywords would be,
well, basically something no one does at this point.  Assuming you support
the concept of a function call, then having otherwise unresolved functions
go through a resolution system which, say, looks at a list of declared
imports and figures out if the function is in one of them is a
well-understood pattern.

On Fri, Apr 2, 2010 at 8:32 AM, Andreas Stefik <stefika at gmail.com> wrote:

> Hey folks,
>
> Our development team here is nearly complete with a DSL that we've
> designed and are hoping to ship the first open-source version in July
> or so. Right now, we parse down to the ANTLR Java target and are
> preparing for the version past this release, which I think needs to
> include some extension libraries for the language. For example, while
> our DSL can do all of the typical language things (e.g., if
> statements, looping), there are no APIs or libraries for doing file
> IO, connecting to hardware, network programming, or other such things.
>
> Does this community have any experience adding in these sorts of
> features, as in, suggestions as for what kind of approach we should
> take? For example, we could allow something like a Java Native
> Interface, that would allow a developer to connect in utilities that
> allow things like File access. Or, we could allow custom native
> functions for low level things, like a file keyword, but that doesn't
> sound very flexible or extensible.
>
> Any general suggestions on an appropriate approach to take?
>
> Stefik
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>


More information about the antlr-interest mailing list