Re: Marpa Parser generator is awesome... yet is there a sources in C++ Java C#...?

2019-10-13 Thread Durand Jean-Damien
About other parser generators using marpa algorithm, there are bindings to other languages that probably have their own BNF. There is also c-marpaESLIF that implements its own BNF directly in a C library, very similar the perl's Marpa BNF, though not

Re: Marpa Parser generator is awesome... yet is there a sources in C++ Java C#...?

2019-10-13 Thread Durand Jean-Damien
Hello, Internally, Marpa perl packages uses the low-level libmarpa , which can be directly accessed through C++. There is also marpaWrapper that is a very thin layer on top of libmarpa, more event and

Re: Finding where a rule matches input stream

2018-08-06 Thread Durand Jean-Damien
Your CodeProcess::do_macro_match is still wrong, please read https://metacpan.org/pod/distribution/Marpa-R2/pod/Scanless/R.pod#g1_location_to_span() . "Mike's" workaround is quite correct, you have to "merge" the G1 start and end locations. Clearer code in attachment. Le samedi 4 août 2018

Re: Java 8 Parser

2017-05-01 Thread Durand Jean-Damien
Hello, With Marpa::R2 it is possible to do exclusions at the lexeme level using user-defined character classes. Such an implementation was used in ECMAScript as mentionned indeed by Jeffrey, c.f;

Blog post: Binary parsing with Marpa: .class files

2016-03-28 Thread Durand Jean-Damien
FYI Binary parsing with Marpa: .class files Regards, Jean-Damien. -- You received this message because you are subscribed to the Google Groups "marpa parser" group. To unsubscribe from this

Re: action => ::lhs

2016-01-03 Thread Durand Jean-Damien
Yes, nice alternative. I am using this in a framework on any BNF to automatically fill structures on-demand -; https://github.com/jddurand/MarpaX-Role-Parameterized-ResourceIdentifier/blob/master/lib/MarpaX/Role/Parameterized/ResourceIdentifier/BNF.pm#L699 Le vendredi 27 novembre 2015 09:41:52

Re: "Top-down parsing is guessing": new blog post.

2016-01-03 Thread Durand Jean-Damien
> > Also, in this list, http://savage.net.au/Marpa.html#Perl_Packages, J > Durand has a number of modules, some of which likewise patch the BNF. > All are "hacks" in the sense that there is no meta-package describing the BNF itself. Once I had a look to Grammar::Formal

Re: PHP parser?

2015-06-14 Thread Durand Jean-Damien
rns, Also IDL and SQL2003 -; others I do not mention until it is published on CPAN. JD. Le jeudi 28 mai 2015 13:33:43 UTC+2, rns a écrit : Hi, Jean-Damien Durand did parsers for C, SQL, ECMAScript, m4 -- https://github.com/jddurand?tab=repositories If you start with a PHP EBNF

A Marpa/Moops powered M4 implementation

2015-04-11 Thread Durand Jean-Damien
FYI c.f. this blog post http://blogs.perl.org/users/jean-damien_durand/2015/04/a-marpamoops-powered-m4-implementation.html JD. -- 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,

Re: MarpaX::Languages::M4

2015-02-22 Thread Durand Jean-Damien
For the curious: https://github.com/jddurand/MarpaX-Languages-M4 -- 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

MarpaX::Languages::M4

2015-02-22 Thread Durand Jean-Damien
FYI There a new module coming into CPAN, the M4 pre-processor. The current version is 0.001-TRIAL, time to check current status and fix latest gotchas. More on my G+ page: https://plus.google.com/105243759955561553019/posts/9mxZnV1Vwws What is interesting in this module is: - Moops

Re: Announce Text::Balanced::Marpa V 1.00

2015-01-21 Thread Durand Jean-Damien
Since this is Moo based, what about MooX::Role::Logger ? Le lundi 19 janvier 2015 00:10:38 UTC+1, Ron Savage a écrit : I've released V 1.06. The most noticeable change is that parse() now takes a hash, whose keys can be any of length, pos, options or text. Also, the constant 'debug' is

Re: Discard events -- a design document

