IT LIVES!
OK, so there are 23 reduce/reduce errors in the grammar (only two productions colliding, but it complains 23 times), but IT WORKS! — at least, it works for this case!Now to attach some actual actions to the parser rules… this doesn't show the actual recognition, printing out only the values themselves and not the terminals.* (parse-with-lexer (sparql-lexer (pre-lex
"PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT * WHERE {
?x foaf:knows ?y ;
foaf:name 'Richard' . # Comment.
FILTER isUri(?x)}"))
*sparql-rq23*)
((NIL (("PREFIX" "foaf:"
"http://xmlns.com/foaf/0.1/") NIL))
("SELECT" NIL "*" NIL
("WHERE"
("{"
(((("?" "x")
("foaf:knows" (("?" "y") NIL)
(";" ("foaf:name" ("Richard" NIL) NIL))))
".")
("FILTER" ("isUri" "("
((((("?" "x") NIL) NIL) NIL) NIL) ")")) NIL
(NIL "}"))))
NIL NIL NIL))
Posted at 2005-06-22 03:49:45 by Richard • Link to IT LIVES!
Comments, trackbacks.
