Example #1
0
def p_IRICONST_1(t):
   '''IRICONST       : ANGLEBRACKIRI
                     | EXPANDED_CURIE'''
   #t[0] = node('Const', datatype=RIF_IRI, lexrep=t[1])
   t[0] = AST2.obtainDataValue(datatype=RIFNS+"iri", lexrep=t[1])
Example #2
0
def p_IRICONST_2(t):
   '''IRICONST       : STRING_HAT_HAT SYMSPACE'''
   #t[0] = node('Const', datatype=iri(t[2]), lexrep=t[1])
   t[0] = AST2.obtainDataValue(datatype=t[2], lexrep=t[1])
Example #3
0
def p_CONSTSHORT_5(t):
   '''CONSTSHORT    : LOCALNAME'''
   # t[0] = node('Const', datatype=iri(RIFNS+"local"), lexrep=t[1])
   t[0] = AST2.obtainDataValue(datatype=RIFNS+"local", lexrep=t[1])
Example #4
0
def p_CONSTSHORT_3(t):
   '''CONSTSHORT    : DECIMAL'''
   #t[0] = node('Const', datatype=iri(XSDNS+"decimal"), lexrep=t[1])
   t[0] = AST2.obtainDataValue(datatype=XSDNS+"decimal", lexrep=t[1])
Example #5
0
def p_CONSTSHORT_2(t):
   '''CONSTSHORT    : INTEGER'''
   #t[0] = node('Const', datatype=iri(XSDNS+"integer"), lexrep=t[1])
   t[0] = AST2.obtainDataValue(datatype=XSDNS+"integer", lexrep=t[1])
Example #6
0
def p_CONSTSHORT_1(t):
   '''CONSTSHORT    : STRING'''
   #t[0] = node('Const', datatype=iri(XSDNS+"string"), lexrep=t[1])
   t[0] = AST2.obtainDataValue(datatype=XSDNS+"string", lexrep=t[1])
Example #7
0
def p_Const_2(t):
   '''Const          : STRING_HAT_HAT SYMSPACE '''
   #t[0] = node('Const', lexrep=t[1], datatype=iri(t[2]))
   t[0] = AST2.obtainDataValue(lexrep=t[1], datatype=t[2])