> The web site should be aimed at beginners, with clear indications as 
> to where experts can go for more details. 

Agreed. So far I've been focusing on design, I haven't added much 
content. 

> Marpa: The foundation of modern, grammar-based, parsers 

Thanks, I've been looking for another tagline. I don't really like the 
way that that is phrased though, perhaps something like "Marpa: A 
modern parser" would sound better. 

>   - Add a sub-heading, perhaps at h2 level. 

I'd like to keep as much as possible above the fold on all sorts of 
devices, so more explaining than necessary does have a significant 
downside. 

>   - Add: use strict; use warnings; 

I'll do this, although it does push the whitespace tokenization below 
the fold on some mobile devices. 

>   - EOG => END_OF_GRAMMAR makes it much clearer. 
> 
> The abbreviation is simply unnecessary. Let others do that. Provide 
> clean, firm, guidelines for attaining quality. 
> 
> Likewise for 'Expr', etc. 

Same argument as before: This causes wrapping on some mobile devices, 
which would push content below the fold. 


>   - || Expr '*' Expr action => do_multiply # Note 1, 2. 
> 
> Add notes. Here we could say: 
> 
> Note 1: The '||' indicates alternative ways of constructing an 
> expression. 

Done. 

> Note 2: do_multiply is a function Marpa will call automatically when 
> this alternative of the 'Expr' rule fires. 

This seems adequately self-explanatory as-is, but I should find 
someone who has no idea what this is all about and see if they 
understand. 

>   - my $value_ref = $grammar->parse( \'7 + 42 * 1', 'Calc' ); # 
>   Notes 3, 4. 
> 
> Note 3: Marpa uses a reference here in order to avoid copying what 
> could potentially be a huge string. 

This isn't particularly important to usage of the library - Perl is 
going to be the bottleneck no matter what. I the interest of staying 
concise, I'll omit this 

> Note 4: A great deal of error checking is built-in to Marpa. Here, 
> if there is no parse, or if the parse is ambiguous, parse() throws 
> an exception. Hence Try::Tiny. 

I'm not too familiar with Perl, but Marpa's regular error handling I 
think is adequate for an example. It prints to the terminal, and 
that's what most people want. 

>   - printf("$$value_ref\n") => print "$$value_ref\n"; 
> 
> Add ';'. Simplify. 

My lack of familiarity with Perl shows :). Fixed. 

> And move this (and => 49) above the subs. 

Done. 

> 3) The footers Fast, Expressive, Flexible 
> 
> They are good. 

Thanks! 

> Add something about accepting utf8 in the grammar and in the input 
> stream. 

I'd like to avoid explaining with words, so I've changed the 
multiplication sign to Unicode `×` instead. 

On Monday, December 22, 2014 12:44:29 AM UTC-5, Ron Savage wrote:
>
> Overall, I think Marpa should be presented as mature, modern, and 
> immensely powerful.
>
> The web site should be aimed at beginners, with clear indications as to 
> where experts
> can go for more details.
>
> Any examples should be complete, use modern Perl constructs, and have 
> error checking.
> I'm not advocating Modern::Perl, just high quality.
>
> Having an example on the front page surprised me at first, but it's grown 
> on me. I
> would like to see a few notes - for beginners - pointing out some perhaps 
> unexpected
> constructs. See below.
>
> Now, the new web site.
>
> 1) The page title and heading
>
> Marpa: The foundation of modern, grammar-based, parsers
>
> o It has 'Marpa' in the title and heading. Think Google-type searching.
>
> o Since 'foundation stone' is almost a tautology, I chose not to use 
> 'stone'.
>
> o 'Foundation' indicates where we think Mapra belongs in any suite of 
> parsing code.
>
> o 'The foundation' is bold and actually quite a strong statement. It 
> suggests superiority in that
> other parsers don't measure up as candidates for a foundation.
>
> o 'Modern' indicates - but does not prove - that Marpa is new and 
> different.
>
> o 'Grammar-based' makes clear the claim is not to literally parse 
> everything, but to parse
> the vast array of stuff for which a grammar can be devised.
>
> 2) The example
>
> o Add a sub-heading, perhaps at h2 level.
>
> Try: Here's a complete parser for simple arithmetic expressions.
>
> o Add:
> use strict;
> use warnings;
>
> Never encourage beginners to write tacky code. Let other people drop such 
> protections, but don't let
> them see us doing it.
>
> o Add Try::Tiny or something. See below.
>
> o EOG => END_OF_GRAMMAR makes it much clearer.
>
> The abbreviation is simply unnecessary. Let others do that. Provide clean, 
> firm, guidelines for
> attaining quality.
>
> Likewise for 'Expr', etc.
>
> o || Expr '*' Expr action => do_multiply # Note 1, 2.
>
> Add notes. Here we could say:
>
> Note 1: The '||' indicates alternative ways of constructing an expression.
>
> Note 2: do_multiply is a function Marpa will call automatically when this 
> alternative of the 'Expr'
> rule fires.
>
> o my $value_ref = $grammar->parse( \'7 + 42 * 1', 'Calc' ); # Notes 3, 4.
>
> Note 3: Marpa uses a reference here in order to avoid copying what could 
> potentially
> be a huge string.
>
> Note 4: A great deal of error checking is built-in to Marpa. Here, if 
> there is no parse,
> or if the parse is ambiguous, parse() throws an exception. Hence Try::Tiny.
>
> o printf("$$value_ref\n") => print "$$value_ref\n";
>
> Add ';'. Simplify.
>
> And move this (and => 49) above the subs.
>
> 3) The footers Fast, Expressive, Flexible
>
> They are good.
>
> Add something about accepting utf8 in the grammar and in the input stream.
>
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to