Wrapping other parser engines
Jeffrey (mainly), Suppose I have a programming language that does not (yet) have libmarpa bindings, but which does have its own Earley parser. Case in point being Ruby and the Rley engine: https://github.com/famished-tiger/Rley How would you feel about my implementing the SLIF (or something SLIF-like) as an add-on wrapper to Rley? I don't want to step on anybody's toes, in terms of intellectual property, but at the same time, it feels like making a high-level lexer & grammar specifier that would be pluggable for both Rley and any future Marpa implementation would be for the Greater Good, so to speak. Thanks for your guidance, -- Paul Bennett P/PW/PWBENNETT -- You received this message because you are subscribed to the Google Groups "marpa parser" group. To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Switching between grammars in one parse
Any good examples of mixing grammars? In my "main" grammar I have :discard ~ whitespace (etc), but in the XPath spec whitespace seems to be significant. I'm obviously behind the times ... I guess I could use "..." around my XPath expressions and treat them as blind strings handled by the semantics. -- You received this message because you are subscribed to the Google Groups "marpa parser" group. To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Switching between grammars in one parse
I'm writing a tinylang. One of the things the lang needs is a token "XPath", which parses as per the w3c XPath spec, which is highly different to the rest of the language spec. I plan to approach it by writing two grammars. It seems the words for me to grep the pod for are "pause" and "expect" if I'm reading it right. Are there any teachable examples out there that I can learn from? Thanks in advance... -- P/PW/PWBENNETT -- You received this message because you are subscribed to the Google Groups "marpa parser" group. To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
To mark the occasion, a short composition
:discard ~ whitespace ~ [\p{Separator}]+ S ::= H B J H ::= 'Very' H | 'Happy' B ::= 'Birthday,' J ::= 'Illustrious Idiosyncrat' | 'Jeffrey' -- P/PW/PWBENNETT -- You received this message because you are subscribed to the Google Groups "marpa parser" group. To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Java 8 Parser
On Oct 15, 2016 13:01, "Jeffrey Kegler"wrote: > > Re #4, why not implement Perl regexes? A full syntax of Perl regexes is gruesomely complex, and much of it is symptoms rather than features. Somewhere deep within perldoc there's a howto on making your own \p{} named properties, which AFAICT are acceptable to Marpa's regex engine. IIRC, I once had some progress that way. -- P/PW/PWBENNETT -- You received this message because you are subscribed to the Google Groups "marpa parser" group. To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
ANNOUNCE: Gloria has begun
Work has finally begun in earnest on my log analyzer that I promised to work on "one day" back when I started to get into Marpa . There's not much to see yet, aside from one work-in-progress "input config" file. Input config spec coming soon -- as soon as I've nailed down what input specs need to be capable of. One of the things it will need to be capable of is using Marpa-based parsers to grok log entries (as well as using simple regexes). I may also need to use Marpa to make the query language, which in turn might need me to work on an SQL::Translator module to convert generic SQL into the SQL needed to query the database of parsed logs. I plan to store it in SQLite (by default, but let the user choose), but SQLite lacks some of the features that I've grown to know & love that are present in Oracle, and that I want to have in my SQL dialect. https://github.com/PWBENNETT/perl-Gloria/tree/develop -- Paul W Bennett https://www.avast.com/sig-email; target="_blank">https://ipmcdn.avast.com/images/logo-avast-v1.png; style="width: 90px; height:33px;"/> This email has been sent from a virus-free computer protected by Avast. https://www.avast.com/sig-email; target="_blank" style="color: #4453ea;">www.avast.com -- You received this message because you are subscribed to the Google Groups "marpa parser" group. To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: SLIF style guide / best practices?
On Nov 22, 2015 4:10 PM, "Ron Savage"wrote: > > I always try to write the ::= rules top-down, and then list the ~ rules alphabetically. This has turned out very well, for me at least. > Sounds sensible. In my (admittedly gargantuan) grammar linked above, do any of you have specific examples of ways you can make it better? The idea is basically to concatenate the separate files together into one big grammar, but to split that monstrosity into ... I guess ... "functionally similar" slices, to allow Processing Instructions to come along and maybe mutate the tag L0 terminals (for instance) without having to glark the whole grammar. If there's a better way to modify the grammar more or less on the fly, I'd like to know about it too... Thanks, -- P/PW/PWBENNETT -- You received this message because you are subscribed to the Google Groups "marpa parser" group. To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Emacs marpa-mode
On Fri, Nov 20, 2015 at 4:33 PM, Jeffrey Keglerwrote: > Kind of nice the way that the colors distinguish G1 and L0 rules. I haven't played with my TextMate / SublimeText highligher for Marpa in a long time. I agree it's a nice touch. I'm looking at implementing the exact same thing right now. Please stand by, as .tmLanguage files are not entirely for the uninitiated (and it's been a while since I was initiated). -- Paul -- You received this message because you are subscribed to the Google Groups "marpa parser" group. To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Emacs marpa-mode
On Sat, Nov 21, 2015 at 3:17 PM, Paul Bennett <paul.w.benn...@gmail.com> wrote: > https://gist.github.com/PWBENNETT/0e860d907fc59554f1ce Ooh, I don't support comments with that. Working on it. -- Paul -- You received this message because you are subscribed to the Google Groups "marpa parser" group. To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Emacs marpa-mode
On Sat, Nov 21, 2015 at 3:42 PM, Paul Bennett <paul.w.benn...@gmail.com> wrote: > https://github.com/PWBENNETT/MarpaX-SGML/blob/master/Marpa.tmLanguage And here it is in action: https://drive.google.com/file/d/0B21ee_I1WzbwNFlVdXE5T2dMQnM/view?usp=sharing Apologies for the many emails. I'm growing too accustomed to modern social media, where you can edit and comment and edit your comments, and so on. -- Paul -- You received this message because you are subscribed to the Google Groups "marpa parser" group. To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Emacs marpa-mode
On Sat, Nov 21, 2015 at 3:35 PM, Paul Bennett <paul.w.benn...@gmail.com> wrote: > > Ooh, I don't support comments with that. Working on it. > Here, and in its semi-proper location instead of as a gist ... https://github.com/PWBENNETT/MarpaX-SGML/blob/master/Marpa.tmLanguage -- Paul -- You received this message because you are subscribed to the Google Groups "marpa parser" group. To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: OPML: Another XML-based markup language
On Tue, Nov 11, 2014 at 5:09 PM, Ron Savage r...@savage.net.au wrote: https://en.wikipedia.org/wiki/OPML Interesting, and I suspect JD will have things to say. For me, it's just a sad reminder that my SGML implementation hasn't been worked on in far too long. I really need to get into a room with JD, a couple of computers, and a large whiteboard with plenty of colors of pen, so that I can learn his XML code sufficiently to embrace and extend it to full SGML. I'm stuck thinking that I'll need user-programmable L0 rewrites (for which I will probably need to invent a DSL), and at least a G2 layer (or would it need to be ... some kind of L2 layer???) for well-formedness and a G3 layer for validation. At least I've started in on envisioning the GUI for a wizard that will be able to scaffold the L0 rewrites based mostly on radio and check buttons. It's all going far too slowly, though. -- PWBENNETT -- You received this message because you are subscribed to the Google Groups marpa parser group. To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Python port of Libmarpa?
Well, how about that? I was just going to SWIG the low-level C code, and build a method-compatible API suite on top. I'll have to check out this guy's work for sure. On Sun, Nov 9, 2014 at 9:55 PM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: [ Warning: family unfriendly repo name ] If you've been following the IRC channel, you may have noticed that koo6 seems to have ported Libmarpa to Python and written a first example parser: https://github.com/koo5/new_shit/blob/dev/marpa_cffi/marpa.py I know a Python port is something that's been talked about for some time -- perhaps this is a start that could be built on. -- jeffrey -- You received this message because you are subscribed to the Google Groups marpa parser group. To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups marpa parser group. To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Yet another ambitious project
In the paper's if X then Y else Z, X seems to be a (bound) variable (not sure if/how they convert it to boolean, perhaps by whether it has PDF or not), while it is a comparison in the grammar. The name comparison is just a notational thing for my convenience. Oh, but yes. Yes, indeed. Variables are not allowed in the X slot in my version. I'll have a think about that, and update the gist again later. Okay. I've had more of a think, not just about the grammar but also about practical ways to implement the language. I may have strayed beyond the letter of the spec, but I suspect I've stayed within its spirit. URL as always is https://gist.github.com/PWBENNETT/8435996 Thanks, -- P/PW/PWBENNETT -- You received this message because you are subscribed to the Google Groups marpa parser group. To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Yet another ambitious project
Hi all, I've started working here https://gist.github.com/PWBENNETT/8435996 on a practical grammar for the language described here http://ashishagarwal.org/2011/10/04/pdf-type-theory/ Trouble is, I don't (yet) understand the math in the above paper well enough to know whether I'm actually on the right track with the language spec (but I am working on it). It's a bit vague and airy in the paper itself, and I'm trying to tie it down to something actually implementable. I've also taken the liberty of allowing *NIX style shebang lines and C style #include lines, as a convenience to any future users of the language. Anyway ... any opinions on what I might be doing wrong (or right), at this early stage in the game? Thanks, -- P/PW/PWBENNETT -- You received this message because you are subscribed to the Google Groups marpa parser group. To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Back on the SGML trail ...
On Wed, Feb 26, 2014 at 12:05 PM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: Looking at it, I noticed there seems to be no test suite. Test suites are worth the trouble. Test suites for SGML parsing are are _hard_. I've tried getting one going using vanilla Docbook, and I can't quite get my thoughts in place to know what exactly I want the API to even look like. The plan is to have a test suite that roundtrips between two or more various SGML applications (maybe XML and Wikimedia or something). Also, test suites in general are hard. They assume that the person writing the tests is smarter than the person writing the code. I could do some Test::LectroTest generation of ... something, and at least have some doesn't die tests. Perhaps related, a target app might help. Except that it should be something you care about, don't be fussy about this -- all that is necessary is that it exercise what you're developing in some way. The target app is mostly gloria, my work-in-progress log-groveler. I want it to be able to comprehend any SGML application, and I want a command language to instruct it on how to attach semantics to the parsed syntax. For XML, the obvious route is via XPath and XSD (and maybe XSLT), and for structured text of other kinds (that isn't covered by an existing module, like JSON or YAML), Marpa's SLIF itself is probably the obvious route. For SGML, I think I'm going to need to generalize XPath, and that's why my main goal is reproducing an API that looks and feels a bit like Marpa::R2::HTML, because the end-user inputs to _that_ API are quite XPath-like. Thanks, also, for linking MarpaX::xPathLike the other day. I think some reading of both the source and docs is going to be required there. -- Paul -- You received this message because you are subscribed to the Google Groups marpa parser group. To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Moderately low-hanging fruit: Statistics Language
On Wed, Jan 15, 2014 at 5:28 AM, Paul Bennett paul.w.benn...@gmail.com wrote: See the pre-print and slides here: http://ashishagarwal.org/2011/10/04/pdf-type-theory/ Basically, the author describes a DSL for describing statistical distributions, and programming techniques for turning those descriptions into random number generators. I've got what I think might be a good start on describing the DSL (barring misunderstandings) here https://gist.github.com/PWBENNETT/8435996 -- Paul -- You received this message because you are subscribed to the Google Groups marpa parser group. To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.