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

2014-02-15 Thread Ruslan Shvedov
Please ignore this message, this must be some cpan glitch (cpan croaked about the checksum [1], but I agreed) — once I downloaded and installed Marpa-R2-2.079_015.tar.gz manually (perl Build.pl, Build, Build test, Build install), the above tests pass on both win32 and cygwin. Also, install by cpan

Request for discussion: an interface statement

2014-02-15 Thread Jeffrey Kegler
I'd like opinions on adding a interface statement to the SLIF. Currently, for backward compatibility reasons, some of the defaults are not the best. I'd like to add a interface 2 statement which, if present, will makes these the new defaults: lexeme default = forgiving = 1 :default ::=

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 Jeffrey Kegler
In my working version, the meta-grammar now runs LATM, with no issues. This change probably won't make it into the next indexed release, but will make it into the one after. The difference between changing the default for the meta-grammar (and therefore for the parsing of all SLIF DSL) and

Re: Request for discussion: an interface statement

2014-02-15 Thread Ruslan Shvedov
On Sat, Feb 15, 2014 at 9:37 PM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: In my working version, the meta-grammar now runs LATM, with no issues. This change probably won't make it into the next indexed release, but will make it into the one after. I've added global forgiveness

Re: Request for discussion: an interface statement

2014-02-15 Thread Jeffrey Kegler
I perhaps was too round-about in the way I stated it -- the next developer's version will have an LATM meta-grammar for the SLIF. -- jeffrey On 02/15/2014 12:08 PM, Ruslan Shvedov wrote: On Sat, Feb 15, 2014 at 9:37 PM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com

Re: Request for discussion: an interface statement

2014-02-15 Thread Jeffrey Kegler
Re (1) lhs name would be mildly difficult -- right now the arrays are assembled in C/XS code (the process is blazingly fast), but that layer does *not* know about symbol names. That could be changed, but it's perhaps more like something for interface 3. Re (2), I am not 100% sure I

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

2014-02-15 Thread Ron Savage
Marpa::R2 V 2.079015 Counts: Tests: 542. Modules: 8. Passes: 8. Fails: 0 Duration: 1 minute and 37 seconds -- 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: Request for discussion: an interface statement

2014-02-15 Thread Ron Savage
(1) Why: interface 2 and not: interface = 2 Or even :default = interface = 2 And yes, it's rather longer. But saying ':default' is a good thing (i.e. a heads-up) for beginners... But is this (new token) really an improvement over getting the user to specify their defaults

Re: Request for discussion: an interface statement

2014-02-15 Thread Jeffrey Kegler
Yes, good guess. I meant interface 2. -- jeffrey On 02/15/2014 03:47 PM, Ron Savage wrote: (7) revision 2 I'm confused. Did you mean interface 2? -- You received this message because you are subscribed to the Google Groups marpa parser group. To unsubscribe from this group and stop

Re: Request for discussion: an interface statement

2014-02-15 Thread Jeffrey Kegler
My motivation came from my first attempts to write the documentation for LATM. It means that the prospective user coming to the top-level synopsis is plunged immediately into the SLIF's least perspicuous syntax, and advanced issues. I could just tell the user to treat the two lines you

Re: Request for discussion: an interface statement

2014-02-15 Thread Jeffrey Kegler
This relates to one of the big points which I periodically try to make about parsers and languages. I believe that when it comes to programming languages we've brain-washed ourselves to like unreadable syntax, because that's all traditional parsers could parse, and a line with lots of

Re: Request for discussion: an interface statement

2014-02-15 Thread Jeffrey Kegler
Yes, right. -- jeffrey On 02/15/2014 03:47 PM, Ron Savage wrote: (2) The current situation: So: interface = 1 (Implicitly) means: lexeme default = forgiving = 0 Right? -- You received this message because you are subscribed to the Google Groups marpa parser group. To unsubscribe from

Re: Request for discussion: an interface statement

2014-02-15 Thread Jeffrey Kegler
There's an example of DSL using bless = ::lhs here https://metacpan.org/pod/release/JKEGL/Marpa-R2-2.079_015/pod/Progress.pod#The-example. And sample output here https://metacpan.org/pod/release/JKEGL/Marpa-R2-2.079_015/pod/Progress.pod#Parse-value-at-error-location. There aren't many

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 Jeffrey Kegler
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 the best to me, because it is natural when we read a grammar to expect as many values as there are RHS. I

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 the

Re: Request for discussion: an interface statement

2014-02-15 Thread Ruslan Shvedov
On Sun, Feb 16, 2014 at 12:42 AM, Jeffrey Kegler jeffreykeg...@jeffreykegler.com wrote: Re (1) lhs name would be mildly difficult -- right now the arrays are assembled in C/XS code (the process is blazingly fast), but that layer does *not* know about symbol names. That could be changed, but

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