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

2013-12-22 Thread Ruslan Shvedov
On Mon, Dec 23, 2013 at 5:40 AM, Ron Savage r...@savage.net.au wrote: On Monday, 23 December 2013 14:26:28 UTC+11, rns wrote: On Mon, Dec 23, 2013 at 4:56 AM, Jeffrey Kegler jeffre...@jeffreykegler. com wrote: Any idea why this is the fix? None, unfortunately. Just a peculiarity of

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

2013-12-23 Thread Ruslan Shvedov
Ok, done https://rt.perl.org/Public/Bug/Display.html?id=120855. On Tue, Dec 24, 2013 at 12:09 AM, Ron Savage r...@savage.net.au wrote: Excellent. I suggest you run 'perlbug' to submit the report, on the machine where you ran the test. It asks for some information, and I assume sends other

Re: c2ast.pl on Perl source?

2013-12-25 Thread Ruslan Shvedov
On Wed, Dec 25, 2013 at 12:04 PM, Ruslan Shvedov ruslan.shve...@gmail.comwrote: Now with ASF's traversing at hand, given that c2ast.pl produces unambiguous parses (as it should be, I think), ASF's become effectively AST's and the MarpaX::Languages::C::AST::dump() can be done by simply

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

2013-12-25 Thread Ruslan Shvedov
Yes, the test passes on darwin, linux, and windows under active perl. My os/C compiler/perl combo (winxp sp3/.NET 2003/perl 5.14.2 compiled from source) seems to be pretty uncommon and even in it the test passes with the latest stable perl so the bug, if any, and unless it's been already fixed,

Re: New developer's version: Marpa-R2 2.079_001

2014-01-01 Thread Ruslan Shvedov
mistake (I believe) was very simple: I did include config.h in one place where it was needed. -- jeffrey On 01/01/2014 07:10 AM, Ruslan Shvedov wrote: On Wed, Jan 1, 2014 at 3:41 PM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: I think I've identified this issue. The inline

Silencing MS C compiler warnings

2014-01-03 Thread Ruslan Shvedov
That's probably premature, so I put it here for memory until the suitable time comes. *warning C4101: unreferenced local variable* (7 times) as in lib\Marpa\R2.xs(610) : warning C4101: 'input_length' : unreferenced local variable lib\Marpa\R2.xs(1205) : warning C4101: 'dummy' : unreferenced local

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

2014-01-11 Thread Ruslan Shvedov
On Sat, Jan 11, 2014 at 2:13 PM, Durand Jean-Damien jeandamiendur...@gmail.com wrote: Ah /Wall includes /W4 - sorry. So this is excellent... marpa is very well coded -; Could agree more, on both counts! :) As for /Wp64 — I will surely try. Le samedi 11 janvier 2014 13:12:02 UTC+1,

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

2014-01-11 Thread Ruslan Shvedov
On Sat, Jan 11, 2014 at 7:05 PM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: That's right -- environment CFLAGS should be honored by Libmarpa -- but not by XS and Module::Build!. The difference is tradition and practice. GNU autoconf goes to a lot of trouble to honor the

Re: Adding lhs and name to array item descriptors of action adverb

2014-01-13 Thread Ruslan Shvedov
, I'll give it a shot on the weekend ($work breaks in) -- jeffrey On 01/12/2014 11:55 PM, Ruslan Shvedov wrote: lhs for G1 rules and name for L0 so that to enable :default ::= action = [lhs, values] lexeme default = action = [name, value] instead of :default ::= action = [values

Re: Adding lhs and name to array item descriptors of action adverb

2014-01-14 Thread Ruslan Shvedov
am addressing your question, or that I understood it, but I hope this clarifies things a bit. -- jeffrey On 01/13/2014 11:28 PM, Ruslan Shvedov wrote: I think I need some good advice to make sure that I'm on the right track. I started from cpan\lib\Marpa\R2\Value.pm and Value-overview.html

Re: Developer's version 2.079_009: Phase 1 of the engine rewrite

2014-01-16 Thread Ruslan Shvedov
cygwin (5.14.2) and winxp (5.18.1) installed just fine, no warnings under windows, which worth attention, except cl -c-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T

sl_json.t with ASF semantics a bit slower than AST: as expected?

2014-01-16 Thread Ruslan Shvedov
I once thought that traversing ASF's can be a faster way of doing semantics because ASF's *value() *is not called (actions are not applied) and grammar can be absolutely syntactic, so I decided to try it with *sl_json.t* from Marpa test suite (latest dev version, cygwin, 5.14.2). Changes made to

Adding lhs array descriptor -- push_lhs command added

2014-01-17 Thread Ruslan Shvedov
Contexthttps://groups.google.com/d/msg/marpa-parser/ub5ZOYF3qIQ/fgqZ5uyhu8AJ . I've added push_lhs to command, it returns *undef* so far, but otherwise seems to work -- all tests pass except sl_timeflies.t where it is actually used, which warns on uninitialized values. Jeffrey, can you please --

