예제 #1
0
def component(code='ascr', out=sys.stdout, converter=None):
    """Render raw terminology for scripting component.
		code : str -- four-letter code indication component's subtype (default: AppleScript)
		out : file -- open file object to write to (default: stdout)
		converter : function -- function to convert AppleScript-style keywords (default: None)
	"""
    data = getaeut(code)
    parse(data, QuickDoc(out, converter))
예제 #2
0
def component(code="ascr", out=sys.stdout, converter=None):
    """Render raw terminology for scripting component.
		code : str -- four-letter code indication component's subtype (default: AppleScript)
		out : file -- open file object to write to (default: stdout)
		converter : function -- function to convert AppleScript-style keywords (default: None)
	"""
    data = getaeut(code)
    parse(data, QuickDoc(out, converter))
예제 #3
0
		self._isplural  = True
	
	def end_class(self):
		if not self._isplural:
			self._typesbycode[self._code] = self._name
			self._typesbyname[self._name] = self._code
	
	def start_enumeration(self, code):
		self._enumerationsbycode[code] = self._enumeration = []
	
	def add_enumerator(self, code, name, description):
		self._enumeration.append((name, code))
	
	def result(self):
		# add some definitions not in AS dictionary
		self._typesbycode['furl'] = 'file'
		self._typesbyname['file'] = 'furl'
		return self._typesbycode, self._enumerationsbycode, self._typesbyname

##

p = AeutTypesParser()
aeteparser.parse(getaeut('ascr'), p)

######################################################################
# PUBLIC
######################################################################

typebycode, enumerationbycode, typebyname = p.result()

예제 #4
0
def parselang(code='ascr', style='appscript'):
	return parseaetes(getaeut(code), '', style)
예제 #5
0
def parselang(code='ascr', style='appscript'):
    return parseaetes(getaeut(code), '', style)