예제 #1
0
파일: parser.py 프로젝트: jayconrod/gypsum
 def symbol(self):
     sym = self._nextTag(SYMBOL).text
     if sym.startswith("`"):
         sym = tryDecodeString(sym)
         if sym is None:
             raise ParseException(self.location, "invalid symbol")
     return sym
예제 #2
0
파일: parser.py 프로젝트: moneytech/gypsum
 def symbol(self):
     sym = self._nextTag(SYMBOL).text
     if sym.startswith("`"):
         sym = tryDecodeString(sym)
         if sym is None:
             raise ParseException(self.location, "invalid symbol")
     return sym
예제 #3
0
파일: parser.py 프로젝트: moneytech/gypsum
 def stringLiteral(self):
     tok = self._nextTag(STRING)
     value = tryDecodeString(tok.text)
     if value is None:
         raise ParseException(tok.location,
                              "could not understand string: %s" % tok.text)
     return ast.StringLiteral(value, tok.location)
예제 #4
0
파일: parser.py 프로젝트: jayconrod/gypsum
 def stringLiteral(self):
     tok = self._nextTag(STRING)
     value = tryDecodeString(tok.text)
     if value is None:
         raise ParseException(tok.location, "could not understand string: %s" % tok.text)
     return ast.StringLiteral(value, tok.location)
예제 #5
0
파일: parser.py 프로젝트: zpzgone/gypsum
 def process(text, loc):
     value = tryDecodeString(text)
     if value is None:
         return ct.FailValue("invalid string")
     return ast.AstStringLiteral(value, loc)
예제 #6
0
파일: parser.py 프로젝트: AllenWeb/gypsum
def processSymbol(sym, loc):
    if sym.startswith("`"):
        sym = tryDecodeString(sym)
        if sym is None:
            return ct.FailValue("invalid symbol")
    return sym