Re: sl_json.t with ASF semantics a bit slower than AST: as expected?

2014-01-18 Thread Ruslan Shvedov
Is it intended that the JSON grammar is not reused? The script would 2 times faster if it were. On Thu, Jan 16, 2014 at 8:53 PM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: $naif_recce-value() is being called to parse the JSON grammar, as opposed to the JSON itself. Note that

Re: alternative() failed

2014-01-18 Thread Ruslan Shvedov
cpan/libmarpa/dev/api.texihttps://github.com/jeffreykegler/Marpa--R2/blob/master/cpan/libmarpa/dev/api.texi [1] says it typically indicates an application error, so internals are less likely. [1] @deftypevr Macro int MARPA_ERR_INACCESSIBLE_TOKEN This error code indicates that indicates that the

Re: Adding lhs array descriptor -- push_lhs command implementation

2014-01-18 Thread Ruslan Shvedov
, Ruslan Shvedov wrote: Contexthttps://groups.google.com/d/msg/marpa-parser/ZXPPVLQ8bwE/DxeM5kmPSH4J. With this commithttps://github.com/rns/Marpa--R2/commit/8e8569bbd0e6d86df9ed1c50277bb0d0d9d8500a push_lhs command returns the right LHS id's to the test script. Jeffrey, can you take a look

Re: Adding lhs array descriptor -- push_lhs command implementation

2014-01-19 Thread Ruslan Shvedov
On Sat, Jan 18, 2014 at 8:28 PM, Ruslan Shvedov ruslan.shve...@gmail.comwrote: On Sat, Jan 18, 2014 at 8:10 PM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: I made comments on the commit. Thanks, I answered on the mailing list. Sorry, that was actually Github. I have them

Re: sl_json.t with ASF semantics a bit slower than AST: as expected?

2014-01-19 Thread Ruslan Shvedov
Turns out, JSON-XS-3.01 supports incremental parsinghttp://search.cpan.org/~mlehmann/JSON-XS-3.01/XS.pm#INCREMENTAL_PARSING. I don't know if it's a big deal, but looks worth re-implementing. On Sun, Jan 19, 2014 at 10:17 AM, Ruslan Shvedov ruslan.shve...@gmail.comwrote: On Sun, Jan 19, 2014

Re: Marpa-R2 2.079_012 uploaded -- the end of phase 2 of the parse engine rewrite

2014-01-24 Thread Ruslan Shvedov
Installed ok and works fine for me on winxp (5.18.1) and cygwin (5.14.2). On Fri, Jan 24, 2014 at 7:09 AM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: I have just uploaded Marpa-R2 2.079_012 https://metacpan.org/release/JKEGL/Marpa-R2-2.079_012to CPAN. It represents the

Re: Undo's

2014-01-25 Thread Ruslan Shvedov
I was thinking about use cases for Undo's and here is the braindump: this use case for forgiving adverb https://gist.github.com/rns/8473261 to test for literals depending on the symbol which follows them MarpaX::Regex::Verbal I wrote about today in another thread on this

Re: Low-hanging fruit: A Regex compiler

2014-01-25 Thread Ruslan Shvedov
Great, I'll put it on my queue. On Sat, Jan 25, 2014 at 7:59 PM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: I like the idea. Regular expressions, as parsed using special-purpose regular expression engines, will always survive, because of the speed. But a lot of things people

Re: Low-hanging fruit: A Regex compiler

2014-01-25 Thread Ruslan Shvedov
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 jeandamiendur...@gmail.com wrote: Then you might like my

Re: To folks following me on Github over the last few minutes

2014-01-25 Thread Ruslan Shvedov
No problem, absolutely, gmail handled it just fine. On Sat, Jan 25, 2014 at 10:15 PM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: A few of you are following me on Github and over the last few minutes probably saw some wierd behavior -- the same comment repeated many times. My

Re: To folks following me on Github over the last few minutes

2014-01-25 Thread Ruslan Shvedov
BTW, a github's robot today thought I'm not a human and removed all my PRs, comments and issues and I had to contact support to prove otherwise. The support lady was, well, very supportive and cleared the mess. :) On Sat, Jan 25, 2014 at 10:15 PM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com

Re: Low-hanging fruit: A Regex compiler

2014-01-25 Thread Ruslan Shvedov
Well, verbal expressions are for illustration only, I have in mind smth. along the lines of: *input* ../cpan/lib/dev/file.c(11824) : warning C4820: '__unnamed' : '3' bytes padding added after member 'c' ../cpan/lib/dev/file.c(12464) : warning C4100: 'param' : unreferenced formal parameter

Re: Low-hanging fruit: A Regex compiler

