[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: can't to remove shift/reduce
From: |
Pavel Stehule |
Subject: |
Re: can't to remove shift/reduce |
Date: |
Fri, 23 Nov 2007 11:57:03 +0100 |
On 23/11/2007, Evan Lavelle <address@hidden> wrote:
> If you want help with a grammar, you need to do one of two things:
>
> - post a grammar that fails. Put '%%' around it, make sure that there
> are no undefined rules, cut out all actions, and run Bison on it. Don't
> post everything: if 'expr' isn't relevant, add "expr : 'A' ;", for
> example, or
>
> - Show some rules, and give some input that fails those rules.
>
> You haven't done either of these.
>
I am sorry. This gramatic is too big and too complex for this. It's
modified PostgreSQL gram.y. I put it on
http://www.pgsql.cz/data/gram.y
http://www.pgsql.cz/data/gram.output.gz
Problem is in state 1164:
column_method:
column_method_name
{
$$ = (Node *) makeString("*");
}
| column_method_name '(' ')'
{
$$ = (Node *) makeString("*");
}
| column_method_name '(' expr_list ')'
{
$$ = (Node *) makeString("*");
}
;
when I remove:
column_method_name
{
$$ = (Node *) makeString("*");
}
then grammar is correct, but too strict
because I am not able specify any column identifier.
These changes should to add methods invocation to PostgreSQL
relation.column ... atribute
relation.column.method() .. method without parameters
relation.column.method(some arguments) .. method with parameters
variable.column .. atribute
variable.method(..) is possible
variable.column.method(..) is possible
variable.method().method().column.method() is possible too
what is column, what is relation or else isn't solved on bison level
because thera are other postgresql dependencies.
>
> I'd be surprised if it works. Have you tried column_method_name both
> with and without brackets? The default is to ignore the brackets - what
> happens then? How are the brackets interpreted?
>
without brackets it is relation or variable atribute. With brackets it
is methods.
Regards
Pavel Stehule
> You need to post everything that can come after 'column_method'. Is it
> ever possible to have a '(' character after a column_method, apart from
> the 2 ways you have shown?
>
> Evan
>