def process_item(self): clsname = self.__class__.__name__.lower() item = self.item line = item.get_line() m = self.match(line) i = line.lower().find(clsname) assert i!=-1,`clsname, line` self.prefix = line[:i].rstrip() self.name = line[i:m.end()].lstrip()[len(clsname):].strip() line = line[m.end():].lstrip() args = [] if line.startswith('('): i = line.find(')') assert i!=-1,`line` line2 = item.apply_map(line[:i+1]) for a in line2[1:-1].split(','): a=a.strip() if not a: continue args.append(a) line = line[i+1:].lstrip() suffix = item.apply_map(line) self.bind, suffix = parse_bind(suffix, item) self.result = None if isinstance(self, Function): self.result, suffix = parse_result(suffix, item) if suffix: assert self.bind is None,`self.bind` self.bind, suffix = parse_result(suffix, item) if self.result is None: self.result = self.name assert not suffix,`suffix` self.args = args self.typedecl = None return BeginStatement.process_item(self)
def process_item(self): item = self.item line = item.get_line()[2:-4].strip() assert line[0] == '(' and line[-1] == ')', ` line ` self.expr = item.apply_map(line[1:-1].strip()) self.construct_name = item.name return BeginStatement.process_item(self)
def process_item(self): line = self.item.get_line()[4:].lstrip() if line.startswith('('): self.isvalid = False return specs = [] i = line.find('::') if i != -1: for s in line[:i].split(','): s = s.strip() if s: specs.append(s) line = line[i + 2:].lstrip() self.specs = specs i = line.find('(') if i != -1: self.name = line[:i].rstrip() assert line[-1] == ')', ` line ` self.params = split_comma(line[i + 1:-1].lstrip()) else: self.name = line self.params = [] if not is_name(self.name): self.isvalid = False return return BeginStatement.process_item(self)
def process_item(self): clsname = self.__class__.__name__.lower() item = self.item line = item.get_line() m = self.match(line) i = line.lower().find(clsname) assert i != -1, ` clsname, line ` self.prefix = line[:i].rstrip() self.name = line[i:m.end()].lstrip()[len(clsname):].strip() line = line[m.end():].lstrip() args = [] if line.startswith('('): i = line.find(')') assert i != -1, ` line ` line2 = item.apply_map(line[:i + 1]) for a in line2[1:-1].split(','): a = a.strip() if not a: continue args.append(a) line = line[i + 1:].lstrip() suffix = item.apply_map(line) self.bind, suffix = parse_bind(suffix, item) self.result = None if isinstance(self, Function): self.result, suffix = parse_result(suffix, item) if suffix: assert self.bind is None, ` self.bind ` self.bind, suffix = parse_result(suffix, item) if self.result is None: self.result = self.name assert not suffix, ` suffix ` self.args = args self.typedecl = None return BeginStatement.process_item(self)
def process_item(self): item = self.item line = item.get_line()[2:-4].strip() assert line[0]=='(' and line[-1]==')',`line` self.expr = line[1:-1].strip() self.construct_name = item.name return BeginStatement.process_item(self)
def process_item(self): item = self.item line = item.get_line()[2:-4].strip() assert line[0]=='(' and line[-1]==')',`line` self.expr = line[1:-1].strip() self.name = item.label return BeginStatement.process_item(self)
def process_item(self): if self.item is not None: name = self.item.get_line().replace(' ','')\ [len(self.blocktype):].strip() if name: self.name = name return BeginStatement.process_item(self)
def process_item(self): line = self.item.get_line()[4:].lstrip() if line.startswith('('): self.isvalid = False return specs = [] i = line.find('::') if i!=-1: for s in line[:i].split(','): s = s.strip() if s: specs.append(s) line = line[i+2:].lstrip() self.specs = specs i = line.find('(') if i!=-1: self.name = line[:i].rstrip() assert line[-1]==')',`line` self.params = split_comma(line[i+1:-1].lstrip()) else: self.name = line self.params = [] if not is_name(self.name): self.isvalid = False return return BeginStatement.process_item(self)
def process_item(self): item = self.item line = item.get_line() m = self.item_re(line) self.endlabel = m.group('label').strip() self.name = item.label self.loopcontrol = m.group('loopcontrol').strip() return BeginStatement.process_item(self)
def process_item(self): line = self.item.get_line() self.isabstract = line.startswith('abstract') if self.isabstract: self.generic_spec = '' else: self.generic_spec = line[len(self.blocktype):].strip() self.name = self.generic_spec # XXX return BeginStatement.process_item(self)
def process_item(self): item = self.item line = item.get_line() m = self.item_re(line) label = m.group('label').strip() or None if label: label = int(label) self.endlabel = label self.construct_name = item.name self.loopcontrol = m.group('loopcontrol').strip() return BeginStatement.process_item(self)
def process_item(self): line = self.item.get_line()[9:].lstrip() self.associations = line[1:-1].strip() return BeginStatement.process_item(self)
def process_item(self): return BeginStatement.process_item(self)
def process_item(self): self.name = self.item.get_line()[5:].lstrip()[4:].lstrip() return BeginStatement.process_item(self)
def process_item(self): self.name = self.item.get_line().replace(' ','')\ [len(self.blocktype):].strip() return BeginStatement.process_item(self)
def process_item(self): self.specs = self.item.get_line()[6:].lstrip()[1:-1].strip() return BeginStatement.process_item(self)
def process_item(self): self.expr = self.item.get_line()[6:].lstrip()[4:].lstrip()[1:-1].strip() self.name = self.item.label return BeginStatement.process_item(self)
def process_item(self): self.expr = self.item.get_line()[5:].lstrip()[1:-1].strip() self.construct_name = self.item.name return BeginStatement.process_item(self)
def process_item(self): self.expr = self.item.apply_map(self.item.get_line()[5:].lstrip()[1:-1].strip()) # OC addition #self.expr = self.item.get_line()[5:].lstrip()[1:-1].strip() # OC deletion self.construct_name = self.item.name return BeginStatement.process_item(self)