2014-01-26 Thread Ruslan Shvedov
Yep, interesting read, thanks for sharing. On Mon, Jan 27, 2014 at 12:35 AM, Durand Jean-Damien jeandamiendur...@gmail.com wrote: 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

Re: New developer's release, with efficient Longest Acceptable Tokens Matching

2014-02-15 Thread Ruslan Shvedov
for this may be that the file is very new and the checksum has not yet been calculated, but it may also be that something is going awry right now. Proceed? [yes] CPAN: Compress::Zlib loaded ok (v2.06) On Sat, Feb 15, 2014 at 6:28 PM, Ruslan Shvedov ruslan.shve...@gmail.comwrote: Marpa-R2-2.079_015

Re: Request for discussion: an interface statement

2014-02-15 Thread Ruslan Shvedov
(1) while *::array* is ok for both lexemes and G1 rules, to let the user see both the parse result and and how it is parsed, I'd suggest the following defaults I've caught myself using frequently: :default ::= action = [lhs,values] lexeme default = action = [lhs,value] forgiving = 1 where *lhs

Re: Request for discussion: an interface statement

2014-02-15 Thread Ruslan Shvedov
/2014 11:17 AM, Ruslan Shvedov wrote: Finally, something I'm not sure about: a developer version with meta grammar converted to forgiving to let people test against it and see if and how exactly it is (in)compatible. -- You received this message because you are subscribed to the Google Groups

Re: Request for discussion: an interface statement

2014-02-15 Thread Ruslan Shvedov
by specifying both or one of them will help find incompatibilities, gather feedback and then decide if it's needed or the new defaults are sensible enough to let them, well, just remain the defaults. -- jeffrey On 02/15/2014 11:17 AM, Ruslan Shvedov wrote: (1) while *::array* is ok for both

Lexical Scanning in Go

2014-02-15 Thread Ruslan Shvedov
A presentation by Rob Pike — http://cuddle.googlecode.com/hg/talk/lex.html#landing-slide — basically, template parser deliberately built from scratch — no regexp, lex, yacc, etc. — made me wonder if he'd used marpa when he could. -- You received this message because you are subscribed to the

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

2014-02-20 Thread Ruslan Shvedov
Just thought: links to docs or code examples woudn't hurt in the advantages page http://savage.net.au/Perl-modules/html/marpa.papers/chapter2.html. On Thu, Feb 20, 2014 at 11:21 AM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: I just re-read the linked

Re: RFD, take 2: interface 2

2014-02-24 Thread Ruslan Shvedov
I'm mostly with Ron on that — to me, merely declaring/documenting :default ::= action = [name,values] as the current best practice to start grammar development by looking at the names/values returned by the recognizer, like that once was the case with :default ::= action = ::array seems to

Re: lexeme default vs. :default and :lexeme

2014-02-25 Thread Ruslan Shvedov
. -- jeffrey On 02/25/2014 08:25 AM, Ruslan Shvedov wrote: Just caught myself thinking that :default ::= action = [name, values] :lexeme default ::= latm = 1 looks like a bit more consistent (well, for some definitions of consistency at least) syntax than the current :default

symbol and name descriptors produce refs in AST's

2014-03-01 Thread Ruslan Shvedov
As in script https://gist.github.com/rns/9299823#file-refs-in-ast-t, outputhttps://gist.github.com/rns/9299823#file-refs-rather-than-scalars-in-ast . A symbol, e.g. 'bracketed' in one ast node is followed by ${\$VAR1-[0]} in its place in all ast nodes downwards. My use case where I'd appreciated

Re: cscan on Go lang C code

2014-03-05 Thread Ruslan Shvedov
That's a great start! As for the question, can't really help here, sorry, golang-devhttps://groups.google.com/forum/#!forum/golang-dev looks like a good place to ask and/or report on the results. We plan to translate the existing compilers from C to Go by writing and then applying an automatic

Re: Compile fails because of long long int

2014-03-13 Thread Ruslan Shvedov
This specific report doesn't include the msvc compiler version, but from these include and lib dirs in the environment C:\Program Files\Microsoft Platform SDK\Bin;C:\Program Files\Microsoft Platform SDK\Bin\WinNT;C:\Program Files\Microsoft Visual Studio\VC98\Bin;C:\Program Files\Microsoft Visual

Re: Compile fails because of long long int

2014-03-13 Thread Ruslan Shvedov
Well, I've just installed Visual Studio 6.0, compiled and installed perl 5.18.2 with it, downloaded J/JK/JKEGL/Marpa-R2-2.082000.tar.gz, unpacked it, patched line 525 in Build_Me.pm to read if (!$ac-check_type('unsigned long long int') and !$ac-check_type('unsigned __int64')) { and Marpa::R2

Re: New release candidate: Marpa-R2-2.083_001

