Re: Understanding actions, default and custom, where to start from?

2017-03-16 Thread Ruslan Shvedov
On Wed, Mar 15, 2017 at 9:42 PM, Daniel Blanch < daniel.blanch.batal...@gmail.com> wrote: > > Much clearer now, thanks a lot. > > El martes, 14 de marzo de 2017, 16:29:39 (UTC+1), Jeffrey Kegler escribió: >> >> "Bless" versus actions is just a TIMTOWTDI feature. I found bless less >> useful, to

Re: Understanding actions, default and custom, where to start from?

2017-03-14 Thread Ruslan Shvedov
This is comparison of AST vs. actions that is IMHO applicable to Marpa semantics. On Tue, Mar 14, 2017 at 6:08 PM, Daniel Blanch < daniel.blanch.batal...@gmail.com> wrote: > Hi, I keep trying to understand the semantics of

Re: Understanding actions, default and custom, where to start from?

2017-03-13 Thread Ruslan Shvedov
Hi Daniel, it helps (at times) to work the other way round—code to doc, e.g., re actions, start from a simple example and read the doc to

Re: Trying to understand prioritized rules, but my grammar fails to parse when I use the loosen operator

2017-02-03 Thread Ruslan Shvedov
With group associativity specified for parens, like this | ('(') (')') _assoc => group_ action => ::first your script works for me. It complains about the lack of rule action named 'or' though. On Fri, Feb 3, 2017 at 8:37 AM, wrote: > I am using the simple boolean

Re: Finding a parse inside a (potentially long) string?

2016-12-23 Thread Ruslan Shvedov
IMO, just make sure your BNF produces a parser that parses all the inputs correctly and then use parens to weed out the uninteresting parts as needed. On Thu, Dec 22, 2016 at 5:38 PM, hovercraft-google wrote: > Thank you very much for your attention and references.

Re: Java 8 Parser

2016-10-17 Thread Ruslan Shvedov
Great, thanks. BTW, s/How to I/How do I/ on both. I'd file a PR, but couldn't find those entries at https://github.com/ronsavage/marpa.faq -- missing something perhaps. On Tue, Oct 18, 2016 at 3:12 AM, Ron Savage wrote: > Using this material, I've added 2 new questions to

Re: Java 8 Parser

2016-10-17 Thread Ruslan Shvedov
On Thu, Oct 13, 2016 at 6:00 PM, Harry wrote: > > 1. Keyword vs Identifier: > http://stackoverflow.com/questions/27109840/marpa-can-i-explicitly-disallow-keywords-as-identifiers https://gist.github.com/rns/d19b40ffc5523659dec9 -- events can be used to analyze the string

Re: Testing a grammar

2016-08-26 Thread Ruslan Shvedov
One thing to consider is whether the grammar under testing can be used to generate test inputs, as if that grammar has a bug, so will the inputs -- seems obvious, but I've not really tested it. My experience of writing a parser for Lua was this: I took the EBNF grammar from the language spec,

Re: Benchmark of a simple arithmetic parser (vs Perl 5 regex)

2016-06-18 Thread Ruslan Shvedov
There is also this a blog post by Jeffrey -- http://blogs.perl.org/users/jeffrey_kegler/2012/08/marpa-v-perl-regexes-a-rematch.html -- which shows what to expect in Marpa vs. Perl regexes case. On Sat, Jun 18, 2016 at 2:03 PM, wrote: > Thanks, my initial googling didn't

Re: Benchmark of a simple arithmetic parser (vs Perl 5 regex)

2016-06-18 Thread Ruslan Shvedov
Don't know to what extent this is a time-waster, but my $h = shift; in [1] seems to be unneeded. Another (off the top of my head and untested) way to speed up would be to let value() just build an abstract-syntax tree (AST) by specifying :default ::= action => [ name, value ] lexeme default =

Re: "::lhs" blessing only allowed if LHS is whitespace and alphanumerics

2015-11-26 Thread Ruslan Shvedov
On Thu, Nov 26, 2015 at 12:30 PM, Cev Ing wrote: > Am Donnerstag, 26. November 2015 11:13:50 UTC+1 schrieb rns: >> >> >> >> On Thu, Nov 26, 2015 at 12:00 PM, Cev Ing wrote: >> >>> I got the following error: >>> >>> "::lhs" blessing only allowed if LHS is

Re: Global symbol "$EVAL_ERROR" requires explicit package name

2015-11-26 Thread Ruslan Shvedov
On Thu, Nov 26, 2015 at 6:51 PM, Cev Ing wrote: > > > Am Donnerstag, 26. November 2015 17:12:10 UTC+1 schrieb rns: >> >> >> Nope, you an add use English; -- it's a long name for eval's return value. >> > > Ah thanks I got it. Never used the English packages. > > >> If you need

Re: action => ::lhs

