Exemplo n.º 1
0
	def skip_until (self, expr):
		regexp = re.compile(expr)
		while Parser.read_line(self):
			match = regexp.match(self.line)
			if match is None:
				continue
			self.line = self.line[match.end():]
			self.pos_char += match.end()
			return
Exemplo n.º 2
0
	def skip_until (self, expr):
		regexp = re.compile(expr)
		while Parser.read_line(self):
			match = regexp.match(self.line)
			if match is None:
				continue
			self.line = self.line[match.end():]
			self.pos_char += match.end()
			return
Exemplo n.º 3
0
	def read_line (self):
		while Parser.read_line(self):
			match = re_command.match(self.line.strip())
			if match is None:
				return True

			vars = dict(self.latex_dep.vars.items())
			vars['line'] = self.pos_line
			args = parse_line(match.group("arg"), vars)

			self.latex_dep.command(match.group("cmd"), args, vars)
		return False
Exemplo n.º 4
0
	def read_line (self):
		while Parser.read_line(self):
			match = re_command.match(self.line.strip())
			if match is None:
				return True

			vars = dict(self.latex_dep.vars.items())
			vars['line'] = self.pos_line
			args = parse_line(match.group("arg"), vars)

			self.latex_dep.command(match.group("cmd"), args, vars)
		return False
Exemplo n.º 5
0
	def __init__ (self, file, dep):
		Parser.__init__(self, file)
		self.latex_dep = dep
Exemplo n.º 6
0
	def __init__ (self, file, dep):
		Parser.__init__(self, file)
		self.latex_dep = dep