2014-03-30 Thread Ruslan Shvedov
Marpa-R2-2.083_001 installs and runs my code ok (gcc 4.8.2/perl 5.14.2 under cygwin, msvc 2003/perl 5.18.1 and msvc 6.0/perl 5.18.2 under winxp). The last one gives hopes that Marpa-R2-2.083_001 would install and run ok under ActiveState perl, for which msvc 6.0 is the defauilt compiler. On

Re: New release candidate: Marpa-R2-2.083_001

2014-03-30 Thread Ruslan Shvedov
Re Translate message into English, I've never seen that for English texts. Perhaps some all too clever head at Google thinks they need to translate from English (US) to English (Australia)? But Latmian/Latmus makes it rather greek to me. :) On Sun, Mar 30, 2014 at 4:04 AM, Ron Savage

Re: From ASF to another language

2014-06-26 Thread Ruslan Shvedov
http://longanswers.blogspot.de/2013/06/transforming-syntax.html On Thu, Jun 26, 2014 at 4:43 PM, John Alvord johngrahamalv...@gmail.com wrote: I have been successful enough parsing a mini-language. Now someone wants me to do a translator from that language to a newer flavor. Are there any

Re: From ASF to another language

2014-07-08 Thread Ruslan Shvedov
? === was never documented. I certainly do not expect that - or any - level of hand holding, but your post does seem to stop short of the goal. John Alvord On Thu, Jun 26, 2014 at 7:12 AM, Ruslan Shvedov ruslan.shve...@gmail.com wrote: http://longanswers.blogspot.de/2013/06/transforming

Re: From ASF to another language

2014-07-08 Thread Ruslan Shvedov
for the first time in years. John Alvord On Jul 8, 2014 9:39 AM, Ruslan Shvedov ruslan.shve...@gmail.com wrote: John, the article isn't actually mine, it's amon http://stackoverflow.com/users/1521179/amon's to illustrate his answer to this stackoverflow question http://stackoverflow.com

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

2014-07-10 Thread Ruslan Shvedov
Built, tested and installed ok on windows xp sp3 under perl 5.18.1. 'pass' report sent to cpantesters. Hope this helps. On Thu, Jul 10, 2014 at 6:59 PM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: Re Marpa-R2 2.087_002: It's a release candidate, and at this point, I've gotten lots

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

2014-07-10 Thread Ruslan Shvedov
cl/nmake was what I used under winxp/perl 5.18.1. On Thu, Jul 10, 2014 at 9:12 PM, Durand Jean-Damien jeandamiendur...@gmail.com wrote: I meant nmake/cl box. Le jeudi 10 juillet 2014 20:12:04 UTC+2, Durand Jean-Damien a écrit : Ok on windows7/perl-5.18/gcc/dmake. Anybody with a name/cl

Re: Kollos: a project

2014-07-10 Thread Ruslan Shvedov
Sounds exiting. And certainly interesting to be a part of. Time to look at Lua more closely. So, Kollos will be a high level wrapper around libmarpa? Smth. like THIF, but in Lua? On Fri, Jul 11, 2014 at 4:31 AM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: This thing you call

Re: Yet another ambitious project

2014-07-20 Thread Ruslan Shvedov
Hi Paul, here are my 2cents on this, in no particular order *C style #include's* — aren't they supposed to be processed before parsing the program? The grammar has actions for include's, but I honestly can't see how you are going to inject the included file's contents at the recongition time

Re: Yet another ambitious project

2014-07-20 Thread Ruslan Shvedov
On Sun, Jul 20, 2014 at 9:56 PM, Paul Bennett paul.w.benn...@gmail.com wrote: On Sun, Jul 20, 2014 at 10:06 AM, Ruslan Shvedov ruslan.shve...@gmail.com wrote: Hi Paul, here are my 2cents on this, in no particular order C style #include's — aren't they supposed to be processed before

Re: Yet another ambitious project

2014-07-20 Thread Ruslan Shvedov
A couple of nits on the updated grammar: *1* Expression ::= Value and, later, Value: ... | Expression action = eval ... This alternative looks redundant. *2* UDFExpr ::= UDF OptionalExpressionSequence ExpressionSequence ::= Expression OptionalExpressionSequence

A good BNF/Grammar Tutorial

2014-07-25 Thread Ruslan Shvedov
http://marvin.cs.uidaho.edu/Teaching/CS445/grammar.htm— that is. Very gentle and informal, but dense and informative, covering (E)BNF, precedence, associativity, ambiguity, tips for grammar writing and useful examples. What I find both useful and amusing: (1) the grammar syntax is nearly SLIF,

Re: A good BNF/Grammar Tutorial

2014-07-25 Thread Ruslan Shvedov
On Fri, Jul 25, 2014 at 3:06 PM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: Actually, the SLIF allows angle brackets, but they are optional for non-terminals. Yes it does! So the only thing needed is to change double quotes to single for literals and wrap literals in single

