lexical/syntactic uris

It is inherently ambiguous to define a language where lexical categories
and syntactic categories may have the same form.

For ex., if predicates, sorts, and constants may be uris, how do you
disambiguate an expression like uri1(uri2,uri3)? If you answer,
"thanks its grammatical position: it appears where a predicate,
constant, etc., is expected", then you haven't written a parser
lately... Indeed, the way to know the what *syntactic* category
is expected is using the *lexical* category of a token. So my
question is, when you read a uri off the input stream, what is
its lexical category?

If uri is a *lexical* category (like 'variable' starting with a ?,
or 'number' being made of numerical digits), do you return "URI"
or "CONSTANT", or "SORT", what? (This is the lexical level, remember!).

-hak
-- 
Hassan Aït-Kaci
ILOG, Inc. - Product Division R&D
tel/fax: +1 (604) 930-5603 - email: hak @ ilog . com
http://koala.ilog.fr/wiki/bin/view/Main/HassanAitKaci

Received on Tuesday, 20 March 2007 16:33:42 UTC