Hello,
Could you tell me what the 'p' in 'sclp' in 'parse.y' stands for? I am
trying to make a modification to the grammar file.
Also the rule for sclp uses selcollist and the rule for selcollist
uses sclp in some kind of mutual recursion. Is this a lemon feature or
normal with LALR grammars.
Thank You,
HG
[snipped parse.y beginning]
%type sclp {ExprList*}
%destructor sclp {sqlite3ExprListDelete($$);}
sclp(A) ::= selcollist(X) COMMA. {A = X;}
sclp(A) ::= .{A = 0;}
selcollist(A) ::= sclp(P) expr(X) as(Y). {
A = sqlite3ExprListAppend(pParse,P,X,Y.n?&Y:0);
}
selcollist(A) ::= sclp(P) STAR. {
Expr *p = sqlite3PExpr(pParse, TK_ALL, 0, 0, 0);
A = sqlite3ExprListAppend(pParse, P, p, 0);
}
selcollist(A) ::= sclp(P) nm(X) DOT STAR. {
Expr *pRight = sqlite3PExpr(pParse, TK_ALL, 0, 0, 0);
Expr *pLeft = sqlite3PExpr(pParse, TK_ID, 0, 0, &X);
Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0);
A = sqlite3ExprListAppend(pParse,P, pDot, 0);
}
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users