Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions tool/src/org/antlr/v4/codegen/target/Python2Target.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,28 @@
*/
public class Python2Target extends Target {
protected static final String[] python2Keywords = {
"abs", "all", "any", "apply", "as",
"bin", "bool", "buffer", "bytearray",
"callable", "chr", "classmethod", "coerce", "compile", "complex",
"del", "delattr", "dict", "dir", "divmod",
"enumerate", "eval", "execfile",
"file", "filter", "float", "format", "frozenset",
"getattr", "globals",
"abs", "all", "and", "any", "apply", "as", "assert",
"bin", "bool", "break", "buffer", "bytearray",
"callable", "chr", "class", "classmethod", "coerce", "compile", "complex", "continue",
"def", "del", "delattr", "dict", "dir", "divmod",
"elif", "else", "enumerate", "eval", "except", "exec", "execfile",
"file", "filter", "finally", "float", "for", "format", "from", "frozenset",
"getattr", "global", "globals",
"hasattr", "hash", "help", "hex",
"id", "input", "int", "intern", "isinstance", "issubclass", "iter",
"len", "list", "locals",
"map", "max", "min", "next",
"id", "if", "import", "in", "input", "int", "intern", "is", "isinstance", "issubclass", "iter",
"lambda", "len", "list", "locals",
"map", "max", "min", "next", "not",
"memoryview",
"object", "oct", "open", "ord",
"pow", "print", "property",
"range", "raw_input", "reduce", "reload", "repr", "return", "reversed", "round",
"object", "oct", "open", "or", "ord",
"pass", "pow", "print", "property",
"raise", "range", "raw_input", "reduce", "reload", "repr", "return", "reversed", "round",
"set", "setattr", "slice", "sorted", "staticmethod", "str", "sum", "super",
"tuple", "type",
"try", "tuple", "type",
"unichr", "unicode",
"vars",
"with",
"while", "with",
"xrange",
"yield",
"zip",
"__import__",
"True", "False", "None"
Expand Down
33 changes: 17 additions & 16 deletions tool/src/org/antlr/v4/codegen/target/Python3Target.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,27 @@
*/
public class Python3Target extends Target {
protected static final String[] python3Keywords = {
"abs", "all", "any", "apply", "as",
"bin", "bool", "buffer", "bytearray",
"callable", "chr", "classmethod", "coerce", "compile", "complex",
"del", "delattr", "dict", "dir", "divmod",
"enumerate", "eval", "execfile",
"file", "filter", "float", "format", "frozenset",
"getattr", "globals",
"abs", "all", "and", "any", "apply", "as", "assert",
"bin", "bool", "break", "buffer", "bytearray",
"callable", "chr", "class", "classmethod", "coerce", "compile", "complex", "continue",
"def", "del", "delattr", "dict", "dir", "divmod",
"elif", "else", "enumerate", "eval", "execfile", "except",
"file", "filter", "finally", "float", "for", "format", "from", "frozenset",
"getattr", "global", "globals",
"hasattr", "hash", "help", "hex",
"id", "input", "int", "intern", "isinstance", "issubclass", "iter",
"len", "list", "locals",
"map", "max", "min", "next",
"memoryview",
"object", "oct", "open", "ord",
"pow", "print", "property",
"range", "raw_input", "reduce", "reload", "repr", "return", "reversed", "round",
"id", "if", "import", "in", "input", "int", "intern", "is", "isinstance", "issubclass", "iter",
"lambda", "len", "list", "locals",
"map", "max", "min", "memoryview",
"next", "nonlocal", "not",
"object", "oct", "open", "or", "ord",
"pass", "pow", "print", "property",
"raise", "range", "raw_input", "reduce", "reload", "repr", "return", "reversed", "round",
"set", "setattr", "slice", "sorted", "staticmethod", "str", "sum", "super",
"tuple", "type",
"try", "tuple", "type",
"unichr", "unicode",
"vars",
"with",
"with", "while",
"yield",
"zip",
"__import__",
"True", "False", "None"
Expand Down