Re: A military analysis of Gaza

2014-08-19 Thread Ruslan Shvedov
An informative read—I somehow managed to miss the role the tunnels played in the big picture of the conflict. Thanks for sharing it. On Wed, Aug 20, 2014 at 4:26 AM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: Here's a military analysis of the IDF's actions in Gaza

Re: New Marpa description

2014-08-27 Thread Ruslan Shvedov
marked as such, of course) along with production uses. -- jeffrey rns On 08/27/2014 06:00 AM, Ruslan Shvedov wrote: Looks very good; I'd suggest adding 3 paragraphs: about implementation, applications, and highlights as preliminary drafted below ([](...) is markdown syntax for hyperlinks

Re: How can I handle this kind of ambiguity?

2014-09-03 Thread Ruslan Shvedov
Can you please look at this gist https://gist.github.com/rns/fb6abf62a5fa779957ba? The result is in the comment below it. This might be a solution provided that I've got the right idea. On Wed, Sep 3, 2014 at 11:44 AM, Andrew Dunbar hippytr...@gmail.com wrote: I've come back to Perl after

Re: How can I handle this kind of ambiguity?

2014-09-03 Thread Ruslan Shvedov
On Thu, Sep 4, 2014 at 8:00 AM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: Perhaps if we differentiate between closed and open spans -- closed ending in a consonant and open ending in a vowel. All ::= Span Span ::= Closed_Span | Open_Span Closed_Span ::= Abbreviation

Re: Marpa-R2-2.091_001, a bug fix release candidate, uploaded

2014-09-07 Thread Ruslan Shvedov
Marpa-R2-2.091_001 built, tested, installed successfully under cygwin (5.14.2, gcc) and windows (5.18.1, cl/nmake). On Sun, Sep 7, 2014 at 9:09 PM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: I've just uploaded Marpa-R2-2.091_001 to CPAN. It a bug fix release: amon discovered

Stackoverflow question about parsing C preprocessor files in Perl

2014-09-09 Thread Ruslan Shvedov
subj http://stackoverflow.com/questions/25734421/parse-multi-nested-conditional-c-preprocessor-statements-in-perl — I gave an answer, hope somebody can supplement. I take it that Jean-Damien's MarpaX-Languages-C-AST parse C files only after preprocessor? -- You received this message because you

Re: Stackoverflow question about parsing C preprocessor files in Perl

2014-09-09 Thread Ruslan Shvedov
Thanks for confirming. On Wed, Sep 10, 2014 at 7:45 AM, Durand Jean-Damien jeandamiendur...@gmail.com wrote: 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

Re: New Marpa description

2014-09-10 Thread Ruslan Shvedov
I'm afraid not: I checked under windows xp in Firefox, IE and Chrome and right borders is off on 2 out of 3. They have 120% system font scaling though that can be a reason. HTML-wise, that's probably because both the global toc table and contents table have 100% width, IIRC. On Wed, Sep 10, 2014

Re: New Marpa description

2014-09-10 Thread Ruslan Shvedov
On Wed, Sep 10, 2014 at 11:51 AM, Ron Savage r...@savage.net.au wrote: On Wednesday, 10 September 2014 17:10:50 UTC+10, rns wrote: I'm afraid not: I checked under windows xp in Firefox, IE and Chrome and right borders is off on 2 out of 3. They have 120% system font scaling though that can

Re: Windows build problem with spaces in name?

2014-09-10 Thread Ruslan Shvedov
10:12 AM, Ruslan Shvedov wrote: Wrapping $libmarpa_build_dir in double quotes in Build_Me.pm: - my @new_ccflags = ( '-I', $libmarpa_build_dir, '-I', 'xs' ); +my @new_ccflags = ( '-I', '' . $libmarpa_build_dir . '', '-I', 'xs' ); fixed it for me under 'John Doe' account on cygwin

Re: New indexed CPAN release of Marpa::R2

2014-09-10 Thread Ruslan Shvedov
Marpa-R2-2.092000 Built, tested and installed just fine and works ok for me under windows xp (5.18.1, cl/nmake) and cygwin (5.14.2, gcc/make). On Thu, Sep 11, 2014 at 4:34 AM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: I just uploaded Marpa-R2-2.092000 -- it an indexed release,

Re: Parsing: a timeline is a suprise hit

2014-09-10 Thread Ruslan Shvedov
Parsing: a timeline http://jeffreykegler.github.io/Ocean-of-Awareness-blog/individual/2014/09/chron.html makes a great read. It puts things in broad perspective very succinctly and thus is very powerful, a pleasant contrast to mainstream technical articles. Also, it reads like a very good short

Re: New Marpa description

