yacc guru needed
От | Michael Meskes |
---|---|
Тема | yacc guru needed |
Дата | |
Msg-id | 20001004171608.A3320@feivel.credativ.de обсуждение исходный текст |
Ответы |
Re: yacc guru needed
|
Список | pgsql-hackers |
I would like to allow variables in ECPG at all positions the backend allows constants. But I wonder how to get this done in the parser. 1) I need to allow :variable:indicator in AexprConst since this is the only position where NULL is a possible constant. 2) :variable should be allowed whereever Iconst, FCONST and Sconst are used. This would finally allow us to use something like "exec sql move :number ...". Anyway, the problem is that some rules expand to either Iconst, FCONST or Sconst. So do I have to change all these rules? Just changing the rule for Iconst and Sconst e.g doesn't work since AexprConst expands to the variable in two different ways. And bison certainly does not like that. But just adding a combined Const rule won't do either, since there are also rules just asking for a special constant like in the aformentioned MOVE command. Finally bison cannot distinguish between character and numerical variables. I can implement such a check but is it a good idea? How about I want to store my numerical passwords in an int since it's calculated? etc. Any ideas anyone? Michael -- Michael Meskes Michael@Fam-Meskes.De Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
В списке pgsql-hackers по дате отправления: