Aldo Calpini wrote:
>
> I'm preparing a talk about Perl6 for the Italian Perl Workshop, and I
> would like to have a slide comparing a BNF (yacc/bison) grammar to a
> Perl6 one, to show how powerful in parsing/lexing
> Perl6 regexen are.
>
> so I ask your assistance in helping me putting up a s
On Tue, 8 Jun 2004, Matthew Walton wrote:
> Ingo Blechschmidt wrote:
>
> > One should be able to unwrap $subref using
> > $id.unwrap();
>
> Something tells me that you shouldn't be able to do that. Wrapping is an
> operation on the subref, which implies very strongly to me that
> unwrapping s
Luke Palmer wrote:
> That left recursion won't do. I can't remember my transformation rules
> well enough to know how to put that in a form suitable for a recursive
> descent parser. To be honest, I've never seen an RPN calculator modeled
> with a grammar.
Well, the main advantage of an RPM synt
Rafael Garcia-Suarez writes:
> Luke Palmer wrote:
> > Also, if this is going to be an explanation rather than just a picture,
> > I suggest you go with Perl's usual versatile power, and store the
> > operators in a declarative data source.
> >
> > grammar RPN {
> > my @operator = << +
[EMAIL PROTECTED] (Rafael Garcia-Suarez) writes:
> Sean O'Rourke wrote:
>> * To really show where P6 rocks, you need to show dynamic features. A
>> simple example might be using a language with keywords kept in
>> variables, allowing you change between e.g. "for, while, if", "pour,
>> tandi
Sean O'Rourke wrote:
> * To really show where P6 rocks, you need to show dynamic features. A
> simple example might be using a language with keywords kept in
> variables, allowing you change between e.g. "for, while, if", "pour,
> tandis-que, si", etc.
Small correction : "pour, tant_que, si
Luke Palmer wrote:
> Also, if this is going to be an explanation rather than just a picture,
> I suggest you go with Perl's usual versatile power, and store the
> operators in a declarative data source.
>
> grammar RPN {
> my @operator = << + - * / >>;
>
> rule input { * }
>
[EMAIL PROTECTED] (Aldo Calpini) writes:
> I'm preparing a talk about Perl6 for the Italian Perl Workshop, and I
> would like to have a slide comparing a BNF (yacc/bison) grammar to a
> Perl6 one, to show how powerful in parsing/lexing Perl6 regexen are.
> ...
> am I missing something obvious here?
Aldo Calpini writes:
> I've taken this bison example (an RPN calculator, stripped down version
> from http://www.gnu.org/software/bison/manual/html_node/Rpcalc-Rules.html):
>
> input:/* empty */
> | input line
> ;
>
> line: '\n'
> | exp '\n'
> ;
>
> exp: NUM
hello gentlemen,
I'm preparing a talk about Perl6 for the Italian Perl Workshop, and I
would like to have a slide comparing a BNF (yacc/bison) grammar to a
Perl6 one, to show how powerful in parsing/lexing Perl6 regexen are.
so I ask your assistance in helping me putting up a simple, yet
impres
10 matches
Mail list logo