2014-09-10 Thread Ruslan Shvedov
Oh, yes. Brownie points. On Thu, Sep 11, 2014 at 8:05 AM, Ron Savage r...@savage.net.au wrote: Reward for pain! -- 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: Developer Marpa::R2 release, with parse() and ambiguous()

2014-09-13 Thread Ruslan Shvedov
Marpa-R2 2.093_000 built, installed and runs ok for me under cygwin (5.14.2, gcc/make) and winxp (5.18.2, cl/nmake). On Sun, Sep 14, 2014 at 8:24 AM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: I've just uploaded Marpa-R2 2.093_000 to CPAN. The main features are the new

Re: Developer Marpa::R2 release, with parse() and ambiguous()

2014-09-14 Thread Ruslan Shvedov
Also installed ok under a winxp user account containing spaces (e.g. 'John Doe'). On Sun, Sep 14, 2014 at 8:24 AM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: I've just uploaded Marpa-R2 2.093_000 to CPAN. The main features are the new $slg-parse() and $slr-ambiguous() methods,

Re: What causes a libmarpa rule step to have its argument list start at stack position -1?

2014-09-15 Thread Ruslan Shvedov
Reading the libmarpa doc: the application must maintain the stack ensuring that it has the correct size for the valuation steps — http://jeffreykegler.github.io/Marpa-web-site/libmarpa_api/latest/Maintaining-the-stack.html#Maintaining-the-stack — hope this helps. On Mon, Sep 15, 2014 at 2:30 PM,

Re: New indexed Marpa::R2 release

2014-09-17 Thread Ruslan Shvedov
Marpa-R2 2.094000 built, installed and runs ok for me under winxp and cygwin (5.18.1/cl/nmake and 5.14.2/gcc/make). On Wed, Sep 17, 2014 at 8:07 AM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: I have just uploaded Marpa-R2 2.094000 to CPAN. It is an indexed, stable release,

Re: New indexed Marpa::R2 release

2014-09-17 Thread Ruslan Shvedov
Looks like it has not propagated to enough of cpan yet. I had to download and install it manually from metacpan.org. On Wed, Sep 17, 2014 at 5:31 PM, Helmut Wollmersdorfer helmut.wollmersdor...@gmail.com wrote: Am Mittwoch, 17. September 2014 07:07:48 UTC+2 schrieb Jeffrey Kegler: I have

SO question about Aycock Horspool 2002

2014-09-17 Thread Ruslan Shvedov
http://stackoverflow.com/questions/25893690/practical-earley-parsing-aycock-horspool-2002-how-to-add-back-pointers -- 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

IRC link on the sidebar on metacpan

2014-09-18 Thread Ruslan Shvedov
http://blogs.perl.org/users/peter_rabbitson/2014/09/encourage-user-participation-via-a-single-line-patch-to-your-dist-metadata.html irc.freenode.net is supported, they say, so perhaps irc:// irc.freenode.net/#marpa can be usefully displayed on Marpa::R2 metacpan page? -- You received this

Re: A grammar for quoted strings with escaped chars

2014-09-22 Thread Ruslan Shvedov
On Tue, Sep 23, 2014 at 2:14 AM, Ron Savage r...@savage.net.au wrote: Thanx for the link. 2 of those 3 samples (the 2nd 3rd) produce ambiguous parses. Is that what you find too? Yes, the code warns about it; actually I was planning to deal with it as part of my current work on ASF-based

Re: A grammar for quoted strings with escaped chars

2014-09-24 Thread Ruslan Shvedov
Well, perhaps. BTW, I was thinking about namespace more like an adverb for :default pseudo-rule and/or lexeme default statements. Or, crazy as it is, wrapping grammars up and exposing them as perl modules. On Wed, Sep 24, 2014 at 9:19 AM, Ron Savage r...@savage.net.au wrote: Not at first.

Using Marpa::R2::NAIF to clean up Context-Free Grammars

2014-09-26 Thread Ruslan Shvedov
Unproductive and unaccessible rules can be removed from a grammar easily using code like this: # cleanup the grammar using Marpa NAIF my $grammar = Marpa::R2::Grammar-new({ start = ..., rules = ..., unproductive_ok = 1, inaccessible_ok = 1, }); $grammar-precompute(); my $rules =

Re: Using Marpa::R2::NAIF to clean up Context-Free Grammars

2014-09-26 Thread Ruslan Shvedov
On Sat, Sep 27, 2014 at 12:54 AM, Christopher Layne cla...@anodized.com wrote: Couldn't you just not use unproductive_ok and inaccessible_ok? Yes I could, and tried that at first, but that issued warnings I hated silencing. On Sep 26, 2014, at 0930 PT, Ruslan Shvedov ruslan.shve...@gmail.com

Re: Can I use the R2 scanless interface with an external tokenizer?