2015-01-11 Thread Durand Jean-Damien
Jeffrey, Very good. This will adress Zeev's need. I'll probably reinsert comments in the AST as an post-value processing. Many thanks, JD. Le lundi 12 janvier 2015 03:49:46 UTC+1, Jeffrey Kegler a écrit : I've written a design document for discard events

Re: Ideas for parsing with error messages and diagnostics

2014-12-31 Thread Durand Jean-Damien
Yes, very nice idea. Wondering if that could not be a builtin L1 alternative -; Le mercredi 31 décembre 2014 07:08:01 UTC+1, Ron Savage a écrit : This sounds very interesting. For instance, you don't even need to think of one as a 'error grammar'. Consider: SQL2003 and SQL Server's dialect

Re: Valid BNF question

2014-12-18 Thread Durand Jean-Damien
myself and risk being incompatible with next version.) ZA On Tuesday, December 16, 2014 12:39:00 PM UTC-5, Durand Jean-Damien wrote: Ok, so I do nothing / JD. Le mardi 16 décembre 2014 07:16:38 UTC+1, toratea...@gmail.com a écrit : Thank you... regardless, I tried your suggestion

Re: Valid BNF question

2014-12-16 Thread Durand Jean-Damien
need. I intend to write an application that analyze SQL statements and deduce source tables and where/join-on clauses, basically find the flow of data and put it in csv/excel format. ZA On Monday, December 15, 2014 11:30:00 PM UTC-5, Durand Jean-Damien wrote: Yes, this is easy

Re: Valid BNF question

2014-12-14 Thread Durand Jean-Damien
adjustments in the next few days or just look at the module and do my own. On Saturday, December 13, 2014 9:40:54 AM UTC-5, Durand Jean-Damien wrote: Zeev, Instead I invite you to try the sql2003toxml binary distributed with MarpaX::Languages::SQL2003::AST, c.f. my g+ post https

Re: Valid BNF question

2014-12-11 Thread Durand Jean-Damien
The MarpaX::Languages::SQL::AST repository will disappear in favour of MarpaX::Languages::SQL2003::AST https://github.com/jddurand/MarpaX-Languages-SQL2003-AST - please retry with the later. JD. Le jeudi 4 décembre 2014 18:37:51 UTC+1, Zeev Atlas a écrit : Hi all I am new to Marpa, so I may

Re: Valid BNF question

2014-12-07 Thread Durand Jean-Damien
the lexemes priorities were implicit v.s. their appearance in the .lex file content, the rules in the SQL grammar have implicit priorities v.s. their appearance in the grammar. Jean-Damien. Le dimanche 7 décembre 2014 06:36:59 UTC+1, Durand Jean-Damien a écrit : Hello, Yes, grammar's defaults

Re: Valid BNF question

2014-12-06 Thread Durand Jean-Damien
Hello, Yes, grammar's defaults are right now: :default ::= action = [values] bless = ::lhs lexeme default = action = [start,length,value] latm = 1 I'll may move to a DOM, optionally, if you prefer. Le dimanche 7 décembre 2014 03:28:36 UTC+1, Ron Savage a écrit : Could anybody comment about

Re: Marpa::R2 2.100000

2014-12-05 Thread Durand Jean-Damien
Tested ok on Windows 8 strawberry perl. Le mardi 18 novembre 2014 03:43:06 UTC+1, Jeffrey Kegler a écrit : I just uploaded a new indexed release of Marpa::R2 to CPAN. It's mainly documentation updates fixes. Testing is appreciated! -- You received this message because you are subscribed

Re: Ambiguous methods: ambiguity_metric() and ambiguous()

2014-11-05 Thread Durand Jean-Damien
Just note that having an ambiguity metric does not mean that values() are different. Nevertheless, you know that I love non-ambiguous grammars -; Le mercredi 5 novembre 2014 22:41:08 UTC+1, Ron Savage a écrit : Say I want a program to provide an option for a user to abort the run if an

Re: Parsing domain names, and cookies

2014-10-09 Thread Durand Jean-Damien
It is overkill, but the proof of concept is more than that, since this was writen for ECMAScript, c.f. this post on blogs.perl.org http://blogs.perl.org/users/jean-damien_durand/2014/02/a-marpa-use-case-javascript-regexp-implementation.html (which have semantics 99% like perl, with a big

