<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
Hi, there.<div><br></div><div>> <span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px;line-height: 19.5px">OMeta was great, especially with the tight integration, but I don't</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px;line-height: 19.5px">> </span><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px;line-height: 19.5px">think it works in more recent Squeaks. Never managed to try OMeta2.</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px;line-height: 19.5px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px;line-height: 19.5px">For recent Squeaks, you can try Ohm/S (</span><a href="https://github.com/hpi-swa/Ohm-S" style="font-size: 10pt;line-height: 1.5">https://github.com/hpi-swa/Ohm-S</a>) and maybe Gramada (<a href="https://github.com/hpi-swa/Gramada">https://github.com/hpi-swa/Gramada</a>).</div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
<p style="color: #AAAAAA; margin-top: 10px;">Am 25.07.2019 22:54:55 schrieb Levente Uzonyi <leves@caesar.elte.hu>:</p><div style="font-family:Arial,Helvetica,sans-serif">On Thu, 25 Jul 2019, gettimothy via Squeak-dev wrote:
<br>
<br>> Thought I would share this,as its pretty cool:
<br>>
<br>> CommandShell command: 'lua -l BananasArgs -e ''p = require("BananasArgs") frame = {} frame["args"] = {"Fred", bananas=5, cherries=2} print(p.has_fruit(frame))'' | inspect; exit'
<br>>
<br>> Where BananasArgs is from Wikimedia https://en.wikipedia.org/wiki/Module:BananasArgs
<br>>
<br>>
<br>> I am considering writing a Wikitext parser using Squeak.
<br>>
<br>> A prerequisite is that I be able to invoke Lua code "Modules" in wikimedia parlance. After some poking around, that requirement appears feasable...also, its pretty cool to be able to do that from Squeak. Big smiles (:
<br>>
<br>>
<br>> So with that proved, I need a Parser to parse Wikitext.
<br>>
<br>> Any recommendations? PetitParser looks pretty cool but I haven't tried to load it into Squeak yet.
<br>
<br>In the past few years, I've been using Xtreams-Parsing[1] to generate
<br>parsers. It works even in current Trunk images.
<br>
<br>Before that, I remember using MEPS to generate parsers. Back in the day,
<br>it felt easier to use than PetitParser. You can still load it from
<br>SqueakMap, but it needs some changes to work in current Squeaks.
<br>
<br>OMeta was great, especially with the tight integration, but I don't
<br>think it works in more recent Squeaks. Never managed to try OMeta2.
<br>
<br>And there's of course SmaCC for LR(1) and LALR(1) grammars.
<br>If you happen to have an attribute grammar (I doubt it), I can dig up an
<br>old project, which extends SmaCC to generate a compiler semi-automatically
<br>from your grammar. SmaCC may also not work in recent Squeaks.
<br>
<br>>
<br>> Does Squeak Scanner or something else seem viable to you?
<br>
<br>Scanner is for tokenizing Smalltalk code. It's not a general purpose
<br>parser generator nor a parser.
<br>
<br>Levente
<br>
<br>[1] http://squeaksource.com/Xtreams.html
<br>
<br>>
<br>> Thanks in advance.
<br>>
<br>>
<br>>
<br>>
<br>><br></div></blockquote>
</div></body>