From 2eca440c8dff47f1de8efb166f1db9c76b54eadd Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Tue, 29 Aug 2006 04:40:24 +0000 Subject: Get rid of some more cases of backquotes. parsermodule.c doesn't compile but looks like that was a problem before this change. --- Doc/lib/asttable.tex | 3 --- Include/token.h | 2 +- Lib/compiler/transformer.py | 4 ---- Lib/pydoc.py | 5 ++--- Lib/token.py | 1 - Modules/parsermodule.c | 5 ----- 6 files changed, 3 insertions(+), 17 deletions(-) diff --git a/Doc/lib/asttable.tex b/Doc/lib/asttable.tex index abba0da..326bbbb 100644 --- a/Doc/lib/asttable.tex +++ b/Doc/lib/asttable.tex @@ -36,9 +36,6 @@ \lineiii{}{\member{expr}}{} \hline -\lineiii{Backquote}{\member{expr}}{} -\hline - \lineiii{Bitand}{\member{nodes}}{} \hline diff --git a/Include/token.h b/Include/token.h index 4250000..5aedb69 100644 --- a/Include/token.h +++ b/Include/token.h @@ -32,7 +32,7 @@ extern "C" { #define EQUAL 22 #define DOT 23 #define PERCENT 24 -#define BACKQUOTE 25 +/* #define BACKQUOTE 25 */ #define LBRACE 26 #define RBRACE 27 #define EQEQUAL 28 diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py index db571db..a9b971a 100644 --- a/Lib/compiler/transformer.py +++ b/Lib/compiler/transformer.py @@ -111,7 +111,6 @@ class Transformer: self._atom_dispatch = {token.LPAR: self.atom_lpar, token.LSQB: self.atom_lsqb, token.LBRACE: self.atom_lbrace, - token.BACKQUOTE: self.atom_backquote, token.NUMBER: self.atom_number, token.STRING: self.atom_string, token.NAME: self.atom_name, @@ -740,9 +739,6 @@ class Transformer: return Dict((), lineno=nodelist[0][2]) return self.com_dictsetmaker(nodelist[1]) - def atom_backquote(self, nodelist): - return Backquote(self.com_node(nodelist[1])) - def atom_number(self, nodelist): ### need to verify this matches compile.c k = eval(nodelist[0][1]) diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 29c6cc4..3459fbe 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -1564,7 +1564,7 @@ class Helper: 'CLASSES': ('ref/types', 'class SPECIALMETHODS PRIVATENAMES'), 'MODULES': ('lib/typesmodules', 'import'), 'PACKAGES': 'import', - 'EXPRESSIONS': ('ref/summary', 'lambda or and not in is BOOLEAN COMPARISON BITWISE SHIFTING BINARY FORMATTING POWER UNARY ATTRIBUTES SUBSCRIPTS SLICINGS CALLS TUPLES LISTS DICTIONARIES BACKQUOTES'), + 'EXPRESSIONS': ('ref/summary', 'lambda or and not in is BOOLEAN COMPARISON BITWISE SHIFTING BINARY FORMATTING POWER UNARY ATTRIBUTES SUBSCRIPTS SLICINGS CALLS TUPLES LISTS DICTIONARIES'), 'OPERATORS': 'EXPRESSIONS', 'PRECEDENCE': 'EXPRESSIONS', 'OBJECTS': ('ref/objects', 'TYPES'), @@ -1587,14 +1587,13 @@ class Helper: 'IDENTIFIERS': ('ref/identifiers', 'keywords SPECIALIDENTIFIERS'), 'SPECIALIDENTIFIERS': ('ref/id-classes', ''), 'PRIVATENAMES': ('ref/atom-identifiers', ''), - 'LITERALS': ('ref/atom-literals', 'STRINGS BACKQUOTES NUMBERS TUPLELITERALS LISTLITERALS DICTIONARYLITERALS'), + 'LITERALS': ('ref/atom-literals', 'STRINGS NUMBERS TUPLELITERALS LISTLITERALS DICTIONARYLITERALS'), 'TUPLES': 'SEQUENCES', 'TUPLELITERALS': ('ref/exprlists', 'TUPLES LITERALS'), 'LISTS': ('lib/typesseq-mutable', 'LISTLITERALS'), 'LISTLITERALS': ('ref/lists', 'LISTS LITERALS'), 'DICTIONARIES': ('lib/typesmapping', 'DICTIONARYLITERALS'), 'DICTIONARYLITERALS': ('ref/dict', 'DICTIONARIES LITERALS'), - 'BACKQUOTES': ('ref/string-conversions', 'repr str STRINGS LITERALS'), 'ATTRIBUTES': ('ref/attribute-references', 'getattr hasattr setattr ATTRIBUTEMETHODS'), 'SUBSCRIPTS': ('ref/subscriptions', 'SEQUENCEMETHODS1'), 'SLICINGS': ('ref/slicings', 'SEQUENCEMETHODS2'), diff --git a/Lib/token.py b/Lib/token.py index c4db6c5..5f8d53a 100755 --- a/Lib/token.py +++ b/Lib/token.py @@ -35,7 +35,6 @@ GREATER = 21 EQUAL = 22 DOT = 23 PERCENT = 24 -BACKQUOTE = 25 LBRACE = 26 RBRACE = 27 EQEQUAL = 28 diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c index e33197e..3b94ca5 100644 --- a/Modules/parsermodule.c +++ b/Modules/parsermodule.c @@ -2404,11 +2404,6 @@ validate_atom(node *tree) if (res && (nch == 3)) res = validate_dictmaker(CHILD(tree, 1)); break; - case BACKQUOTE: - res = ((nch == 3) - && validate_testlist1(CHILD(tree, 1)) - && validate_ntype(CHILD(tree, 2), BACKQUOTE)); - break; case NAME: case NUMBER: res = (nch == 1); -- cgit v0.12