Re: A grammar for quoted strings with escaped chars

2014-09-23 Thread Durand Jean-Damien
Not sure I got it right from the beginning, but my attempt, using a parameterized subset of the C grammar is at https://gist.github.com/jddurand/8d3238c22731a85eb890 . JD. Le lundi 22 septembre 2014 09:12:31 UTC+2, Ron Savage a écrit : I've developed a grammar (with help from various people

Low Hanging-fruit: Inline::Marpa

2014-09-20 Thread Durand Jean-Damien
In the same spirit of Inline::XXX I guess that being able to inline a BNF grammar would be great -; I have the procedure doing so with an EBNF, easily translatable to Marpa's BNF (I used an internal meta-representation of the grammar). Doing so raises the avaibility of Marpa as a shared

Re: Windows build problem with spaces in name?

2014-09-10 Thread Durand Jean-Damien
Yep - this should do it - I personnally use(d) a mixture of Win32::ShellQuote and String::ShellQuote in some of my packages, c;f. for example https://github.com/jddurand/MarpaX-Languages-C-AST/blob/master/lib/MarpaX/Languages/C/AST/Grammar/ISO_ANSI_C_2011/Scan.pm#L767 (which could have been

Re: Stackoverflow question about parsing C preprocessor files in Perl

2014-09-09 Thread Durand Jean-Damien
You're right - writing a real preprocessor was one of my other projects - but not done / JD. Le mardi 9 septembre 2014 17:41:04 UTC+2, rns a écrit : subj http://stackoverflow.com/questions/25734421/parse-multi-nested-conditional-c-preprocessor-statements-in-perl — I gave an answer, hope

Re: Subtleties of read() vs value() error handling

2014-08-15 Thread Durand Jean-Damien
Ok, point taken. Marpa::R2 has now only a bug-fix only roadmap isn't it Jeffrey ? This sounds like a feature request. About the name , hmmm eval() ? Le vendredi 15 août 2014 22:37:29 UTC+2, Christopher Layne a écrit : Yes but value returns a ref to a ref so the user can still do that

Re: Strange behavior of Marpa events

2014-08-09 Thread Durand Jean-Damien
Note that MarpaX-Languages-C-AST seems to also use last_completed (when processing enums). JD. -- 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

Re: Appeal for testing: Marpa-R2 2.087_002 on MS Windows

2014-07-10 Thread Durand Jean-Damien
Ok on windows7/perl-5.18/gcc/dmake. Anybody with a name/cl box ? Otherwise ActiveState will do it. JD. Le jeudi 10 juillet 2014 17:59:48 UTC+2, Jeffrey Kegler a écrit : Re Marpa-R2 2.087_002: It's a release candidate, and at this point, I've gotten lots of testing, with 100% OK results. But

Re: Compiling a list of Perl modules using Marpa

2014-06-19 Thread Durand Jean-Damien
Based on Toby's post http://blogs.perl.org/users/toby_inkster/2013/07/whos-relying-on-that-cpan-release.html, results to be confirmed -; App-datecalc 0.03 (SHARYANTO) - Date calculator Catmandu 0.9204 (NICS) - a data toolkit Catmandu-Activiti 0.11 (NJFRANCK) - Catmandu module for Activiti

Marpa::R2 being officially packaged by Debian

2014-06-02 Thread Durand Jean-Damien
FYI the Debian-Perl group has taken over packaging of Marpa::R2, c.f. their repository http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libmarpa-r2-perl.git;a=summary that is adressing the (debian naming for such thing) this Package Request Bug Report

Re: Declaring dependencies on core modules