2014-09-29 Thread Ruslan Shvedov
External scanning is usually performed by reading lexemes using ...— https://github.com/jeffreykegler/Marpa--R2/blob/master/cpan/pod/Scanless/R.pod Examples https://github.com/jeffreykegler/Marpa--R2/blob/master/cpan/t/sl_durand.t

Wow, this is very cool! on Marpa at StackOverflow

2014-09-30 Thread Ruslan Shvedov
A StackOverflow user mvp http://stackoverflow.com/users/1734130/mvp on a Marpa script in this SO answer http://stackoverflow.com/a/26112452/4007818 . -- You received this message because you are subscribed to the Google Groups marpa parser group. To unsubscribe from this group and stop

Re: My current priorities

2014-09-30 Thread Ruslan Shvedov
On Tue, Sep 30, 2014 at 3:44 AM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: These days my #1 priority is bug and misfeature fixes to Marpa::R2 and Libmarpa. Outright bugs are rare at this point, and usually quick to fix. But I've spent the last couple of weeks on a rewrite of

Re: A problem with calling ambiguous() and ambiguity_metric()

2014-09-30 Thread Ruslan Shvedov
Perhaps, something like this: If you need to call value() after ambiguous(), make sure to call series_restart() first. would make the things clearer. On Wed, Oct 1, 2014 at 5:33 AM, Ron Savage r...@savage.net.au wrote: The docs for Marpa::R2::Scanless:R say, for ambiguous(), This method

Re: A problem with calling ambiguous() and ambiguity_metric()

2014-09-30 Thread Ruslan Shvedov
I've added a couple of series_restart() calls to your gist, see https://gist.github.com/rns/0371dfcffa6887f4e5a2 to avoid exceptions. The test output makes is arguably more useful that way. On Wed, Oct 1, 2014 at 8:01 AM, Ron Savage r...@savage.net.au wrote: I've switched over to gists because

Marpa-R2-2.095_000: IRC channel link on metacpan broken

2014-10-02 Thread Ruslan Shvedov
because mibbit stopped supporting freenode: Connections via mibbit are no longer supported on freenode. You may wish to consider using http://webchat.freenode.net instead. Further information over at http://bit.ly/19JILF It's in dev version and so is better deferred until/unless metacpan

Links to test suite code from the docs

2014-10-02 Thread Ruslan Shvedov
As a braindump — See the code links after code fragments shown in Synopsis and other sections of Marpa::R2 docs could be useful to find out how the feature is used in a real program, e.g. test suite. Looks doable, because 1. the code fragments in Marpa::R2 docs come from real code via

Marpa does the job — simple parser for a crazy text

2014-10-02 Thread Ruslan Shvedov
complicated text http://stackoverflow.com/questions/26167132/parsing-of-parenthesis-with-sed-using-regex/26168693 — simple parser https://gist.github.com/rns/3537965d905bf34c1b66 -- You received this message because you are subscribed to the Google Groups marpa parser group. To unsubscribe from

Re: New stable release with improved SLIF parse event documentation

2014-10-03 Thread Ruslan Shvedov
Marpa-R2 2.096000 built, installed and runs fine for me under winxp (5.18.1/cl/nmake) and cygwin (5.14.2/gcc/make). On Fri, Oct 3, 2014 at 9:21 PM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: I have just uploaded Marpa-R2 2.096000 to CPAN. It's major feature is to move the improved

Re: Parsing tokens containing white spaces

2014-10-20 Thread Ruslan Shvedov
#!perl use strict; use warnings; use Data::Dumper qw/Dumper/; use Marpa::R2; $Data::Dumper::Deepcopy = 1; my $dsl = 'END_OF_DSL'; :default ::= action = [name,values] lexeme default = latm = 1 Expression ::= Expression '=' Expression | QuotedWord | Word QuotedWord ::= '' Word ''

Re: Parsing tokens containing white spaces

2014-10-20 Thread Ruslan Shvedov
#!perl use strict; use warnings; use Data::Dumper qw/Dumper/; use Marpa::R2; use String::Random; $Data::Dumper::Deepcopy = 1; my $dsl = 'END_OF_DSL'; :default ::= action = [name,values] lexeme default = latm = 1 Expression ::= Expression '=' Expression | QuotedWord | Word

[MarpaX::Regex] empty capturing groups

2015-02-05 Thread Ruslan Shvedov
MarpaX::Regex https://github.com/rns/MarpaX-Regex saw some progress recently: as an early preview, here is the BNFied version https://github.com/rns/MarpaX-Regex/blob/master/t/The_basics.t#L155 of floating point regexp from perlretut http://perldoc.perl.org/perlretut.html#Building-a-regexp

Re: MIT/Lua License Assignment of copyright

2015-01-20 Thread Ruslan Shvedov
Also not a licensing expert or lawyer, I think a change that breaks the barriers to use of software or otherwise makes it more accessible for people is ultimately a good thing. However, a licensing choice of change, which carries a symbolic value, among others, can break barriers for some people

