Hi Slava,

What does the warning 'Literal value expected' signify? I get a bunch of
these warnings in my code and I'm not sure how to remove them.
e.g.

( scratchpad ) USE: bstore.query.clauses
Loading P" bstore/query/clauses/clauses.factor"
:warnings - print 1 semantic warnings.

( scratchpad ) :warnings
While compiling elts-match?:

Word: elts-match?
Literal value expected
"delegate" f
Nesting: { elts-match? }


I've pasted the vocab causing this below for reference; all the words
and predicates infer ok. Is the warning because of macros or inlines
that I'm importing or is there something I should be doing differently?

Many thanks,

Phil





IN: bstore.query.clauses

USING: arrays kernel sequences strings math combinators.lib
combinators.short-circuit ;


: variable? ( str -- ? ) [ string? ] [ first CHAR: ? = ] bi and ;

: literalstr? ( str -- ? )
   { [ "_" = not ] [ "substr" = not ] [ string? ] [ variable? not ] } 1&& ;

: literal? ( str -- ? )
   { [ integer? ] [ literalstr? ] } 1|| ;

: elts-match? ( seq quotseq -- ? ) parallel-call [ ] all? ; inline

PREDICATE: s>po-clause < array
     { [ fixnum? ] [ variable? ] [ variable? ] } elts-match? ;
PREDICATE: substr-clause < array
     { [ variable? ] [ "substr" = ] [ literal? ] } elts-match? ;
PREDICATE: o>s-clause < array
     { [ variable? ] [ "_" = ] [ literal? ] } elts-match? ;
PREDICATE: po>s-clause < array
     { [ variable? ] [ literal? ] [ literal? ] } elts-match? ;
PREDICATE: _>so-clause < array
     { [ variable? ] [ "_" = ] [ variable? ] } elts-match? ;
PREDICATE: p>so-clause < array
     { [ variable? ] [ literal? ] [ variable? ] } elts-match? ;
PREDICATE: spo-clause < array
     { [ variable? ] [ variable? ] [ variable? ] } elts-match? ;




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to