[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: about counting the times of 'recursion'
From: |
Hans Aberg |
Subject: |
Re: about counting the times of 'recursion' |
Date: |
Sun, 7 Jun 2009 18:36:49 +0200 |
On 7 Jun 2009, at 14:31, Max cs wrote:
I am writing a parser to support 'parallel assignment i.e. in syntax
a,b,c =
1,2,3; ...
You might do it in the actions, that is, parse LHS and RHS as two
lists, and then assign these two lists. Grammar:
assign: LHS "=" RHS;
LHS: LHS_sequence | ... ;
RHS: RHS_sequence | ... ;
LHS_sequence: LHS_item | LHS_sequence "," LHS_item;
...
Hans