[Cuis] OMeta 2

H. Hirzel hannes.hirzel at gmail.com
Thu May 21 08:47:48 CDT 2015


Frank,

thanks for the note about left recursion in OMeta and the link to a
research paper.

I think we need some more OMeta example grammars first before advertising.

Toy grammars to check the implementation and for people to learn.

--Hannes

On 5/21/15, Frank Shearar <frank.shearar at gmail.com> wrote:
> On 21 May 2015 at 07:19, H. Hirzel <hannes.hirzel at gmail.com> wrote:
>> From the description of OMeta
>>
>> http://www.vpri.org/pdf/tr2008003_experimenting.pdf
>>
>> By extending Parsing Expression Grammars (PEGs) [For04] with support for
>> pattern
>> matching on arbitrary datatypes, left recursion, and parameterized and
>> higher-order
>> rules, OMeta gives programmers a natural and convenient way to
>> implement parsers,
>> visitors, and tree transformers, all of which can be extended in
>> interesting ways using
>> familiar object-oriented mechanisms. This makes OMeta particularly
>> well-suited as a
>> tool for building language implementations and extensions.
>
> The left recursion extension isn't totally perfect:
> http://tratt.net/laurie/research/pubs/papers/tratt__direct_left_recursive_parsing_expression_grammars.pdf
>
> But it's good enough that I never ran into the issues described in that
> paper.
>
> Don't forget to advertise this coolness on the OMeta list!
>
> frank
>
>> On 5/21/15, H. Hirzel <hannes.hirzel at gmail.com> wrote:
>>> Great achievement, Phil!
>>>
>>> I did a test and the provided examples work fine.
>>>
>>> For convenience I combine below the installation instructions taken
>>> from different mails from yesterday.
>>>
>>> --Hannes
>>>
>>>
>>>
>>> A. Reestablish #compilerClass in Cuis
>>>
>>> 1) Unzip attached file compilerClass.zip
>>> 2) start Cuis 2330
>>> 3) Open file list
>>> 4) click on 2331
>>> 5) click on [install]
>>> 6) click on 2332
>>> 7) click on [install]
>>>
>>>
>>>
>>> B. pull down the OMeta*.st files from
>>> https://github.com/pbella/Cuis-Ports
>>>
>>>
>>>
>>> C. File in in the  following sequence
>>>       - OMeta2-stage1.st
>>>       - OMeta2-stage2a.st
>>>       - OMeta2-stage2b.st
>>>
>>> also see notes: https://github.com/pbella/Cuis-Ports#ometa-2
>>>
>>>
>>> D. Check examples in the
>>>      OMeta2Examples
>>>    class
>>>
>>>         OMeta2Examples match: 5 with: #fact.
>>>       OMeta2Examples matchAll: '1234' with: #number.
>>>       OMeta2Examples matchAll: 'abc123' with: #identifier.
>>>       OMeta2Examples matchAll: #($a $b $c 1 2 3 #(4 5)) with:
>>> #structure.
>>>       OMeta2Examples matchAll: 'howdy' with: #greeting.
>>>
>>>
>>>
>>>
>>> On 5/20/15, Phil (list) <pbpublist at gmail.com> wrote:
>>>> ... is alive!  Several caveats so please check out the README for the
>>>> latest updates as things progress:
>>>> https://github.com/pbella/Cuis-Ports#ometa-2
>>>>
>>>> Thanks,
>>>> Phil
>>>>
>>>>
>>>> _______________________________________________
>>>> Cuis mailing list
>>>> Cuis at jvuletich.org
>>>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>>>
>>>
>>
>> _______________________________________________
>> Cuis mailing list
>> Cuis at jvuletich.org
>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>
> _______________________________________________
> Cuis mailing list
> Cuis at jvuletich.org
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>




More information about the Cuis mailing list