Hmm I hadnât even thought of Xstreams⦠I always thought it sounded cool, perhaps its a place to start - but as you mention, Iâm not sure it really gained traction in the Pharo world. My use case is quite simple as the markdown files are simple configuration (and maybe donât even need a parser - e.g. https://github.com/servirtium/demo-java-climate-tck/blob/master/src/test/moc... <https://github.com/servirtium/demo-java-climate-tck/blob/master/src/test/moc...>). I was hoping there might be something simple I could run with to help explore how best to use the config in those files. Lets see if anyone else mentions something thatâs a no-brainer. Tim
On 24 Mar 2020, at 18:40, gettimothy via Pharo-users <pharo-users@lists.pharo.org <mailto:pharo-users@lists.pharo.org>> wrote:
From: gettimothy <gettimothy@zoho.com <mailto:gettimothy@zoho.com>> Subject: Re: [Pharo-users] Do we have a simple markdown parser? Date: 24 March 2020 at 18:40:42 GMT To: "Any question about pharo is welcome" <pharo-users@lists.pharo.org <mailto:pharo-users@lists.pharo.org>> Cc: "Pharo Users Newsgroup" <pharo-users@lists.pharo.org <mailto:pharo-users@lists.pharo.org>>
I do not know if it works on Pharo, but XTreams has a XTreams-Parsing section that I am currently working with. The existing Wikitext grammar was my starting point .
https://github.com/squeak-smalltalk/squeak-ci/blob/master/package-load-scrip... <https://github.com/squeak-smalltalk/squeak-ci/blob/master/package-load-scrip...>
the existing Grammar is under:
XTreams-Parsing -> PEGParser > grammars->grammarWiki
Use case is:
| wikiGrammar wikiParser output| Transcript clear. wikiGrammar := PEGParser grammarWiki reading positioning. wikiParser := PEGParser parserPEG parse: 'Grammar' stream: wikiGrammar actor: PEGParserParser new. input := (your string input goes here) output := wikiParser parse: 'Page' stream: input actor: PEGWikiGenerator new. output inspect.
hth
---- On Tue, 24 Mar 2020 13:51:31 -0400 Tim Mackinnon <tim@testit.works <mailto:tim@testit.works>> wrote ----
Hi guys - do we have a simple markdown parser that is reasonably up to date? I did a quick GitHub scan and a few popped out, but I wasnât convinced I had found one the âeveryoneâ uses (albeit, everyone might be a small sample).
Ideally I donât want to get sucked into writing another one (a project for a future time).
Tim