2014-05-24 Thread Durand Jean-Damien
Self-adaption from Dist::Zilla method applied to Marpa in attachment. Usage: /usr/bin/perl /home/jdurand/Documents/scanprereqs.pl path1 [... [pathn]] Example: /usr/bin/perl /home/jdurand/Documents/scanprereqs.pl ~/git/Marpa--R2/cpan Output: $VAR1 = { 'URI::URL' = '0',

Re: Unicode characters counted as multiple characters

2014-05-23 Thread Durand Jean-Damien
mai 2014 20:50:07 UTC+2, Durand Jean-Damien a écrit : AFAIK Marpa should be ok with unicode, c.f. advent calendar that is somewhere in the test suite. C.f. attachment that replays your example. Jean-Damien. -- You received this message because you are subscribed to the Google Groups

Re: A Totally Clueless Newbie Tilting At Windmills

2014-05-09 Thread Durand Jean-Damien
Beging a noob with COBOL I just wanna know if the language is perfectly standardized, or if programmers in it are tempted to use extensions that makes a general parser more difficult, like with C code using GNUCC only extensions. Side-effect of my question, is the COBOL source code you are

Re: t/thin_eq.t ambiguous grammar test rewriten in C

2014-04-20 Thread Durand Jean-Damien
C.f. https://github.com/jddurand/libmarpa-packaging/tree/master/examples for uptodate (and eventually fixed or better) version(s). Jean-Damien. Le dimanche 20 avril 2014 17:20:45 UTC+2, Durand Jean-Damien a écrit : The list might be interested to see a C version of what is writen in perl

Re: cscan on Go lang C code

2014-03-08 Thread Durand Jean-Damien
FYI bug identified in c2ast and fixed with release 0.37, just uploaded. JD. Le mercredi 5 mars 2014 21:34:43 UTC+1, Durand Jean-Damien a écrit : Sorry for the noise, I just want to comment that there are some c2ast failures, and I will have to: * check with a previous version of Marpa::R2

Re: cscan on Go lang C code

2014-03-05 Thread Durand Jean-Damien
/1P3BLR31VA8cvLJLfMibSuTdwTuF7WWLux71CYD0eeD8/edit — looks like they may find C parsing features provided by MarpaX::Languages::C::AST useful. On Wed, Mar 5, 2014 at 9:13 PM, Durand Jean-Damien jeandami...@gmail.comjavascript: wrote: Is there a way to know how GO bootstraps its library, I mean starting at: ./cmd

Re: cscan on Go lang C code

2014-03-05 Thread Durand Jean-Damien
::Languages::C::AST useful. On Wed, Mar 5, 2014 at 9:13 PM, Durand Jean-Damien jeandami...@gmail.comjavascript: wrote: Is there a way to know how GO bootstraps its library, I mean starting at: ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap # Delay move

Re: 31 of many topics (1 unread)

2014-03-05 Thread Durand Jean-Damien
Got it as well several times, a bug in the reader IMHO. I clicked on Mark all as read -; Le jeudi 6 mars 2014 05:03:08 UTC+1, Ron Savage a écrit : I keep getting the msg about (1 unread), but there is no indication of which message it is. Any ideas? -- You received this message because you

Re: Just uploaded a release candidate to CPAN: Marpa-R2 2.081_001

2014-02-25 Thread Durand Jean-Damien
Here is a gist showing how to inspect Marpa grammarhttps://gist.github.com/9217513.gittogether with the new rule_name() and start_symbol_id() methods. Great release candidate -; Le lundi 24 février 2014 18:55:10 UTC+1, Jeffrey Kegler a écrit : I've just uploaded Marpa-R2

Re: Just uploaded a release candidate to CPAN: Marpa-R2 2.081_001

2014-02-25 Thread Durand Jean-Damien
Here is a gist showing how to inspect Marpa grammarhttps://gist.github.com/jddurand/9217513 together with the new rule_name() and start_symbol_id() methods. Great release candidate -; Le lundi 24 février 2014 18:55:10 UTC+1, Jeffrey Kegler a écrit : I've just uploaded Marpa-R2

Re: New indexed CPAN release, with Longest Acceptable Tokens Matching

2014-02-20 Thread Durand Jean-Damien
Was reading this idea about diagnostic compiler and C languagehttps://groups.google.com/forum/#!searchin/marpa-parser/fruit/marpa-parser/CXcLmksuQhw/KurF_p01HE0J. Running c2ast or cscan will do it, with a customized user-friendly output rewriten as: it failed here --^ or did I

Re: New indexed CPAN release, with Longest Acceptable Tokens Matching

2014-02-19 Thread Durand Jean-Damien
A major and remarquable change / JD. Le mercredi 19 février 2014 19:37:33 UTC+1, Jeffrey Kegler a écrit : I've just uploaded 2.08, a new indexed versionhttps://metacpan.org/release/JKEGL/Marpa-R2-2.08, to CPAN. This release is a very big change internally, the first external sign

Re: Request for discussion: an interface statement

2014-02-15 Thread Durand Jean-Damien
:default ::= action = ::array sound the best to me, because it is natural when we read a grammar to expect as many values as there are RHS. I quite liked to proposal of ron, although IMHO lhs better fits in blessing, despite the fact that beginners will always certainly do Data::Dumper(),

Re: Request for discussion: an interface statement

2014-02-15 Thread Durand Jean-Damien
should read I quite liked to proposal of rns - sorry. You can delete this message having read it -; Le dimanche 16 février 2014 02:58:51 UTC+1, Durand Jean-Damien a écrit : I quite liked to proposal of ron, ./.. -- You received this message because you are subscribed to the Google Groups

Re: Request for discussion: an interface statement

2014-02-15 Thread Durand Jean-Damien
let's go with interface Le dimanche 16 février 2014 03:35:22 UTC+1, Jeffrey Kegler a écrit : Re interface 2, I can go with something that has a bit more hype, like dsl maker 2 -- jeffrey On 02/15/2014 05:58 PM, Durand Jean-Damien wrote: :default ::= action = ::array sound

[Blog post] A Marpa use case: JavaScript Regexp Implementation

2014-02-03 Thread Durand Jean-Damien
FYI (cross-posted from IRC); A Marpa use case: JavaScript Regexp Implementationhttp://blogs.perl.org/users/jean-damien_durand/2014/02/a-marpa-use-case-javascript-regexp-implementation.html JD. -- You received this message because you are subscribed to the Google Groups marpa parser group. To

Re: Low-hanging fruit: A Regex compiler

2014-01-26 Thread Durand Jean-Damien
FYI I was reading http://www.unicode.org/reports/tr18/ - less easy to understand but well -; Le samedi 25 janvier 2014 19:51:23 UTC+1, rns a écrit : Looks good. I'll certainly have to steal from there. Thanks for pointing me to it. On Sat, Jan 25, 2014 at 8:40 PM, Durand Jean-Damien

Re: Low-hanging fruit: A Regex compiler

2014-01-25 Thread Durand Jean-Damien
Note that a startup can be the ECMAScript pattern specificationhttp://www.ecma-international.org/ecma-262/5.1/#sec-15.10.1 - ECMAScript implements a very low subset of perl regexp pattern, but it shows quite well how such a grammar should be structured. Le samedi 25 janvier 2014 18:59:06

Grammar::Formal

2014-01-20 Thread Durand Jean-Damien
FYI I came across this new module Grammar::Formalhttps://metacpan.org/release/Grammar-Formal, Marpa BNF cannot be expressed with it, but for sure it covers usual BNF's without, how to say, options. I might file such a feature request -; JD. -- You received this message because you are

Re: Grammar::Formal

2014-01-20 Thread Durand Jean-Damien
Started https://rt.cpan.org/Public/Dist/Display.html?Name=Grammar-Formal-; Le lundi 20 janvier 2014 22:00:52 UTC+1, Durand Jean-Damien a écrit : FYI I came across this new module Grammar::Formalhttps://metacpan.org/release/Grammar-Formal, Marpa BNF cannot be expressed with it, but for sure

Re: discarded then accepted

2014-01-18 Thread Durand Jean-Damien
if the behavior described is a regression, new with the release of a few hours ago. (My guess is that in this case it's not.) -- jeffrey On 01/17/2014 09:47 PM, Durand Jean-Damien wrote: Jeffrey, Before eventually file a report, I'd like to know if this is possible in Marpa to have

alternative() failed

2014-01-18 Thread Durand Jean-Damien
Jeffrey, Another question: Is the message Problem in u_read(), alternative() failed: Token symbol is inaccessible at /usr/local/lib/perl/5.18.2/Marpa/R2/SLR.pm line 881 expected to be a problem in the user's grammar or in the SLIF internals ? This is with 2.07901. Thanks / JD. -- You

Re: libmarpa build with MS C compiler's /Wall and /Za flags: success!

2014-01-11 Thread Durand Jean-Damien
Ah /Wall includes /W4 - sorry. So this is excellent... marpa is very well coded -; Le samedi 11 janvier 2014 13:12:02 UTC+1, Durand Jean-Damien a écrit : I am not in front of a Windows right now, but I know MSVC is very good also at finding 64bits portability issueshttp

Re: libmarpa build with MS C compiler's /Wall and /Za flags: success!

2014-01-11 Thread Durand Jean-Damien
A priori environment variable $CFLAGS should be honored. To be confirmed, though - I am not in front of this part of code right now -; Le samedi 11 janvier 2014 14:13:13 UTC+1, rns a écrit : On Sat, Jan 11, 2014 at 2:34 PM, Durand Jean-Damien jeandami...@gmail.comjavascript: wrote

[Blog] A Marpa-powered alternate C::Scan, and even a command-line

2014-01-11 Thread Durand Jean-Damien
FYI my latest blog about Marpa: cscanhttp://blogs.perl.org/users/jean-damien_durand/2014/01/a-marpa-powered-alternate-cscan-and-even-a-command-line.html . Damned the style of the page is not like the others -; perhaps the css... / JD. -- You received this message because you are subscribed to

Re: Summarising the Marpa docs

2014-01-11 Thread Durand Jean-Damien
This concise view is great and a must for a newcomer. Should be advertised (how?). Thanks / JD. *ahem can you remove the box that jumps from left to right after the click on the left ?* Le dimanche 12 janvier 2014 00:31:03 UTC+1, Ron Savage a écrit : This may or may not be a good idea, but

Re: Marpa in academia

2014-01-10 Thread Durand Jean-Damien
Quality and design of Marpa deserves this -; Le vendredi 10 janvier 2014 17:53:34 UTC+1, Jeffrey Kegler a écrit : My Marpa paperhttps://drive.google.com/a/jeffreykegler.com/#folders/0B9_mR_M2zOc4cVNVNmVtZHp5UlUwas assigned reading https://cs.uwaterloo.ca/%7Eplragde/842/logistics.shtml in

Re: New release candidate, Marpa::R2 2.077_014

2013-12-22 Thread Durand Jean-Damien
Tests ok! Le dimanche 22 décembre 2013 06:46:46 UTC+1, Jeffrey Kegler a écrit : I've just uploaded a new release candidate, Marpa-R2 2.077_014https://metacpan.org/release/JKEGL/Marpa-R2-2.077_014, to CPAN. In it the SLIF recognizer's named argument processing is changed to leave the

semantics_package and new()

2013-12-22 Thread Durand Jean-Damien
Jeffrey, Is semantics_package's new() method supposed to be called if it exist ? C.f. file attached. Thanks / JD. -- 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

Re: semantics_package and new()

2013-12-22 Thread Durand Jean-Damien
suppose this is the same thing. Fine with me, but perhaps to be mentionned in the doc, if not already in. Thanks / JD. Le dimanche 22 décembre 2013 19:22:14 UTC+1, Durand Jean-Damien a écrit : Tested OK - Thanks / JD. Le dimanche 22 décembre 2013 18:12:39 UTC+1, Jeffrey Kegler a écrit

Re: New release candidate, Marpa::R2 2.077_014

2013-12-22 Thread Durand Jean-Damien
In the meantime, do you plan another release candidate ? I depend on the semantics_package fix to release another MarpaX::Languages::ECMAScript::AST. Ok, just saw your other post. Thanks / JD. -- You received this message because you are subscribed to the Google Groups marpa parser

Re: New release candidate, Marpa::R2 2.077_014

2013-12-22 Thread Durand Jean-Damien
Perhaps because use utf8 is alike use encoding (i.e. not lexically scoped) ? Or because it's unlike it (lexically scoped as the doc says [1]). Oups, yes! -- You received this message because you are subscribed to the Google Groups marpa parser group. To unsubscribe from this group and