2015-11-26 Thread Ruslan Shvedov
On Thu, Nov 26, 2015 at 7:25 PM, Cev Ing wrote: > I am wondering if it is possible to define a LHS action. I mean something > like this: > > ::= > (CREATE TABLE) identifier ('(') (')' ';') > action => ::lhs > > This should mean call the action with the name of the

Re: SLIF style guide / best practices?

2015-11-21 Thread Ruslan Shvedov
On Sun, Nov 22, 2015 at 8:39 AM, Paul Bennett wrote: > Is there such a document? > My specific scenario... > > I have a grammar broken up into chunks (corresponding more or less > with similarity of meaning in the official SGML spec) at > >

Re: No lexeme found

2015-11-20 Thread Ruslan Shvedov
On Fri, Nov 20, 2015 at 10:59 AM, Cev Ing wrote: > Am Freitag, 20. November 2015 09:36:26 UTC+1 schrieb rns: >> >> Here is an explanation by the author (Jeffrey) -- >> http://irclog.perlgeek.de/marpa/2015-05-19#i_10626590 -- fell free hang >> on IRC to get more info. >> >> >

Re: No lexeme found

2015-11-20 Thread Ruslan Shvedov
Here is an explanation by the author (Jeffrey) -- http://irclog.perlgeek.de/marpa/2015-05-19#i_10626590 -- fell free hang on IRC to get more info. On Fri, Nov 20, 2015 at 10:07 AM, Cev Ing wrote: > Am Donnerstag, 19. November 2015 20:25:19 UTC+1 schrieb rns: >> >>

Re: No lexeme found

2015-11-20 Thread Ruslan Shvedov
On Fri, Nov 20, 2015 at 10:59 AM, Cev Ing wrote: > Am Freitag, 20. November 2015 09:36:26 UTC+1 schrieb rns: >> >> Here is an explanation by the author (Jeffrey) -- >> http://irclog.perlgeek.de/marpa/2015-05-19#i_10626590 -- fell free hang >> on IRC to get more info. >> >> >

Re: No lexeme found

2015-11-19 Thread Ruslan Shvedov
[a-zA-Z0-9_]+ is a quantified rule RHS and it just needs its own LHS as you did above with identifier_extend, otherwise it is a SLIF DSL syntax error. As the doc says: The right side declaration of a rule will often contain one or more RHS > alternatives. A RHS alternative is a series of RHS

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 --

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

2015-08-17 Thread Ruslan Shvedov
Hi, On Mon, Aug 17, 2015 at 11:06 AM, phi...@free.fr wrote: Hi, This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi (with 28 registered patches, see perl -V for more detail) hmm, according to cpantesters [1] Marpa::R2 3.00 passes with 5.16.3 under linux.

Re: Parsing files containing several lines of data

2015-08-16 Thread Ruslan Shvedov
Hello, On Sun, Aug 16, 2015 at 1:19 PM, phi...@free.fr wrote: Hello, I would like to parse a text file containing the following data, with MARPA: EUR=089980 GBP=063886 AUD=135358 ... When I run my program (see below), it only displays the first exchange rate, namely 089980, although

Re: Calling C MARPA from Java

2015-08-16 Thread Ruslan Shvedov
On Sun, Aug 16, 2015 at 7:08 PM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: rns: Thanks! Your better answers crossed mine. :-) :) They should work together pretty well. On Sun, Aug 16, 2015 at 9:06 AM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: can the C version

Re: Parsing files containing several lines of data

2015-08-16 Thread Ruslan Shvedov
you can do sub My_Actions::do_extract_rate { my ( undef, $t1, undef, $t2 ) = @_; return [ $t1, $t2 ]; } this will return [ [ 'EUR', '089980' ], [ 'GBP', '063886' ], [ 'AUD', '135358' ] ] as the parse value. On Sun, Aug 16, 2015 at 6:41 PM, phi...@free.fr wrote: Removing ::first did

Re: Calling C MARPA from Java

2015-08-16 Thread Ruslan Shvedov
On Sun, Aug 16, 2015 at 6:47 PM, phi...@free.fr wrote: Hello, First of all, can the C version of MARPA be used on its own (without PERL)? Yes, here is a json parser https://github.com/jeffreykegler/libmarpa/blob/master/test/json/json.c in the libmarpa repo. Second, has anyone managed to

Re: Implementation in C# (.NET).

2015-07-12 Thread Ruslan Shvedov
On Mon, Jul 13, 2015 at 4:30 AM, prhu...@gmail.com wrote: I think the implementation is at a point where I'm ready to let the marpa community see it and give some critique. Here is the github repo https://github.com/patrickhuber/pliant. It still needs a lot of work, but I'm pretty sure the

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: 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: 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: 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

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: 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]

[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: 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: 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: 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

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

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

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

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

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: 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.

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

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: 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

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: 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: 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: 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

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: 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

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: 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: 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

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: 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

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: 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: 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: 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: 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: 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

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: 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

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: 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: 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: 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: 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

  1   2   >