[Versa] Problem with splitting the grammar
Uche Ogbuji
uche.ogbuji at fourthought.com
Tue Sep 27 15:13:41 MDT 2005
On Tue, 2005-09-27 at 14:07 -0600, Michael Olson wrote:
> If we split the grammar, then the production (in bind) for a function
> definition must be something like
>
> @function function_name = ([^;])+ ';'
>
> Basically, the bind parser does not know the grammar of the function,
> so it just gives it everything.
>
> This causes a problem back in versa land for a query that looks like
>
> @prefix ft = foo
> @function myFunc () = ft:s - ft:p -> ft:o;
> @prefix ft = bar;
> myFunc()
>
>
> Because "myFunc" would not be parsed until after the complete bind
> expression is parsed.
>
> Is this bad?
>
> We could just disallow redefining, probably the best.
I'm not sure I follow, but if I do, this is a semantic issue, not a
grammar issue. In the above specific case, line 3 would pretty much be
a no-op. An implementation would implement the semantics of the
function using the prefixes in scope at the time, which are foo. That
function would always have those constant URIs using the foo prefix,
regardless of the next line.
I don't really see a problem.
--
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.net http://fourthought.com
http://copia.ogbuji.net http://4Suite.org
Articles: http://uche.ogbuji.net/tech/publications/
More information about the Versa
mailing list