Re: Ambiguous parses induced in external lexer

2015-02-16 Thread Ruslan Shvedov
Thomas, thanks for making it more clear for me. I'm not sure I've got all the details right, so, based on my current understanding: Looks like you can incorporate your ruby slippers into grammar as lexemes/rules so that Marpa recognize the input according to them. Marpa is good at ambiguity so it

Re: Not Marpa related, but anyway: Announce Text::Table::Manifold

2015-02-02 Thread Ruslan Shvedov
Absolutely welcome. As an aside, can't find the link to the script that tests your Marpa modules and print nice statistics, e.g. Test statistics: ... Fail: ... -- is it online? On Mon, Feb 2, 2015 at 8:42 AM, Ron Savage r...@savage.net.au wrote: $many x $thanx; -- You received this message

Re: Handling rejection

2015-02-09 Thread Ruslan Shvedov
I'd suggest 2 code examples: one for parsing preprocessor statements [1] and another for parsing length-prefixed format with prediction and completion events [2] -- is show how to use lexeme_read() with pos() and resume(). Hope this helps. [1] https://gist.github.com/rns/3b2f48477fc23d0ab0f7 [2]

RFD: MIT/Lua License for Libmarpa

2015-02-12 Thread Ruslan Shvedov
Further to the talk on IRC [1] with Jeffrey Kegler, the author of Libmarpa, on his request, I'm restarting the discussion [2] about switching Libmarpa to the MIT/Lua license [3] so that to ask opinions on the matter and make sure that we have consensus on that licensing change. As detailed in

Re: Error if no L0 rules

2015-03-14 Thread Ruslan Shvedov
https://metacpan.org/pod/distribution/Marpa-R2/pod/Tracing.pod On Sat, Mar 14, 2015 at 2:32 PM, Максим Суслов suslov...@gmail.com wrote: MS I thought it is normal case (a less or more) when no L0 rules at all for small grammars. JK There are always L0 rules, although sometimes they are

Re: Peep action

2015-03-14 Thread Ruslan Shvedov
On Sat, Mar 14, 2015 at 3:14 PM, Максим Суслов suslov...@gmail.com wrote: My goal is create rule peep, which allow to see current parse tree for any rule. To use it you shall append action = peep and see how parse tree looks, but don't change parse tree itself. Code sub MyActions::peep {

Re: Obtaining value and continuing the parse

2015-03-13 Thread Ruslan Shvedov
AFAIK, once you called value(), the recognizer goes to the valuation phase and cannot be put back to the reading phase. value() returns undef to mark the end of the parse series, because you have already retrieved the parse value (there is only one because there is no ambiguity). After calling

Re: Upcoming Marpa--R2 3.0

2015-05-06 Thread Ruslan Shvedov
Actually, latk++ is planning a pull request to Marpa Papers about this -- https://github.com/jeffreykegler/Marpa--R2/issues/254#issuecomment-99229630 On Thu, May 7, 2015 at 5:48 AM, Ron Savage r...@savage.net.au wrote: I'm delighted to see latk has investigated this thoroughly, and we have a

Re: PHP parser?

2015-06-14 Thread Ruslan Shvedov
Sure, I didn't mention them because, arguably, they look less like PHP. On Sun, Jun 14, 2015 at 10:20 PM, Durand Jean-Damien jeandamiendur...@gmail.com wrote: 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

Re: PHP parser?

2015-05-28 Thread Ruslan Shvedov
Hi, Jean-Damien Durand did parsers for C, SQL, ECMAScript, m4 -- https://github.com/jddurand?tab=repositories If you start with a PHP EBNF grammar, e.g. [1] -- perhaps you can find useful a Lua parser I did -- I started with a similar EBNF for Lua [2], converted it to Marpa SLIF (EBNF is

Re: Installing Marpa::R2 on Red Hat Enterprise Linux Server release 7.1 (Maipo)

2015-08-17 Thread Ruslan Shvedov
Also, you can go on marpa irc channel -- #marpa on irc.freenode.net -- perhaps there is somebody more experienced in the platform. On Mon, Aug 17, 2015 at 11:26 AM, phi...@free.fr wrote: Unfortunately, cpanm is not installed on Red Hat 7.1, and yum info cpanm results in a not found message.

Re: Installing Marpa::R2 on Red Hat Enterprise Linux Server release 7.1 (Maipo)

2015-08-17 Thread Ruslan Shvedov
On Mon, Aug 17, 2015 at 11:26 AM, phi...@free.fr wrote: Unfortunately, cpanm is not installed on Red Hat 7.1, and yum info cpanm results in a not found message. FWIW, there is more than one way to install cpanm, e.g. cpan App::cpanminus and others --

  1   2   >