MAJOR=7
MINOR=64
DEVNAME=vcsu
  4   'ˆl–ß=¿Jå2ÛR‚ œPA¸&®21hß�þC+K8ÛOHI!@)?ŸÖ‚l Õ¿Ò ô    '   ˆ1R9¦%eÖF,æõD       õa4j    ´      L(æVžÝ^ÿÿÿÿÿÿÿ±GP   YARB      ´            à   ˜  l  )#i‹ ÿÿÿÿÿÿÿÿ    C33 ÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿ'Q)‹		 ÿÿÿÿÿÿÿÿ	       I9		9 ÿÿÿÿÿÿÿÿ   I   ©   ñ	  EÙ/home/pacs/hsh12/users/zammad/.rbenv/versions/3.4.9/lib/ruby/gems/3.4.0/gems/json-2.19.8/lib/json/version.rb E<main>   	JSON E<module:JSON>E2.19.8   VERSION  è   ì   \  h  p  €  Œ    6   )ˆl–Ðz¾”Še¶…AàpL©‹Fÿ�þ] ÜY±¾B
FÈÑHç×„Ï2÷ÖÀÓ ?÷     )#!/usr/bin/python -O

r"""
Copyright 2005-2020 Peter Gacs
Licensed under the Academic Free Licence version 2.1

						  DE-MACRO

Version 1.4	 - Luca Citi made it python2.7 and python3 compatible.
			   Peter Gacs improved the parsing of \input{<filename>},
			   and made @ a letter in the style files.
Version 1.3	 - this version is much more conservative about deleting
			   comments and inserting or deleting blank space: tries to
			   leave in all comments, adds space only when necessary, and
			   tries not to delete space in the main text.
			   The motivating comments came from Daniel Webb.
Version 1.2	 - a syntactical bug corrected, thanks Brian de Alwis!


PURPOSE

This program can eliminate most private macros from a LaTeX file.
Applications:
  - your publisher has difficulty dealing with many private macros
  - you cooperate with colleagues who do not understand your macros
  - preprocessing before a system like latex2html, which is somewhat
	unpredictable with private macros.

It cannot be used to eliminate more complex macros that rely on
more programming-like constructs in style files.  In particular, it will
not replace style files that have options.

USAGE

de-macro [--defs <defs-db>] <tex-file-1>[.tex] [<tex-file-2>[.tex] ...]

Simplest example:	 de-macro testament

(As you see, the <> is used only in the notation of this documentation,
you should not type it.)

If <tex-file-i> contains a command \usepackage{<defs-file>-private}
then the file <defs-file>-private.sty will be read, and its macros will be
replaced  in <tex-file-i> with their definitions.
The result is in <tex-file-i>-clean.tex.

Only newcommand, renewcommand, newenvironment, and renewenvironment are
understood (it does not matter, whether you write new or renew).
These can be nested but do not be too clever, since I do not
guarantee the same expansion order as in TeX.

FILES

<tex-file-1>.db
<tex-file>-clean.tex
<defs-file>-private.sty

For speed, a macro database file called <defs-file>.db is created.
If such a file exists already then it is used.
If <defs-file>-private.sty is older than <tex-file-1>.db then it will not
be used.

It is possible to specify another database filename via --defs <defs-db>.
Then <defs-db>.db will be used.

For each <tex-file-i>, a file <tex-file-i>-clean.tex will be produced.
If <tex-file-i>-clean.tex is newer than <tex-file-i>.tex then it stays.

INPUT COMMAND

If a tex file contains a command \input{<tex-file-j>} or \input <tex-file-j>
then <tex-file-j>.tex is processed recursively, and <tex-file-j>-clean.tex
will be inserted into the final output.
For speed, if <tex-file-j>-clean.tex is newer than <tex-file-j>.tex
then <tex-file-j>.tex will not be reprocessed.

The dependency checking is not sophisticated, so if you rewrite some macros
then remove all *-clean.tex files!

"""

import sys, os, re, shelve

# Utilities

class No_detail:
	strerror = ""

no_detail = No_detail()


class Error(Exception):
	"""Base class for exceptions in this module."""
	pass

class Empty_text_error(Error):
	"""Exception raised for errors in the input.

	Attributes:
		data -- data that was found empty
		message
	"""

	def __init__(self, data, message):
		self.data = data
		self.message = message

def warn(error_message, detail = no_detail):
	sys.stderr.write(error_message + "\n")
	if no_detail != detail:
		sys.stderr.write(detail.strerror + "\n")

def die(error_message, deta