# _all: test all of the language features of ShEx
# This is intended to cover much of the ShEx language. If you are
# fiddling with a parser and want to run one test over and over, this
# test will likely catch any errors.
# omitted: unlabled semantic action, lexical constructs like bnode_with_leading_underscore
# todo: prohibit inclusion cycles, escaped strings in LONGn, escaped CODE
PREFIX prefix1:
%prefix1:act1{ START1 %}
%prefix1:act2{ START2 %}
EXTRA {
$ (
.;
.;
.)
}
prefix1:S2 EXTRA prefix1:p1 prefix1:p2 prefix1:p3 {
$prefix1:S2e (
prefix1:p1- .;
prefix1:p2 .;
prefix1:p3 .)
}
PREFIX a:
PREFIX prefix:
PREFIX base:
PREFIX PREFIX:
PREFIX BaSe:
PREFIX virtual:
PREFIX closed:
PREFIX extra:
PREFIX iri:
PREFIX bnode:
PREFIX literal:
PREFIX nonliteral:
PREFIX or:
prefix pattern:
PREfIX prefix1:
stArt = @prefix1:3
PREFIX prefix1:
PREFIX S5:
PREFIX xsd:
PREFIX :
:IRI IRI
:vs1 [ prefix:~ - prefix:a~ - prefix:b] AND :IRI
#VIRTUAL
prefix1:S3 EXTRA a:a prefix:prefix base:base # &a:S1
{
&a:S1e;
a:a .;
prefix:prefix prefix:dt LENGTH 2?;
( base:base IRI*;
PREFIX:PREFIX IRI /^http:\/\// LENGTH 5 +;
BaSe:BaSe @prefix1:S5{2};
| virtual:virtual NONLITERAL @ prefix1:S5{2,};
| closed:closed BNODE @S5: OR MINLENGTH 2 MAXLENGTH 4 @ {2,*};
| ( ^extra:extra { prefix1:p1 [
"STRING_LITERAL2" "STRING_LITERAL2"@en-UK : prefix1:val1#comment
prefix1:#comment
0.0 0e0 0E0 false 0 "ab"^^ "o+"^^prefix1:bloodType
' !"#$%&():;<=>?@[]^_`{|}~'
' &([]' # Eliding \u0000 because it confuses UTF-8 detectors.
'߿ࠀက쿿퀀�𐀀'
"\"\\"
"𝟘𝟙𝟚𝟛𝟜𝟝𝟞𝟟𝟠𝟡" # outside of BMP
"""STRING_LITERAL_LONG2"""@en-UK
] }{2,3} %prefix1:act1{ code1 %};
iri:iri LITERAL+ //
//
"STRING_LITERAL2" //
3 %prefix1:act1{ \%{printf("品川\\n")\u003b\%} %};
| ^bnode:bnode .+ %prefix1:act1{ code1 %};
^literal:literal .+ %prefix1:act1{ code1 %}
);
nonliteral:nonliteral xsd:integer MININCLUSIVE 5 MAXINCLUSIVE 5 TOTALDIGITS 1 FRACTIONDIGITS 1
);
or:or @:vs1;
pattern:pattern [. - prefix:a~ - prefix:b] %prefix1:act1{ code1 %} %prefix1:act2{ code2 %};
}
prefix1:S5 IRI
_:a·̀ͯ‿.⁀ CLOSED # &_:a·̀ͯ‿.⁀ &
{
$_:a·̀ͯ‿.⁀e (
&a:S1e;
& )
}
_:AZazÀÖØöø˿ͰͽͿ⁰Ⰰ、豈﷏ﷰ�𐀀 {
&_:a·̀ͯ‿.⁀e
}