From 67bafd87ed8d49f389dc202f09c1dbf90088a532 Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Tue, 24 Mar 2015 15:35:12 +0300 Subject: [PATCH 01/11] Use Python 3.4 as a default Python 3 instead of 3.3 3.4 is the current stable version of Python 3. --- python/psi-api/src/com/jetbrains/python/psi/LanguageLevel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/psi-api/src/com/jetbrains/python/psi/LanguageLevel.java b/python/psi-api/src/com/jetbrains/python/psi/LanguageLevel.java index a93f5ffb8767..0e3ff4ca83a3 100644 --- a/python/psi-api/src/com/jetbrains/python/psi/LanguageLevel.java +++ b/python/psi-api/src/com/jetbrains/python/psi/LanguageLevel.java @@ -35,7 +35,7 @@ public enum LanguageLevel { PYTHON34(34, true, false, true, true); private static LanguageLevel DEFAULT2 = PYTHON27; - private static LanguageLevel DEFAULT3 = PYTHON33; + private static LanguageLevel DEFAULT3 = PYTHON34; public static LanguageLevel FORCE_LANGUAGE_LEVEL = null; From d093874c3a451ab48fdd831ac8a9f1436bb4088f Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Tue, 24 Mar 2015 15:50:20 +0300 Subject: [PATCH 02/11] Introduced a new language level for Python 3.5 --- .../psi-api/src/com/jetbrains/python/psi/LanguageLevel.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/psi-api/src/com/jetbrains/python/psi/LanguageLevel.java b/python/psi-api/src/com/jetbrains/python/psi/LanguageLevel.java index 0e3ff4ca83a3..8229dfdd43df 100644 --- a/python/psi-api/src/com/jetbrains/python/psi/LanguageLevel.java +++ b/python/psi-api/src/com/jetbrains/python/psi/LanguageLevel.java @@ -32,7 +32,8 @@ public enum LanguageLevel { PYTHON31(31, true, false, true, true), PYTHON32(32, true, false, true, true), PYTHON33(33, true, false, true, true), - PYTHON34(34, true, false, true, true); + PYTHON34(34, true, false, true, true), + PYTHON35(35, true, false, true, true); private static LanguageLevel DEFAULT2 = PYTHON27; private static LanguageLevel DEFAULT3 = PYTHON34; @@ -121,6 +122,9 @@ public enum LanguageLevel { if (pythonVersion.startsWith("3.4")) { return PYTHON34; } + if (pythonVersion.startsWith("3.5")) { + return PYTHON35; + } return DEFAULT3; } return getDefault(); From 8d3dd98d6dc91485a6c3c2e361300eb65efc84eb Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Tue, 24 Mar 2015 15:52:08 +0300 Subject: [PATCH 03/11] Fall back to the default set of modern string prefixes for recent Pythons The set of prefixes remains unchanged for several latest releases, so we use default prefixes here in order not to update the prefixes table with every release. --- .../jetbrains/python/validation/CompatibilityVisitor.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/src/com/jetbrains/python/validation/CompatibilityVisitor.java b/python/src/com/jetbrains/python/validation/CompatibilityVisitor.java index 67a7306a61b2..4e60035be074 100644 --- a/python/src/com/jetbrains/python/validation/CompatibilityVisitor.java +++ b/python/src/com/jetbrains/python/validation/CompatibilityVisitor.java @@ -50,10 +50,10 @@ public abstract class CompatibilityVisitor extends PyAnnotator { AVAILABLE_PREFIXES.put(LanguageLevel.PYTHON30, Sets.newHashSet("R", "B")); AVAILABLE_PREFIXES.put(LanguageLevel.PYTHON31, Sets.newHashSet("R", "B", "BR")); AVAILABLE_PREFIXES.put(LanguageLevel.PYTHON32, Sets.newHashSet("R", "B", "BR")); - AVAILABLE_PREFIXES.put(LanguageLevel.PYTHON33, Sets.newHashSet("R", "U", "B", "BR", "RB")); - AVAILABLE_PREFIXES.put(LanguageLevel.PYTHON34, Sets.newHashSet("R", "U", "B", "BR", "RB")); } + private static final Set DEFAULT_PREFIXES = Sets.newHashSet(Sets.newHashSet("R", "U", "B", "BR", "RB")); + public CompatibilityVisitor(List versionsToProcess) { myVersionsToProcess = versionsToProcess; } @@ -254,7 +254,8 @@ public abstract class CompatibilityVisitor extends PyAnnotator { final LanguageLevel languageLevel = myVersionsToProcess.get(i); if (prefix.isEmpty()) continue; - final Set prefixes = AVAILABLE_PREFIXES.get(languageLevel); + final Set prefixesForLanguageLevel = AVAILABLE_PREFIXES.get(languageLevel); + final Set prefixes = prefixesForLanguageLevel != null ? prefixesForLanguageLevel : DEFAULT_PREFIXES; if (!prefixes.contains(prefix)) len = appendLanguageLevel(message, len, languageLevel); } From e7db2ff39cbc170741f54176edd9d316bc3e5016 Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Tue, 24 Mar 2015 17:40:42 +0300 Subject: [PATCH 04/11] Parsing of '@' and '@=' operators (PY-15390) We have to introduce a new lexeme '@=' and re-define '@' to become a binary operator as well as the prefix of the decorator. --- .../jetbrains/python/lexer/_PythonLexer.java | 1047 +++++++++-------- .../com/jetbrains/python/PyTokenTypes.java | 11 +- .../com/jetbrains/python/PyElementTypes.java | 3 +- .../com/jetbrains/python/lexer/Python.flex | 1 + python/testData/psi/MatMul.py | 5 + python/testData/psi/MatMul.txt | 67 ++ .../jetbrains/python/PythonParsingTest.java | 5 + 7 files changed, 645 insertions(+), 494 deletions(-) create mode 100644 python/testData/psi/MatMul.py create mode 100644 python/testData/psi/MatMul.txt diff --git a/python/gen/com/jetbrains/python/lexer/_PythonLexer.java b/python/gen/com/jetbrains/python/lexer/_PythonLexer.java index 214557a92cdb..406490cc2d38 100644 --- a/python/gen/com/jetbrains/python/lexer/_PythonLexer.java +++ b/python/gen/com/jetbrains/python/lexer/_PythonLexer.java @@ -1,4 +1,4 @@ -/* The following code was generated by JFlex 1.4.3 on 4/26/14 11:33 AM */ +/* The following code was generated by JFlex 1.4.3 on 3/24/15 5:33 PM */ /* It's an automatically generated code. Do not modify it. */ package com.jetbrains.python.lexer; @@ -12,8 +12,8 @@ import com.intellij.openapi.util.text.StringUtil; /** * This class is a scanner generated by * JFlex 1.4.3 - * on 4/26/14 11:33 AM from the specification file - * /Users/ignatov/src/ultimate/tools/lexer/../../community/python/src/com/jetbrains/python/lexer/Python.flex + * on 3/24/15 5:33 PM from the specification file + * /home/user/src/idea/tools/lexer/../../community/python/src/com/jetbrains/python/lexer/Python.flex */ class _PythonLexer implements FlexLexer { /** initial size of the lookahead buffer */ @@ -38,15 +38,15 @@ class _PythonLexer implements FlexLexer { * Translates characters to character classes */ private static final String ZZ_CMAP_PACKED = - "\11\0\1\40\1\42\1\0\1\41\1\13\22\0\1\37\1\74\1\36"+ - "\1\12\1\0\1\66\1\67\1\34\1\76\1\77\1\64\1\62\1\105"+ - "\1\26\1\23\1\65\1\1\1\5\6\3\2\2\1\106\1\43\1\73"+ - "\1\63\1\72\1\0\1\104\1\15\1\20\1\31\1\15\1\25\1\15"+ + "\11\0\1\40\1\42\1\0\1\41\1\13\22\0\1\37\1\75\1\36"+ + "\1\12\1\0\1\67\1\70\1\34\1\77\1\100\1\64\1\62\1\105"+ + "\1\26\1\23\1\66\1\1\1\5\6\3\2\2\1\106\1\43\1\74"+ + "\1\63\1\73\1\0\1\65\1\15\1\20\1\31\1\15\1\25\1\15"+ "\3\14\1\27\1\14\1\21\2\14\1\17\2\14\1\32\2\14\1\32"+ - "\2\14\1\16\2\14\1\100\1\35\1\101\1\71\1\14\1\107\1\44"+ + "\2\14\1\16\2\14\1\101\1\35\1\102\1\72\1\14\1\107\1\44"+ "\1\10\1\30\1\46\1\24\1\4\1\57\1\61\1\53\1\27\1\52"+ "\1\11\1\56\1\45\1\7\1\54\1\14\1\50\1\47\1\51\1\33"+ - "\1\14\1\60\1\6\1\55\1\14\1\102\1\70\1\103\1\75\53\0"+ + "\1\14\1\60\1\6\1\55\1\14\1\103\1\71\1\104\1\76\53\0"+ "\1\14\12\0\1\14\4\0\1\14\5\0\27\14\1\0\7\14\30\14"+ "\1\0\10\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ @@ -75,90 +75,108 @@ class _PythonLexer implements FlexLexer { "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ - "\1\14\1\14\1\14\4\14\31\0\140\14\22\14\4\0\14\14\16\0"+ - "\5\14\11\0\1\14\21\0\130\22\5\0\23\22\12\0\1\14\13\0"+ - "\1\14\1\0\3\14\1\0\1\14\1\0\2\14\1\14\21\14\1\0"+ - "\11\14\43\14\1\0\2\14\3\14\3\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\7\14\2\14\1\14\2\14\2\14\1\14\1\14"+ + "\4\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\105\14"+ + "\1\14\33\14\22\14\4\0\14\14\16\0\5\14\7\0\1\14\1\0"+ + "\1\14\21\0\160\22\1\14\1\14\1\14\1\14\1\14\1\0\1\14"+ + "\1\14\2\0\1\14\3\14\10\0\1\14\1\0\3\14\1\0\1\14"+ + "\1\0\2\14\1\14\21\14\1\0\11\14\43\14\1\14\2\14\3\14"+ + "\3\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ - "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\5\14"+ - "\1\14\1\14\1\0\1\14\1\14\2\14\1\14\4\0\60\14\60\14"+ + "\1\14\1\14\1\14\1\14\5\14\1\14\1\14\1\0\1\14\1\14"+ + "\2\14\2\14\63\14\60\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\0\5\22"+ + "\2\0\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ - "\1\14\1\14\1\14\1\14\1\0\4\22\3\0\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\2\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\2\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ - "\1\14\2\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ - "\1\14\1\14\1\14\1\14\1\14\1\0\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ - "\1\14\1\14\1\14\1\14\2\0\1\14\1\14\6\0\1\14\1\14"+ - "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ - "\1\14\1\14\1\14\1\14\41\0\46\14\2\0\1\14\7\0\47\14"+ - "\11\0\21\22\1\0\27\22\1\0\3\22\1\0\1\22\1\0\2\22"+ - "\1\0\1\22\13\0\33\14\5\0\3\14\35\0\6\22\13\0\32\14"+ - "\5\0\1\14\12\14\16\22\7\0\12\22\4\0\2\14\1\22\143\14"+ - "\1\0\1\14\7\22\2\0\6\22\2\14\2\22\1\0\4\22\2\14"+ - "\12\22\3\14\2\0\1\14\20\0\1\14\1\22\36\14\33\22\2\0"+ - "\3\14\60\0\46\14\13\22\1\14\u014f\0\2\22\1\22\66\14\2\0"+ - "\1\22\1\14\3\22\10\22\4\22\1\22\2\0\1\14\4\22\3\0"+ - "\12\14\2\22\2\0\12\22\21\0\1\22\2\22\1\0\10\14\2\0"+ - "\2\14\2\0\26\14\1\0\7\14\1\0\1\14\3\0\4\14\2\0"+ - "\1\22\1\14\3\22\4\22\2\0\2\22\2\0\2\22\1\22\11\0"+ - "\1\22\4\0\2\14\1\0\3\14\2\22\2\0\12\22\2\14\17\0"+ - "\2\22\1\22\1\0\6\14\4\0\2\14\2\0\26\14\1\0\7\14"+ - "\1\0\2\14\1\0\2\14\1\0\2\14\2\0\1\22\1\0\3\22"+ - "\2\22\4\0\2\22\2\0\3\22\13\0\4\14\1\0\1\14\7\0"+ - "\12\22\2\22\3\14\14\0\2\22\1\22\1\0\11\14\1\0\3\14"+ - "\1\0\26\14\1\0\7\14\1\0\2\14\1\0\5\14\2\0\1\22"+ - "\1\14\3\22\5\22\1\0\2\22\1\22\1\0\2\22\1\22\2\0"+ - "\1\14\17\0\2\14\2\22\2\0\12\22\21\0\1\22\2\22\1\0"+ - "\10\14\2\0\2\14\2\0\26\14\1\0\7\14\1\0\2\14\1\0"+ - "\5\14\2\0\1\22\1\14\1\22\1\22\1\22\3\22\3\0\2\22"+ - "\2\0\2\22\1\22\10\0\1\22\1\22\4\0\2\14\1\0\3\14"+ - "\4\0\12\22\1\0\1\14\20\0\1\22\1\14\1\0\6\14\3\0"+ - "\3\14\1\0\4\14\3\0\2\14\1\0\1\14\1\0\2\14\3\0"+ - "\2\14\3\0\3\14\3\0\10\14\1\0\3\14\4\0\2\22\1\22"+ - "\2\22\3\0\3\22\1\0\3\22\1\22\11\0\1\22\17\0\11\22"+ - "\21\0\3\22\1\0\10\14\1\0\3\14\1\0\27\14\1\0\12\14"+ - "\1\0\5\14\4\0\3\22\4\22\1\0\3\22\1\0\4\22\7\0"+ - "\2\22\11\0\2\14\4\0\12\22\22\0\2\22\1\0\10\14\1\0"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\11\0\46\14\2\0"+ + "\1\14\7\0\47\14\11\0\55\22\1\0\1\22\1\0\2\22\1\0"+ + "\2\22\1\0\1\22\10\0\33\14\5\0\3\14\35\0\13\22\5\0"+ + "\40\14\1\14\12\14\25\22\12\22\4\0\2\14\1\22\143\14\1\0"+ + "\1\14\7\22\2\0\6\22\2\14\2\22\1\0\4\22\2\14\12\22"+ + "\3\14\2\0\1\14\20\0\1\14\1\22\36\14\33\22\2\0\131\14"+ + "\13\22\1\14\16\0\12\22\41\14\11\22\2\14\4\0\1\14\5\0"+ + "\26\14\4\22\1\14\11\22\1\14\3\22\1\14\5\22\22\0\31\14"+ + "\3\22\244\0\3\22\1\22\66\14\1\22\1\22\1\22\1\14\3\22"+ + "\10\22\4\22\1\22\2\22\1\14\7\22\12\14\2\22\2\0\12\22"+ + "\1\0\1\14\6\14\1\0\7\14\1\0\1\22\2\22\1\0\10\14"+ + "\2\0\2\14\2\0\26\14\1\0\7\14\1\0\1\14\3\0\4\14"+ + "\2\0\1\22\1\14\3\22\4\22\2\0\2\22\2\0\2\22\1\22"+ + "\1\14\10\0\1\22\4\0\2\14\1\0\3\14\2\22\2\0\12\22"+ + "\2\14\17\0\2\22\1\22\1\0\6\14\4\0\2\14\2\0\26\14"+ + "\1\0\7\14\1\0\2\14\1\0\2\14\1\0\2\14\2\0\1\22"+ + "\1\0\3\22\2\22\4\0\2\22\2\0\3\22\3\0\1\22\7\0"+ + "\4\14\1\0\1\14\7\0\12\22\2\22\3\14\1\22\13\0\2\22"+ + "\1\22\1\0\11\14\1\0\3\14\1\0\26\14\1\0\7\14\1\0"+ + "\2\14\1\0\5\14\2\0\1\22\1\14\3\22\5\22\1\0\2\22"+ + "\1\22\1\0\2\22\1\22\2\0\1\14\17\0\2\14\2\22\2\0"+ + "\12\22\21\0\1\22\2\22\1\0\10\14\2\0\2\14\2\0\26\14"+ + "\1\0\7\14\1\0\2\14\1\0\5\14\2\0\1\22\1\14\1\22"+ + "\1\22\1\22\4\22\2\0\2\22\2\0\2\22\1\22\10\0\1\22"+ + "\1\22\4\0\2\14\1\0\3\14\2\22\2\0\12\22\1\0\1\14"+ + "\20\0\1\22\1\14\1\0\6\14\3\0\3\14\1\0\4\14\3\0"+ + "\2\14\1\0\1\14\1\0\2\14\3\0\2\14\3\0\3\14\3\0"+ + "\14\14\4\0\2\22\1\22\2\22\3\0\3\22\1\0\3\22\1\22"+ + "\2\0\1\14\6\0\1\22\16\0\12\22\21\0\3\22\1\0\10\14"+ + "\1\0\3\14\1\0\27\14\1\0\12\14\1\0\5\14\3\0\1\14"+ + "\3\22\4\22\1\0\3\22\1\0\4\22\7\0\2\22\1\0\2\14"+ + "\6\0\2\14\2\22\2\0\12\22\22\0\2\22\1\0\10\14\1\0"+ "\3\14\1\0\27\14\1\0\12\14\1\0\5\14\2\0\1\22\1\14"+ "\1\22\1\22\5\22\1\0\1\22\2\22\1\0\2\22\2\22\7\0"+ - "\2\22\7\0\1\14\1\0\2\14\4\0\12\22\22\0\2\22\1\0"+ - "\10\14\1\0\3\14\1\0\27\14\1\0\20\14\4\0\3\22\3\22"+ - "\2\0\3\22\1\0\3\22\1\22\11\0\1\22\10\0\2\14\4\0"+ - "\12\22\22\0\2\22\1\0\22\14\3\0\30\14\1\0\11\14\1\0"+ - "\1\14\2\0\7\14\3\0\1\22\4\0\3\22\3\22\1\0\1\22"+ - "\1\0\10\22\22\0\2\22\15\0\60\14\1\22\2\14\7\22\5\0"+ - "\6\14\1\14\10\22\1\0\12\22\47\0\2\14\1\0\1\14\2\0"+ - "\2\14\1\0\1\14\2\0\1\14\6\0\4\14\1\0\7\14\1\0"+ - "\3\14\1\0\1\14\1\0\1\14\2\0\2\14\1\0\4\14\1\22"+ - "\2\14\6\22\1\0\2\22\1\14\2\0\5\14\1\0\1\14\1\0"+ - "\6\22\2\0\12\22\2\0\2\14\42\0\1\14\27\0\2\22\6\0"+ - "\12\22\13\0\1\22\1\0\1\22\1\0\1\22\4\0\2\22\10\14"+ - "\1\0\42\14\6\0\16\22\1\22\5\22\1\0\2\22\4\14\4\0"+ - "\10\22\1\0\44\22\11\0\1\22\71\0\42\14\1\0\5\14\1\0"+ - "\2\14\1\0\1\22\4\22\1\22\1\22\3\0\2\22\1\22\1\22"+ - "\6\0\12\22\6\0\6\14\2\22\2\22\106\0\46\14\12\0\51\14"+ - "\7\0\132\14\5\0\104\14\5\0\122\14\6\0\7\14\1\0\77\14"+ - "\1\0\1\14\1\0\4\14\2\0\7\14\1\0\1\14\1\0\4\14"+ - "\2\0\47\14\1\0\1\14\1\0\4\14\2\0\37\14\1\0\1\14"+ - "\1\0\4\14\2\0\7\14\1\0\1\14\1\0\4\14\2\0\7\14"+ - "\1\0\7\14\1\0\27\14\1\0\37\14\1\0\1\14\1\0\4\14"+ - "\2\0\7\14\1\0\47\14\1\0\23\14\16\0\11\22\56\0\125\14"+ - "\14\0\u026c\14\2\0\10\14\12\0\32\14\5\0\113\14\3\0\3\14"+ - "\17\0\15\14\1\0\4\14\3\22\13\0\22\14\3\22\13\0\22\14"+ - "\2\22\14\0\15\14\1\0\3\14\1\0\2\22\14\0\64\14\2\0"+ - "\1\22\7\22\10\22\1\22\2\22\13\22\3\0\1\14\4\0\1\14"+ - "\1\22\2\0\12\22\41\0\3\22\2\0\12\22\6\0\43\14\1\14"+ - "\64\14\10\0\51\14\1\22\126\0\35\14\3\0\3\22\4\22\2\22"+ - "\3\22\4\0\2\22\1\22\6\22\3\22\12\0\12\22\36\14\2\0"+ - "\5\14\u038b\0\54\14\66\14\12\14\224\0\1\14\1\14\1\14\1\14"+ + "\2\22\7\0\1\14\1\0\2\14\2\22\2\0\12\22\1\0\2\14"+ + "\17\0\2\22\1\0\10\14\1\0\3\14\1\0\51\14\2\0\1\14"+ + "\3\22\4\22\1\0\3\22\1\0\3\22\1\22\1\14\10\0\1\22"+ + "\10\0\2\14\2\22\2\0\12\22\12\0\6\14\2\0\2\22\1\0"+ + "\22\14\3\0\30\14\1\0\11\14\1\0\1\14\2\0\7\14\3\0"+ + "\1\22\4\0\3\22\3\22\1\0\1\22\1\0\10\22\22\0\2\22"+ + "\15\0\60\14\1\22\2\14\7\22\5\0\6\14\1\14\10\22\1\0"+ + "\12\22\47\0\2\14\1\0\1\14\2\0\2\14\1\0\1\14\2\0"+ + "\1\14\6\0\4\14\1\0\7\14\1\0\3\14\1\0\1\14\1\0"+ + "\1\14\2\0\2\14\1\0\4\14\1\22\2\14\6\22\1\0\2\22"+ + "\1\14\2\0\5\14\1\0\1\14\1\0\6\22\2\0\12\22\2\0"+ + "\2\14\42\0\1\14\27\0\2\22\6\0\12\22\13\0\1\22\1\0"+ + "\1\22\1\0\1\22\4\0\2\22\10\14\1\0\44\14\4\0\16\22"+ + "\1\22\5\22\1\0\2\22\5\14\13\22\1\0\44\22\11\0\1\22"+ + "\71\0\53\14\2\22\4\22\1\22\6\22\1\22\2\22\2\22\2\22"+ + "\1\14\12\22\6\0\6\14\2\22\2\22\4\14\3\22\1\14\3\22"+ + "\2\14\7\22\3\14\4\22\15\14\1\22\2\22\2\22\6\22\1\22"+ + "\1\14\1\22\12\22\3\22\1\22\2\0\46\14\12\0\53\14\1\0"+ + "\1\14\3\0\u0149\14\1\0\4\14\2\0\7\14\1\0\1\14\1\0"+ + "\4\14\2\0\51\14\1\0\4\14\2\0\41\14\1\0\4\14\2\0"+ + "\7\14\1\0\1\14\1\0\4\14\2\0\17\14\1\0\71\14\1\0"+ + "\4\14\2\0\103\14\2\0\3\22\40\0\20\14\20\0\125\14\14\0"+ + "\u026c\14\2\0\21\14\1\0\32\14\5\0\113\14\3\0\3\14\17\0"+ + "\15\14\1\0\4\14\3\22\13\0\22\14\3\22\13\0\22\14\2\22"+ + "\14\0\15\14\1\0\3\14\1\0\2\22\14\0\64\14\2\0\1\22"+ + "\7\22\10\22\1\22\2\22\13\22\3\0\1\14\4\0\1\14\1\22"+ + "\2\0\12\22\41\0\3\22\2\0\12\22\6\0\43\14\1\14\64\14"+ + "\10\0\51\14\1\22\1\14\5\0\106\14\12\0\35\14\3\0\3\22"+ + "\4\22\2\22\3\22\4\0\2\22\1\22\6\22\3\22\12\0\12\22"+ + "\36\14\2\0\5\14\13\0\54\14\4\0\21\22\7\14\2\22\6\0"+ + "\12\22\46\0\27\14\2\22\3\22\4\0\65\14\1\22\1\22\1\22"+ + "\7\22\1\0\1\22\1\22\1\22\2\22\10\22\6\22\12\22\2\0"+ + "\1\22\12\22\6\0\12\22\15\0\1\14\130\0\4\22\1\22\57\14"+ + "\1\22\1\22\5\22\1\22\1\22\5\22\1\22\2\22\7\14\4\0"+ + "\12\22\21\0\11\22\14\0\2\22\1\22\36\14\1\22\4\22\2\22"+ + "\2\22\1\22\3\0\2\14\12\22\6\0\46\14\1\22\1\22\2\22"+ + "\3\22\1\22\1\22\3\22\2\22\14\0\44\14\10\22\10\22\2\22"+ + "\2\22\10\0\12\22\3\0\3\14\12\22\36\14\6\14\122\0\3\22"+ + "\1\0\15\22\1\22\7\22\4\14\1\22\4\14\1\22\15\0\54\14"+ + "\66\14\26\14\1\14\42\14\45\14\47\22\25\0\4\22\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ @@ -173,7 +191,7 @@ class _PythonLexer implements FlexLexer { "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ - "\1\14\1\14\1\14\1\14\1\14\7\14\4\0\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\11\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ @@ -182,28 +200,77 @@ class _PythonLexer implements FlexLexer { "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ - "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\6\0\10\14\10\14"+ - "\6\14\2\0\6\14\2\0\10\14\10\14\10\14\10\14\6\14\2\0"+ - "\6\14\2\0\10\14\1\0\1\14\1\0\1\14\1\0\1\14\1\0"+ - "\1\14\10\14\10\14\16\14\2\0\10\14\10\14\10\14\10\14\10\14"+ - "\10\14\5\14\1\0\2\14\4\14\1\14\1\0\1\14\3\0\3\14"+ - "\1\0\2\14\4\14\1\14\3\0\4\14\2\0\2\14\4\14\4\0"+ - "\10\14\5\14\5\0\3\14\1\0\2\14\4\14\1\14\102\0\2\22"+ - "\23\0\1\22\34\0\1\14\15\0\1\14\120\0\15\22\4\0\1\22"+ - "\3\0\6\22\27\0\1\14\4\0\1\14\2\0\1\14\3\14\2\14"+ - "\3\14\1\14\1\0\1\14\3\0\5\14\6\0\1\14\1\0\1\14"+ - "\1\0\1\14\1\0\4\14\1\0\1\14\2\14\1\0\1\14\1\14"+ - "\4\14\1\14\3\0\1\14\2\14\5\0\1\14\4\14\26\0\44\14"+ - "\u0e81\0\1\14\1\14\1\14\31\0\11\14\6\22\1\0\5\14\2\0"+ - "\3\14\1\14\1\14\4\0\126\14\2\0\2\22\2\0\2\14\1\14"+ - "\1\0\132\14\1\22\3\14\1\14\5\0\50\14\4\0\136\14\21\0"+ - "\30\14\70\0\20\14\u0200\0\u19b6\14\112\0\u51a6\14\132\0\u048d\14\u0773\0"+ - "\u2ba4\14\u215c\0\u012e\14\2\0\73\14\225\0\7\14\14\0\5\14\5\0"+ - "\1\14\1\22\12\14\1\0\15\14\1\0\5\14\1\0\1\14\1\0"+ - "\2\14\1\0\2\14\1\0\154\14\41\0\u016b\14\22\0\100\14\2\0"+ - "\66\14\50\0\14\14\4\0\20\22\20\0\4\22\17\0\2\22\30\0"+ - "\3\22\40\0\5\14\1\0\207\14\23\0\12\22\7\0\32\14\4\0"+ - "\1\22\1\0\32\14\12\0\1\22\12\14\1\14\55\14\2\14\37\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\11\14\10\14\6\14\2\0\6\14"+ + "\2\0\10\14\10\14\10\14\10\14\6\14\2\0\6\14\2\0\10\14"+ + "\1\0\1\14\1\0\1\14\1\0\1\14\1\0\1\14\10\14\10\14"+ + "\16\14\2\0\10\14\10\14\10\14\10\14\10\14\10\14\5\14\1\0"+ + "\2\14\4\14\1\14\1\0\1\14\3\0\3\14\1\0\2\14\4\14"+ + "\1\14\3\0\4\14\2\0\2\14\4\14\4\0\10\14\5\14\5\0"+ + "\3\14\1\0\2\14\4\14\1\14\102\0\2\22\23\0\1\22\34\0"+ + "\1\14\15\0\1\14\20\0\15\14\63\0\15\22\4\0\1\22\3\0"+ + "\14\22\21\0\1\14\4\0\1\14\2\0\1\14\3\14\2\14\3\14"+ + "\1\14\1\0\1\14\3\0\5\14\6\0\1\14\1\0\1\14\1\0"+ + "\1\14\1\0\4\14\1\0\1\14\4\14\1\14\4\14\1\14\2\0"+ + "\2\14\2\14\5\0\1\14\4\14\4\0\1\14\21\0\43\14\1\14"+ + "\1\14\4\14\u0a77\0\57\14\1\0\57\14\1\0\1\14\1\14\3\14"+ + "\2\14\1\14\1\14\1\14\1\14\1\14\1\14\4\14\1\14\1\14"+ + "\2\14\1\14\7\14\1\14\3\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\2\14\6\0\1\14\1\14\1\14\1\14\3\22"+ + "\16\0\46\14\12\0\66\14\11\0\1\14\17\0\1\22\27\14\11\0"+ + "\7\14\1\0\7\14\1\0\7\14\1\0\7\14\1\0\7\14\1\0"+ + "\7\14\1\0\7\14\1\0\7\14\1\0\40\22\57\0\1\14\u01d5\0"+ + "\1\14\1\14\1\14\31\0\11\14\6\22\1\0\5\14\2\0\3\14"+ + "\1\14\1\14\4\0\126\14\2\0\2\22\2\0\2\14\1\14\1\0"+ + "\132\14\1\0\3\14\1\14\5\0\51\14\3\0\136\14\21\0\33\14"+ + "\65\0\20\14\u0200\0\u19b6\14\112\0\u51cc\14\64\0\25\14\1\14\u0477\14"+ + "\103\0\50\14\6\14\2\0\u010c\14\1\14\3\0\20\14\12\22\2\14"+ + "\24\0\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\22\14\0"+ + "\2\22\1\0\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\10\0\106\14\12\14"+ + "\2\22\45\0\11\14\2\0\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\3\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14\1\14"+ + "\1\14\10\14\1\14\1\14\1\14\1\14\2\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\1\14\2\0\1\14\1\14"+ + "\1\14\1\14\1\0\1\14\1\14\16\0\1\14\1\14\1\14\1\14"+ + "\1\14\1\14\1\14\1\14\1\14\1\14\120\0\1\14\7\14\1\22"+ + "\3\14\1\22\4\14\1\22\27\14\2\22\2\22\1\22\30\0\64\14"+ + "\14\0\2\22\62\14\20\22\1\22\13\0\12\22\6\0\22\22\6\14"+ + "\3\0\1\14\4\0\12\22\34\14\10\22\2\0\27\14\13\22\2\22"+ + "\14\0\35\14\3\0\3\22\1\22\57\14\1\22\2\22\4\22\2\22"+ + "\1\22\4\22\16\0\1\14\12\22\46\0\51\14\6\22\2\22\2\22"+ + "\2\22\2\22\11\0\3\14\1\22\10\14\1\22\1\22\2\0\12\22"+ + "\6\0\20\14\1\14\6\14\3\0\1\14\1\22\4\0\60\14\1\22"+ + "\1\14\3\22\2\14\2\22\5\14\2\22\1\14\1\22\1\14\30\0"+ + "\2\14\1\14\43\0\6\14\2\0\6\14\2\0\6\14\11\0\7\14"+ + "\1\0\7\14\221\0\43\14\2\22\1\22\2\22\1\22\2\22\1\0"+ + "\1\22\1\22\2\0\12\22\6\0\u2ba4\14\14\0\27\14\4\0\61\14"+ + "\u2104\0\u012e\14\2\0\76\14\2\0\152\14\46\0\7\14\14\0\5\14"+ + "\5\0\1\14\1\22\12\14\1\0\15\14\1\0\5\14\1\0\1\14"+ + "\1\0\2\14\1\0\2\14\1\0\154\14\41\0\u016b\14\22\0\100\14"+ + "\2\0\66\14\50\0\14\14\4\0\20\22\20\0\7\22\14\0\2\22"+ + "\30\0\3\22\40\0\5\14\1\0\207\14\23\0\12\22\7\0\32\14"+ + "\4\0\1\22\1\0\32\14\13\0\12\14\1\14\55\14\2\14\37\14"+ "\3\0\6\14\2\0\6\14\2\0\6\14\2\0\3\14\43\0"; /** @@ -220,29 +287,29 @@ class _PythonLexer implements FlexLexer { "\3\0\1\1\2\2\5\3\1\4\1\3\1\5\1\3"+ "\1\6\1\3\1\7\1\10\1\7\1\11\1\12\1\13"+ "\1\14\1\15\12\3\1\16\1\17\1\20\1\21\1\22"+ - "\1\23\1\24\1\25\1\26\1\27\1\1\1\30\1\31"+ + "\1\23\1\24\1\25\1\26\1\27\1\30\1\1\1\31"+ "\1\32\1\33\1\34\1\35\1\36\1\37\1\40\1\41"+ "\1\42\2\43\1\44\2\45\1\46\3\3\2\47\1\3"+ "\1\41\1\2\4\0\1\2\1\50\1\0\1\51\3\3"+ "\1\52\5\3\1\53\2\3\3\7\1\54\3\7\7\3"+ "\1\55\1\56\1\57\5\3\1\60\1\61\1\62\1\63"+ "\1\64\1\65\1\66\1\67\1\70\1\71\1\72\1\73"+ - "\1\74\1\75\1\76\1\77\1\0\3\45\1\100\3\45"+ - "\2\3\6\47\2\0\1\101\3\2\1\50\1\0\1\102"+ - "\12\3\1\7\1\103\1\104\1\0\1\103\1\105\1\3"+ - "\1\106\1\107\1\110\2\3\1\111\5\3\1\112\1\113"+ - "\1\114\1\115\1\0\1\45\1\116\1\117\1\0\1\116"+ - "\1\3\1\47\2\120\1\121\1\3\2\0\3\3\1\122"+ - "\1\123\2\3\1\0\2\124\1\0\4\3\1\125\3\3"+ - "\3\0\2\117\7\0\1\3\2\0\1\126\3\3\1\127"+ - "\1\0\2\103\1\0\2\3\1\130\1\3\1\131\1\3"+ - "\1\132\3\0\2\116\4\0\2\120\1\0\1\3\1\133"+ - "\1\134\1\3\3\103\1\135\1\136\1\137\1\140\3\116"+ - "\3\120\1\141\1\3\1\124\1\0\1\142\6\0\1\143"+ - "\2\103\2\116\2\120"; + "\1\74\1\75\1\76\1\77\1\100\1\0\3\45\1\101"+ + "\3\45\2\3\6\47\2\0\1\102\3\2\1\50\1\0"+ + "\1\103\12\3\1\7\1\104\1\105\1\0\1\104\1\106"+ + "\1\3\1\107\1\110\1\111\2\3\1\112\5\3\1\113"+ + "\1\114\1\115\1\116\1\0\1\45\1\117\1\120\1\0"+ + "\1\117\1\3\1\47\2\121\1\122\1\3\2\0\3\3"+ + "\1\123\1\124\2\3\1\0\2\125\1\0\4\3\1\126"+ + "\3\3\3\0\2\120\7\0\1\3\2\0\1\127\3\3"+ + "\1\130\1\0\2\104\1\0\2\3\1\131\1\3\1\132"+ + "\1\3\1\133\3\0\2\117\4\0\2\121\1\0\1\3"+ + "\1\134\1\135\1\3\3\104\1\136\1\137\1\140\1\141"+ + "\3\117\3\121\1\142\1\3\1\125\1\0\1\143\6\0"+ + "\1\144\2\104\2\117\2\121"; private static int [] zzUnpackAction() { - int [] result = new int[297]; + int [] result = new int[298]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; @@ -272,42 +339,42 @@ class _PythonLexer implements FlexLexer { "\0\u0480\0\u04c8\0\330\0\u0510\0\330\0\330\0\330\0\330"+ "\0\330\0\u0558\0\u05a0\0\u05e8\0\u0630\0\u0678\0\u06c0\0\u0708"+ "\0\u0750\0\u0798\0\u07e0\0\u0828\0\u0870\0\u08b8\0\u0900\0\u0948"+ - "\0\u0990\0\u09d8\0\u0a20\0\u0a68\0\u0ab0\0\u0af8\0\330\0\330"+ + "\0\u0990\0\u09d8\0\u0a20\0\u0a68\0\u0ab0\0\u0af8\0\u0b40\0\330"+ "\0\330\0\330\0\330\0\330\0\330\0\330\0\330\0\330"+ - "\0\330\0\330\0\u0b40\0\u0b88\0\u0bd0\0\u0c18\0\330\0\u0c60"+ - "\0\u0ca8\0\u0cf0\0\u0d38\0\u0d80\0\u0dc8\0\u0e10\0\u0e58\0\u0ea0"+ - "\0\u0ee8\0\u0f30\0\u0f78\0\330\0\u0fc0\0\u1008\0\330\0\u1050"+ - "\0\u1098\0\u10e0\0\u01f8\0\u1128\0\u1170\0\u11b8\0\u1200\0\u1248"+ - "\0\330\0\u1290\0\u12d8\0\u1320\0\u1368\0\u13b0\0\330\0\u13f8"+ - "\0\u1440\0\u1488\0\u14d0\0\u1518\0\u1560\0\u15a8\0\u15f0\0\u1638"+ - "\0\u1680\0\u01f8\0\u01f8\0\u01f8\0\u16c8\0\u1710\0\u1758\0\u17a0"+ - "\0\u17e8\0\330\0\330\0\330\0\u1830\0\330\0\u1878\0\330"+ - "\0\330\0\330\0\330\0\330\0\u18c0\0\330\0\330\0\u1908"+ - "\0\330\0\u1950\0\u1998\0\u19e0\0\u1a28\0\330\0\u1a70\0\u1ab8"+ + "\0\330\0\330\0\u0b88\0\u0bd0\0\u0c18\0\u0c60\0\330\0\u0ca8"+ + "\0\u0cf0\0\u0d38\0\u0d80\0\u0dc8\0\u0e10\0\u0e58\0\u0ea0\0\u0ee8"+ + "\0\u0f30\0\u0f78\0\u0fc0\0\330\0\u1008\0\u1050\0\330\0\u1098"+ + "\0\u10e0\0\u1128\0\u01f8\0\u1170\0\u11b8\0\u1200\0\u1248\0\u1290"+ + "\0\330\0\u12d8\0\u1320\0\u1368\0\u13b0\0\u13f8\0\330\0\u1440"+ + "\0\u1488\0\u14d0\0\u1518\0\u1560\0\u15a8\0\u15f0\0\u1638\0\u1680"+ + "\0\u16c8\0\u01f8\0\u01f8\0\u01f8\0\u1710\0\u1758\0\u17a0\0\u17e8"+ + "\0\u1830\0\330\0\330\0\330\0\u1878\0\330\0\330\0\u18c0"+ + "\0\330\0\330\0\330\0\330\0\330\0\u1908\0\330\0\330"+ + "\0\u1950\0\330\0\u1998\0\u19e0\0\u1a28\0\u1a70\0\330\0\u1ab8"+ "\0\u1b00\0\u1b48\0\u1b90\0\u1bd8\0\u1c20\0\u1c68\0\u1cb0\0\u1cf8"+ - "\0\u1d40\0\u1d88\0\u0e10\0\330\0\u1dd0\0\u1e18\0\u1e60\0\u1ea8"+ - "\0\u1ef0\0\u01f8\0\u1f38\0\u1f80\0\u1fc8\0\u2010\0\u2058\0\u20a0"+ - "\0\u20e8\0\u2130\0\u2178\0\u21c0\0\u2208\0\u2250\0\330\0\u2208"+ - "\0\u2298\0\u01f8\0\u22e0\0\u01f8\0\u01f8\0\u01f8\0\u2328\0\u2370"+ - "\0\u01f8\0\u23b8\0\u2400\0\u2448\0\u2490\0\u24d8\0\330\0\330"+ - "\0\330\0\330\0\u2520\0\u2568\0\u25b0\0\330\0\u2568\0\u25f8"+ - "\0\u2640\0\330\0\u2688\0\u26d0\0\u01f8\0\u2718\0\u2760\0\u27a8"+ - "\0\u27f0\0\u2838\0\u2880\0\u01f8\0\u01f8\0\u28c8\0\u2910\0\u2958"+ - "\0\u29a0\0\u29e8\0\u2a30\0\u2a78\0\u2ac0\0\u2b08\0\u2b50\0\u01f8"+ - "\0\u2b98\0\u2be0\0\u2c28\0\u2c70\0\u2cb8\0\u2d00\0\u2d48\0\u2d90"+ + "\0\u1d40\0\u1d88\0\u1dd0\0\u0e58\0\330\0\u1e18\0\u1e60\0\u1ea8"+ + "\0\u1ef0\0\u1f38\0\u01f8\0\u1f80\0\u1fc8\0\u2010\0\u2058\0\u20a0"+ + "\0\u20e8\0\u2130\0\u2178\0\u21c0\0\u2208\0\u2250\0\u2298\0\330"+ + "\0\u2250\0\u22e0\0\u01f8\0\u2328\0\u01f8\0\u01f8\0\u01f8\0\u2370"+ + "\0\u23b8\0\u01f8\0\u2400\0\u2448\0\u2490\0\u24d8\0\u2520\0\330"+ + "\0\330\0\330\0\330\0\u2568\0\u25b0\0\u25f8\0\330\0\u25b0"+ + "\0\u2640\0\u2688\0\330\0\u26d0\0\u2718\0\u01f8\0\u2760\0\u27a8"+ + "\0\u27f0\0\u2838\0\u2880\0\u28c8\0\u01f8\0\u01f8\0\u2910\0\u2958"+ + "\0\u29a0\0\u29e8\0\u2a30\0\u2a78\0\u2ac0\0\u2b08\0\u2b50\0\u2b98"+ + "\0\u01f8\0\u2be0\0\u2c28\0\u2c70\0\u2cb8\0\u2d00\0\u2d48\0\u2d90"+ "\0\u2dd8\0\u2e20\0\u2e68\0\u2eb0\0\u2ef8\0\u2f40\0\u2f88\0\u2fd0"+ - "\0\u3018\0\u3060\0\u01f8\0\u30a8\0\u30f0\0\u3138\0\u01f8\0\u3180"+ - "\0\u31c8\0\u3210\0\u3258\0\u32a0\0\u32e8\0\u01f8\0\u3330\0\u01f8"+ - "\0\u3378\0\u01f8\0\u33c0\0\u3408\0\u3450\0\u3498\0\u34e0\0\u3528"+ - "\0\u1c20\0\u1d40\0\u3570\0\u35b8\0\u3600\0\u3648\0\u3690\0\u01f8"+ - "\0\u01f8\0\u36d8\0\u3720\0\u3768\0\u37b0\0\u01f8\0\u01f8\0\u01f8"+ - "\0\u01f8\0\u2568\0\u37f8\0\u3840\0\330\0\u3888\0\u38d0\0\u01f8"+ - "\0\u3918\0\330\0\u3720\0\330\0\u3960\0\u39a8\0\u39f0\0\u3a38"+ - "\0\u3a80\0\u3ac8\0\u01f8\0\u3180\0\u3258\0\u3450\0\u3528\0\u3570"+ - "\0\u3648"; + "\0\u3018\0\u3060\0\u30a8\0\u01f8\0\u30f0\0\u3138\0\u3180\0\u01f8"+ + "\0\u31c8\0\u3210\0\u3258\0\u32a0\0\u32e8\0\u3330\0\u01f8\0\u3378"+ + "\0\u01f8\0\u33c0\0\u01f8\0\u3408\0\u3450\0\u3498\0\u34e0\0\u3528"+ + "\0\u3570\0\u1c68\0\u1d88\0\u35b8\0\u3600\0\u3648\0\u3690\0\u36d8"+ + "\0\u01f8\0\u01f8\0\u3720\0\u3768\0\u37b0\0\u37f8\0\u01f8\0\u01f8"+ + "\0\u01f8\0\u01f8\0\u25b0\0\u3840\0\u3888\0\330\0\u38d0\0\u3918"+ + "\0\u01f8\0\u3960\0\330\0\u3768\0\330\0\u39a8\0\u39f0\0\u3a38"+ + "\0\u3a80\0\u3ac8\0\u3b10\0\u01f8\0\u31c8\0\u32a0\0\u3498\0\u3570"+ + "\0\u35b8\0\u3690"; private static int [] zzUnpackRowMap() { - int [] result = new int[297]; + int [] result = new int[298]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; @@ -389,185 +456,185 @@ class _PythonLexer implements FlexLexer { "\10\10\1\160\2\0\7\10\1\0\2\10\1\0\5\10"+ "\10\0\16\10\27\0\11\10\2\0\7\10\1\0\2\10"+ "\1\0\5\10\10\0\15\10\1\161\111\0\1\162\107\0"+ - "\1\163\107\0\1\164\1\165\106\0\1\166\1\0\1\167"+ - "\105\0\1\170\107\0\1\171\107\0\1\172\107\0\1\173"+ - "\107\0\1\174\6\0\1\175\100\0\1\176\6\0\1\177"+ - "\1\200\77\0\1\201\34\0\1\202\7\0\1\202\7\0"+ - "\4\202\1\75\1\0\1\76\11\0\1\202\37\0\13\74"+ - "\1\0\26\74\1\0\45\74\13\203\1\0\20\203\1\204"+ - "\1\205\4\203\1\206\45\203\13\207\1\0\21\207\1\210"+ - "\1\211\3\207\1\206\45\207\1\0\7\10\1\212\1\10"+ - "\2\0\4\10\1\212\2\10\1\0\2\10\1\0\1\10"+ - "\4\212\1\103\1\0\1\104\5\0\4\10\1\213\11\10"+ - "\27\0\7\10\1\212\1\10\2\0\4\10\1\212\2\10"+ - "\1\0\2\10\1\0\1\10\4\212\1\103\1\0\1\104"+ - "\5\0\4\10\1\212\11\10\27\0\6\10\1\132\1\212"+ - "\1\133\2\0\4\10\1\212\2\10\1\0\2\10\1\0"+ - "\1\10\4\212\1\103\1\0\1\104\5\0\4\10\1\212"+ - "\11\10\26\0\13\214\1\0\20\214\1\215\1\216\4\214"+ - "\1\0\45\214\13\217\1\0\21\217\1\220\1\221\3\217"+ - "\1\0\45\217\1\0\7\10\1\212\1\10\2\0\4\10"+ - "\1\212\2\10\1\0\1\147\1\10\1\0\1\10\4\212"+ - "\1\103\1\0\1\104\5\0\1\150\3\10\1\212\11\10"+ - "\40\0\1\222\24\0\1\223\2\0\1\224\46\0\1\107"+ - "\1\110\1\107\1\0\1\107\3\0\1\114\7\0\1\114"+ - "\1\0\1\115\2\116\1\0\1\117\61\0\3\110\1\0"+ - "\1\110\15\0\1\115\2\116\1\0\1\117\61\0\5\225"+ - "\2\0\1\225\4\0\1\225\2\0\1\225\3\0\2\225"+ - "\2\0\2\225\12\0\1\225\1\0\1\225\42\0\1\226"+ - "\1\0\1\226\1\0\1\226\103\0\1\227\3\0\1\227"+ - "\103\0\3\115\1\0\1\115\16\0\2\116\1\0\1\117"+ - "\61\0\3\230\1\0\1\230\20\0\1\231\33\0\1\231"+ - "\26\0\11\10\2\0\7\10\1\0\2\10\1\0\5\10"+ - "\10\0\4\10\1\232\11\10\27\0\6\10\1\233\2\10"+ + "\1\163\107\0\1\164\1\165\106\0\1\166\107\0\1\167"+ + "\2\0\1\170\104\0\1\171\107\0\1\172\107\0\1\173"+ + "\107\0\1\174\107\0\1\175\7\0\1\176\77\0\1\177"+ + "\7\0\1\200\1\201\76\0\1\202\34\0\1\203\7\0"+ + "\1\203\7\0\4\203\1\75\1\0\1\76\11\0\1\203"+ + "\37\0\13\74\1\0\26\74\1\0\45\74\13\204\1\0"+ + "\20\204\1\205\1\206\4\204\1\207\45\204\13\210\1\0"+ + "\21\210\1\211\1\212\3\210\1\207\45\210\1\0\7\10"+ + "\1\213\1\10\2\0\4\10\1\213\2\10\1\0\2\10"+ + "\1\0\1\10\4\213\1\103\1\0\1\104\5\0\4\10"+ + "\1\214\11\10\27\0\7\10\1\213\1\10\2\0\4\10"+ + "\1\213\2\10\1\0\2\10\1\0\1\10\4\213\1\103"+ + "\1\0\1\104\5\0\4\10\1\213\11\10\27\0\6\10"+ + "\1\132\1\213\1\133\2\0\4\10\1\213\2\10\1\0"+ + "\2\10\1\0\1\10\4\213\1\103\1\0\1\104\5\0"+ + "\4\10\1\213\11\10\26\0\13\215\1\0\20\215\1\216"+ + "\1\217\4\215\1\0\45\215\13\220\1\0\21\220\1\221"+ + "\1\222\3\220\1\0\45\220\1\0\7\10\1\213\1\10"+ + "\2\0\4\10\1\213\2\10\1\0\1\147\1\10\1\0"+ + "\1\10\4\213\1\103\1\0\1\104\5\0\1\150\3\10"+ + "\1\213\11\10\40\0\1\223\24\0\1\224\2\0\1\225"+ + "\46\0\1\107\1\110\1\107\1\0\1\107\3\0\1\114"+ + "\7\0\1\114\1\0\1\115\2\116\1\0\1\117\61\0"+ + "\3\110\1\0\1\110\15\0\1\115\2\116\1\0\1\117"+ + "\61\0\5\226\2\0\1\226\4\0\1\226\2\0\1\226"+ + "\3\0\2\226\2\0\2\226\12\0\1\226\1\0\1\226"+ + "\42\0\1\227\1\0\1\227\1\0\1\227\103\0\1\230"+ + "\3\0\1\230\103\0\3\115\1\0\1\115\16\0\2\116"+ + "\1\0\1\117\61\0\3\231\1\0\1\231\20\0\1\232"+ + "\33\0\1\232\26\0\11\10\2\0\7\10\1\0\2\10"+ + "\1\0\5\10\10\0\4\10\1\233\11\10\27\0\6\10"+ + "\1\234\2\10\2\0\7\10\1\0\2\10\1\0\5\10"+ + "\10\0\16\10\27\0\11\10\2\0\7\10\1\0\2\10"+ + "\1\0\5\10\10\0\1\10\1\235\14\10\27\0\7\10"+ + "\1\236\1\10\2\0\4\10\1\236\2\10\1\0\2\10"+ + "\1\0\1\10\4\236\1\22\1\0\1\24\5\0\4\10"+ + "\1\236\11\10\27\0\7\10\1\236\1\10\2\0\4\10"+ + "\1\236\2\10\1\0\1\237\1\10\1\0\1\10\4\236"+ + "\1\22\1\0\1\24\5\0\4\10\1\236\11\10\27\0"+ + "\11\10\2\0\7\10\1\0\2\10\1\0\5\10\10\0"+ + "\12\10\1\240\3\10\27\0\11\10\2\0\7\10\1\0"+ + "\2\10\1\0\1\10\1\241\3\10\10\0\16\10\27\0"+ + "\11\10\2\0\7\10\1\0\2\10\1\0\5\10\10\0"+ + "\3\10\1\242\3\10\1\243\6\10\27\0\11\10\2\0"+ + "\7\10\1\0\2\10\1\0\5\10\10\0\1\10\1\244"+ + "\14\10\27\0\11\10\2\0\7\10\1\0\2\10\1\0"+ + "\5\10\10\0\1\245\15\10\26\0\13\134\1\0\20\134"+ + "\1\246\1\136\4\134\1\137\45\134\34\0\1\247\1\250"+ + "\1\0\2\251\1\0\2\137\44\0\110\134\13\140\1\0"+ + "\21\140\1\141\1\246\3\140\1\137\155\140\35\0\1\250"+ + "\1\252\2\251\1\0\2\137\45\0\11\10\2\0\7\10"+ + "\1\0\2\10\1\0\5\10\10\0\2\10\1\253\13\10"+ + "\27\0\11\10\2\0\7\10\1\0\2\10\1\0\5\10"+ + "\10\0\3\10\1\254\12\10\27\0\11\10\2\0\7\10"+ + "\1\0\2\10\1\0\5\10\10\0\5\10\1\255\10\10"+ + "\27\0\3\10\1\256\4\10\1\257\2\0\7\10\1\0"+ + "\2\10\1\0\5\10\10\0\16\10\27\0\11\10\2\0"+ + "\7\10\1\0\2\10\1\0\5\10\10\0\5\10\1\260"+ + "\10\10\27\0\11\10\2\0\7\10\1\0\2\10\1\0"+ + "\5\10\10\0\7\10\1\261\6\10\27\0\11\10\2\0"+ + "\7\10\1\0\2\10\1\0\5\10\10\0\11\10\1\262"+ + "\4\10\27\0\11\10\2\0\7\10\1\0\2\10\1\0"+ + "\5\10\10\0\10\10\1\263\5\10\27\0\11\10\2\0"+ + "\7\10\1\0\2\10\1\0\5\10\10\0\3\10\1\264"+ + "\12\10\27\0\11\10\2\0\7\10\1\0\1\265\1\10"+ + "\1\0\5\10\10\0\16\10\27\0\6\10\1\266\2\10"+ "\2\0\7\10\1\0\2\10\1\0\5\10\10\0\16\10"+ "\27\0\11\10\2\0\7\10\1\0\2\10\1\0\5\10"+ - "\10\0\1\10\1\234\14\10\27\0\7\10\1\235\1\10"+ - "\2\0\4\10\1\235\2\10\1\0\2\10\1\0\1\10"+ - "\4\235\1\22\1\0\1\24\5\0\4\10\1\235\11\10"+ - "\27\0\7\10\1\235\1\10\2\0\4\10\1\235\2\10"+ - "\1\0\1\236\1\10\1\0\1\10\4\235\1\22\1\0"+ - "\1\24\5\0\4\10\1\235\11\10\27\0\11\10\2\0"+ - "\7\10\1\0\2\10\1\0\5\10\10\0\12\10\1\237"+ - "\3\10\27\0\11\10\2\0\7\10\1\0\2\10\1\0"+ - "\1\10\1\240\3\10\10\0\16\10\27\0\11\10\2\0"+ - "\7\10\1\0\2\10\1\0\5\10\10\0\3\10\1\241"+ - "\3\10\1\242\6\10\27\0\11\10\2\0\7\10\1\0"+ - "\2\10\1\0\5\10\10\0\1\10\1\243\14\10\27\0"+ + "\10\0\7\10\1\267\6\10\111\0\1\270\107\0\1\271"+ + "\107\0\1\272\107\0\1\273\34\0\1\274\7\0\1\274"+ + "\7\0\4\274\1\75\1\0\1\76\11\0\1\274\37\0"+ + "\13\204\1\0\20\204\1\275\1\206\4\204\1\207\45\204"+ + "\34\0\1\276\1\277\1\0\2\300\1\0\2\207\44\0"+ + "\110\204\13\210\1\0\21\210\1\211\1\275\3\210\1\207"+ + "\155\210\35\0\1\277\1\301\2\300\1\0\2\207\45\0"+ + "\7\10\1\302\1\10\2\0\4\10\1\302\2\10\1\0"+ + "\2\10\1\0\1\10\4\302\1\103\1\0\1\104\5\0"+ + "\4\10\1\302\11\10\27\0\7\10\1\302\1\10\2\0"+ + "\4\10\1\302\2\10\1\0\1\237\1\10\1\0\1\10"+ + "\4\302\1\103\1\0\1\104\5\0\4\10\1\302\11\10"+ + "\26\0\13\215\1\0\20\215\1\303\1\217\4\215\1\0"+ + "\45\215\34\0\1\304\53\0\110\215\13\220\1\0\21\220"+ + "\1\221\1\303\3\220\1\0\155\220\36\0\1\305\51\0"+ + "\13\223\1\0\26\223\1\225\45\223\1\0\5\226\2\0"+ + "\1\226\1\114\3\0\1\226\2\0\1\226\1\114\2\0"+ + "\2\226\2\0\2\226\12\0\1\226\1\0\1\226\42\0"+ + "\1\227\1\0\1\227\1\0\1\227\3\0\1\114\7\0"+ + "\1\114\67\0\1\230\3\0\1\230\3\0\1\114\7\0"+ + "\1\114\67\0\3\231\1\0\1\231\21\0\1\117\61\0"+ + "\3\231\1\0\1\231\103\0\11\10\2\0\7\10\1\0"+ + "\2\10\1\0\5\10\10\0\12\10\1\306\3\10\27\0"+ "\11\10\2\0\7\10\1\0\2\10\1\0\5\10\10\0"+ - "\1\244\15\10\26\0\13\134\1\0\20\134\1\245\1\136"+ - "\4\134\1\137\45\134\34\0\1\246\1\247\1\0\2\250"+ - "\1\0\2\137\44\0\110\134\13\140\1\0\21\140\1\141"+ - "\1\245\3\140\1\137\155\140\35\0\1\247\1\251\2\250"+ - "\1\0\2\137\45\0\11\10\2\0\7\10\1\0\2\10"+ - "\1\0\5\10\10\0\2\10\1\252\13\10\27\0\11\10"+ - "\2\0\7\10\1\0\2\10\1\0\5\10\10\0\3\10"+ - "\1\253\12\10\27\0\11\10\2\0\7\10\1\0\2\10"+ - "\1\0\5\10\10\0\5\10\1\254\10\10\27\0\3\10"+ - "\1\255\4\10\1\256\2\0\7\10\1\0\2\10\1\0"+ - "\5\10\10\0\16\10\27\0\11\10\2\0\7\10\1\0"+ - "\2\10\1\0\5\10\10\0\5\10\1\257\10\10\27\0"+ + "\1\307\15\10\27\0\11\10\2\0\7\10\1\0\2\10"+ + "\1\0\5\10\1\310\1\0\1\311\5\0\16\10\27\0"+ "\11\10\2\0\7\10\1\0\2\10\1\0\5\10\10\0"+ - "\7\10\1\260\6\10\27\0\11\10\2\0\7\10\1\0"+ - "\2\10\1\0\5\10\10\0\11\10\1\261\4\10\27\0"+ - "\11\10\2\0\7\10\1\0\2\10\1\0\5\10\10\0"+ - "\10\10\1\262\5\10\27\0\11\10\2\0\7\10\1\0"+ - "\2\10\1\0\5\10\10\0\3\10\1\263\12\10\27\0"+ - "\11\10\2\0\7\10\1\0\1\264\1\10\1\0\5\10"+ - "\10\0\16\10\27\0\6\10\1\265\2\10\2\0\7\10"+ + "\1\312\15\10\27\0\7\10\1\313\1\10\2\0\7\10"+ "\1\0\2\10\1\0\5\10\10\0\16\10\27\0\11\10"+ - "\2\0\7\10\1\0\2\10\1\0\5\10\10\0\7\10"+ - "\1\266\6\10\111\0\1\267\107\0\1\270\107\0\1\271"+ - "\107\0\1\272\34\0\1\273\7\0\1\273\7\0\4\273"+ - "\1\75\1\0\1\76\11\0\1\273\37\0\13\203\1\0"+ - "\20\203\1\274\1\205\4\203\1\206\45\203\34\0\1\275"+ - "\1\276\1\0\2\277\1\0\2\206\44\0\110\203\13\207"+ - "\1\0\21\207\1\210\1\274\3\207\1\206\155\207\35\0"+ - "\1\276\1\300\2\277\1\0\2\206\45\0\7\10\1\301"+ - "\1\10\2\0\4\10\1\301\2\10\1\0\2\10\1\0"+ - "\1\10\4\301\1\103\1\0\1\104\5\0\4\10\1\301"+ - "\11\10\27\0\7\10\1\301\1\10\2\0\4\10\1\301"+ - "\2\10\1\0\1\236\1\10\1\0\1\10\4\301\1\103"+ - "\1\0\1\104\5\0\4\10\1\301\11\10\26\0\13\214"+ - "\1\0\20\214\1\302\1\216\4\214\1\0\45\214\34\0"+ - "\1\303\53\0\110\214\13\217\1\0\21\217\1\220\1\302"+ - "\3\217\1\0\155\217\36\0\1\304\51\0\13\222\1\0"+ - "\26\222\1\224\45\222\1\0\5\225\2\0\1\225\1\114"+ - "\3\0\1\225\2\0\1\225\1\114\2\0\2\225\2\0"+ - "\2\225\12\0\1\225\1\0\1\225\42\0\1\226\1\0"+ - "\1\226\1\0\1\226\3\0\1\114\7\0\1\114\67\0"+ - "\1\227\3\0\1\227\3\0\1\114\7\0\1\114\67\0"+ - "\3\230\1\0\1\230\21\0\1\117\61\0\3\230\1\0"+ - "\1\230\103\0\11\10\2\0\7\10\1\0\2\10\1\0"+ - "\5\10\10\0\12\10\1\305\3\10\27\0\11\10\2\0"+ - "\7\10\1\0\2\10\1\0\5\10\10\0\1\306\15\10"+ + "\2\0\7\10\1\0\1\314\1\10\1\0\5\10\10\0"+ + "\16\10\27\0\11\10\2\0\7\10\1\0\1\315\1\10"+ + "\1\0\5\10\10\0\16\10\27\0\3\10\1\316\5\10"+ + "\2\0\7\10\1\0\2\10\1\0\5\10\10\0\16\10"+ "\27\0\11\10\2\0\7\10\1\0\2\10\1\0\5\10"+ - "\1\307\1\0\1\310\5\0\16\10\27\0\11\10\2\0"+ - "\7\10\1\0\2\10\1\0\5\10\10\0\1\311\15\10"+ - "\27\0\7\10\1\312\1\10\2\0\7\10\1\0\2\10"+ - "\1\0\5\10\10\0\16\10\27\0\11\10\2\0\7\10"+ - "\1\0\1\313\1\10\1\0\5\10\10\0\16\10\27\0"+ - "\11\10\2\0\7\10\1\0\1\314\1\10\1\0\5\10"+ - "\10\0\16\10\27\0\3\10\1\315\5\10\2\0\7\10"+ - "\1\0\2\10\1\0\5\10\10\0\16\10\27\0\11\10"+ - "\2\0\7\10\1\0\2\10\1\0\5\10\10\0\5\10"+ - "\1\316\10\10\27\0\11\10\2\0\7\10\1\0\2\10"+ - "\1\0\5\10\10\0\3\10\1\317\12\10\63\0\1\247"+ - "\1\0\2\250\1\0\2\137\44\0\34\246\1\320\1\321"+ - "\52\246\35\251\1\322\1\323\51\251\1\0\11\10\2\0"+ - "\7\10\1\0\1\324\1\10\1\0\5\10\10\0\16\10"+ - "\27\0\11\10\2\0\7\10\1\0\2\10\1\0\4\10"+ - "\1\325\10\0\16\10\27\0\11\10\2\0\7\10\1\0"+ - "\2\10\1\0\5\10\10\0\3\10\1\326\12\10\27\0"+ - "\6\10\1\327\2\10\2\0\7\10\1\0\2\10\1\0"+ - "\5\10\10\0\16\10\27\0\11\10\2\0\7\10\1\0"+ - "\2\10\1\0\5\10\10\0\3\10\1\330\12\10\27\0"+ - "\10\10\1\331\2\0\7\10\1\0\2\10\1\0\5\10"+ - "\10\0\16\10\27\0\7\10\1\332\1\10\2\0\7\10"+ - "\1\0\2\10\1\0\5\10\10\0\16\10\27\0\10\10"+ - "\1\333\2\0\7\10\1\0\2\10\1\0\5\10\10\0"+ - "\16\10\62\0\1\334\1\0\1\335\106\0\1\276\1\0"+ - "\2\277\1\0\2\206\44\0\34\275\1\336\1\337\52\275"+ - "\35\300\1\340\1\341\51\300\1\0\11\10\2\0\7\10"+ - "\1\0\2\10\1\0\5\10\1\342\1\0\1\343\5\0"+ - "\16\10\26\0\34\303\1\344\1\345\52\303\35\304\1\346"+ - "\1\347\51\304\1\0\10\10\1\350\2\0\7\10\1\0"+ - "\2\10\1\0\5\10\10\0\16\10\62\0\1\351\111\0"+ - "\1\352\52\0\11\10\2\0\7\10\1\0\2\10\1\0"+ - "\5\10\10\0\6\10\1\353\7\10\27\0\11\10\2\0"+ - "\7\10\1\0\2\10\1\0\5\10\10\0\2\10\1\354"+ - "\13\10\27\0\11\10\2\0\7\10\1\0\2\10\1\0"+ - "\5\10\10\0\10\10\1\355\5\10\27\0\11\10\2\0"+ - "\7\10\1\0\2\10\1\0\5\10\10\0\7\10\1\356"+ - "\6\10\27\0\11\10\2\0\7\10\1\0\2\10\1\0"+ - "\5\10\10\0\3\10\1\357\12\10\26\0\34\246\1\360"+ - "\1\361\162\246\145\251\1\362\1\363\51\251\1\0\11\10"+ - "\2\0\7\10\1\0\2\10\1\0\5\10\10\0\4\10"+ - "\1\364\11\10\27\0\11\10\2\0\7\10\1\0\2\10"+ - "\1\0\5\10\10\0\4\10\1\365\11\10\27\0\11\10"+ - "\2\0\7\10\1\0\1\366\1\10\1\0\5\10\10\0"+ - "\16\10\27\0\11\10\2\0\7\10\1\0\2\10\1\0"+ - "\5\10\10\0\4\10\1\367\11\10\27\0\11\10\2\0"+ - "\7\10\1\0\2\10\1\0\5\10\10\0\2\10\1\370"+ - "\13\10\27\0\11\10\2\0\7\10\1\0\2\10\1\0"+ - "\5\10\10\0\1\371\15\10\27\0\11\10\2\0\7\10"+ - "\1\0\1\372\1\10\1\0\5\10\10\0\16\10\62\0"+ - "\1\373\111\0\1\374\51\0\34\275\1\375\1\376\162\275"+ - "\145\300\1\377\1\u0100\51\300\34\0\1\u0101\111\0\1\u0102"+ - "\51\0\34\303\1\u0103\1\u0104\162\303\145\304\1\u0105\1\u0106"+ - "\51\304\1\0\10\10\1\u0107\2\0\7\10\1\0\2\10"+ - "\1\0\5\10\10\0\16\10\62\0\1\246\111\0\1\251"+ - "\52\0\11\10\2\0\7\10\1\0\2\10\1\0\5\10"+ - "\10\0\1\u0108\15\10\27\0\11\10\2\0\7\10\1\0"+ - "\2\10\1\0\5\10\10\0\5\10\1\u0109\10\10\27\0"+ + "\10\0\5\10\1\317\10\10\27\0\11\10\2\0\7\10"+ + "\1\0\2\10\1\0\5\10\10\0\3\10\1\320\12\10"+ + "\63\0\1\250\1\0\2\251\1\0\2\137\44\0\34\247"+ + "\1\321\1\322\52\247\35\252\1\323\1\324\51\252\1\0"+ + "\11\10\2\0\7\10\1\0\1\325\1\10\1\0\5\10"+ + "\10\0\16\10\27\0\11\10\2\0\7\10\1\0\2\10"+ + "\1\0\4\10\1\326\10\0\16\10\27\0\11\10\2\0"+ + "\7\10\1\0\2\10\1\0\5\10\10\0\3\10\1\327"+ + "\12\10\27\0\6\10\1\330\2\10\2\0\7\10\1\0"+ + "\2\10\1\0\5\10\10\0\16\10\27\0\11\10\2\0"+ + "\7\10\1\0\2\10\1\0\5\10\10\0\3\10\1\331"+ + "\12\10\27\0\10\10\1\332\2\0\7\10\1\0\2\10"+ + "\1\0\5\10\10\0\16\10\27\0\7\10\1\333\1\10"+ + "\2\0\7\10\1\0\2\10\1\0\5\10\10\0\16\10"+ + "\27\0\10\10\1\334\2\0\7\10\1\0\2\10\1\0"+ + "\5\10\10\0\16\10\62\0\1\335\1\0\1\336\106\0"+ + "\1\277\1\0\2\300\1\0\2\207\44\0\34\276\1\337"+ + "\1\340\52\276\35\301\1\341\1\342\51\301\1\0\11\10"+ + "\2\0\7\10\1\0\2\10\1\0\5\10\1\343\1\0"+ + "\1\344\5\0\16\10\26\0\34\304\1\345\1\346\52\304"+ + "\35\305\1\347\1\350\51\305\1\0\10\10\1\351\2\0"+ + "\7\10\1\0\2\10\1\0\5\10\10\0\16\10\62\0"+ + "\1\352\111\0\1\353\52\0\11\10\2\0\7\10\1\0"+ + "\2\10\1\0\5\10\10\0\6\10\1\354\7\10\27\0"+ "\11\10\2\0\7\10\1\0\2\10\1\0\5\10\10\0"+ - "\1\10\1\u010a\14\10\26\0\34\246\1\u010b\1\361\106\246"+ - "\1\u010c\1\361\52\246\35\251\1\362\1\u010d\106\251\1\362"+ - "\1\u010b\51\251\1\0\11\10\2\0\7\10\1\0\2\10"+ - "\1\0\5\10\10\0\5\10\1\u010e\10\10\27\0\11\10"+ - "\2\0\7\10\1\0\2\10\1\0\5\10\10\0\1\10"+ - "\1\u010f\14\10\27\0\11\10\2\0\7\10\1\0\2\10"+ - "\1\0\5\10\10\0\5\10\1\u0110\10\10\27\0\10\10"+ - "\1\u0111\2\0\7\10\1\0\2\10\1\0\5\10\10\0"+ - "\16\10\62\0\1\275\111\0\1\300\51\0\34\275\1\u0112"+ - "\1\376\106\275\1\u0113\1\376\52\275\35\300\1\377\1\u0114"+ - "\106\300\1\377\1\u0112\51\300\34\303\1\u0115\1\u0104\106\303"+ - "\1\u0116\1\u0104\52\303\35\304\1\u0105\1\u0117\106\304\1\u0105"+ - "\1\u0115\51\304\1\0\11\10\2\0\7\10\1\0\2\10"+ - "\1\0\5\10\10\0\11\10\1\u0118\4\10\27\0\11\10"+ - "\2\0\7\10\1\0\2\10\1\0\4\10\1\u0119\10\0"+ - "\16\10\63\0\1\u011a\1\0\2\u011b\1\0\2\u011c\44\0"+ - "\34\246\1\u011d\1\361\52\246\35\251\1\362\1\u011e\51\251"+ - "\34\275\1\u011f\1\376\52\275\35\300\1\377\1\u0120\51\300"+ - "\34\303\1\u0121\1\u0104\52\303\35\304\1\u0105\1\u0122\51\304"+ - "\1\0\11\10\2\0\7\10\1\0\1\u0123\1\10\1\0"+ - "\5\10\10\0\16\10\26\0\34\246\1\u0124\1\361\52\246"+ - "\35\251\1\362\1\u0125\51\251\34\275\1\u0126\1\376\52\275"+ - "\35\300\1\377\1\u0127\51\300\34\303\1\u0128\1\u0104\52\303"+ - "\35\304\1\u0105\1\u0129\51\304"; + "\2\10\1\355\13\10\27\0\11\10\2\0\7\10\1\0"+ + "\2\10\1\0\5\10\10\0\10\10\1\356\5\10\27\0"+ + "\11\10\2\0\7\10\1\0\2\10\1\0\5\10\10\0"+ + "\7\10\1\357\6\10\27\0\11\10\2\0\7\10\1\0"+ + "\2\10\1\0\5\10\10\0\3\10\1\360\12\10\26\0"+ + "\34\247\1\361\1\362\162\247\145\252\1\363\1\364\51\252"+ + "\1\0\11\10\2\0\7\10\1\0\2\10\1\0\5\10"+ + "\10\0\4\10\1\365\11\10\27\0\11\10\2\0\7\10"+ + "\1\0\2\10\1\0\5\10\10\0\4\10\1\366\11\10"+ + "\27\0\11\10\2\0\7\10\1\0\1\367\1\10\1\0"+ + "\5\10\10\0\16\10\27\0\11\10\2\0\7\10\1\0"+ + "\2\10\1\0\5\10\10\0\4\10\1\370\11\10\27\0"+ + "\11\10\2\0\7\10\1\0\2\10\1\0\5\10\10\0"+ + "\2\10\1\371\13\10\27\0\11\10\2\0\7\10\1\0"+ + "\2\10\1\0\5\10\10\0\1\372\15\10\27\0\11\10"+ + "\2\0\7\10\1\0\1\373\1\10\1\0\5\10\10\0"+ + "\16\10\62\0\1\374\111\0\1\375\51\0\34\276\1\376"+ + "\1\377\162\276\145\301\1\u0100\1\u0101\51\301\34\0\1\u0102"+ + "\111\0\1\u0103\51\0\34\304\1\u0104\1\u0105\162\304\145\305"+ + "\1\u0106\1\u0107\51\305\1\0\10\10\1\u0108\2\0\7\10"+ + "\1\0\2\10\1\0\5\10\10\0\16\10\62\0\1\247"+ + "\111\0\1\252\52\0\11\10\2\0\7\10\1\0\2\10"+ + "\1\0\5\10\10\0\1\u0109\15\10\27\0\11\10\2\0"+ + "\7\10\1\0\2\10\1\0\5\10\10\0\5\10\1\u010a"+ + "\10\10\27\0\11\10\2\0\7\10\1\0\2\10\1\0"+ + "\5\10\10\0\1\10\1\u010b\14\10\26\0\34\247\1\u010c"+ + "\1\362\106\247\1\u010d\1\362\52\247\35\252\1\363\1\u010e"+ + "\106\252\1\363\1\u010c\51\252\1\0\11\10\2\0\7\10"+ + "\1\0\2\10\1\0\5\10\10\0\5\10\1\u010f\10\10"+ + "\27\0\11\10\2\0\7\10\1\0\2\10\1\0\5\10"+ + "\10\0\1\10\1\u0110\14\10\27\0\11\10\2\0\7\10"+ + "\1\0\2\10\1\0\5\10\10\0\5\10\1\u0111\10\10"+ + "\27\0\10\10\1\u0112\2\0\7\10\1\0\2\10\1\0"+ + "\5\10\10\0\16\10\62\0\1\276\111\0\1\301\51\0"+ + "\34\276\1\u0113\1\377\106\276\1\u0114\1\377\52\276\35\301"+ + "\1\u0100\1\u0115\106\301\1\u0100\1\u0113\51\301\34\304\1\u0116"+ + "\1\u0105\106\304\1\u0117\1\u0105\52\304\35\305\1\u0106\1\u0118"+ + "\106\305\1\u0106\1\u0116\51\305\1\0\11\10\2\0\7\10"+ + "\1\0\2\10\1\0\5\10\10\0\11\10\1\u0119\4\10"+ + "\27\0\11\10\2\0\7\10\1\0\2\10\1\0\4\10"+ + "\1\u011a\10\0\16\10\63\0\1\u011b\1\0\2\u011c\1\0"+ + "\2\u011d\44\0\34\247\1\u011e\1\362\52\247\35\252\1\363"+ + "\1\u011f\51\252\34\276\1\u0120\1\377\52\276\35\301\1\u0100"+ + "\1\u0121\51\301\34\304\1\u0122\1\u0105\52\304\35\305\1\u0106"+ + "\1\u0123\51\305\1\0\11\10\2\0\7\10\1\0\1\u0124"+ + "\1\10\1\0\5\10\10\0\16\10\26\0\34\247\1\u0125"+ + "\1\362\52\247\35\252\1\363\1\u0126\51\252\34\276\1\u0127"+ + "\1\377\52\276\35\301\1\u0100\1\u0128\51\301\34\304\1\u0129"+ + "\1\u0105\52\304\35\305\1\u0106\1\u012a\51\305"; private static int [] zzUnpackTrans() { - int [] result = new int[15120]; + int [] result = new int[15192]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; @@ -608,9 +675,9 @@ class _PythonLexer implements FlexLexer { private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\3\0\1\11\16\1\1\11\1\1\5\11\25\1\14\11"+ + "\3\0\1\11\16\1\1\11\1\1\5\11\26\1\13\11"+ "\4\1\1\11\10\1\4\0\1\11\1\1\1\0\1\11"+ - "\11\1\1\11\5\1\1\11\22\1\3\11\1\1\1\11"+ + "\11\1\1\11\5\1\1\11\22\1\3\11\1\1\2\11"+ "\1\1\5\11\1\1\2\11\1\1\1\11\1\0\3\1"+ "\1\11\13\1\2\0\1\11\4\1\1\0\15\1\1\11"+ "\1\0\16\1\4\11\1\0\2\1\1\11\1\0\2\1"+ @@ -620,7 +687,7 @@ class _PythonLexer implements FlexLexer { "\1\11\4\1\1\11\1\0\1\11\6\0\7\1"; private static int [] zzUnpackAttribute() { - int [] result = new int[297]; + int [] result = new int[298]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; @@ -713,7 +780,7 @@ return yylength()-s.length(); char [] map = new char[0x10000]; int i = 0; /* index in packed string */ int j = 0; /* index in unpacked array */ - while (i < 3338) { + while (i < 4678) { int count = packed.charAt(i++); char value = packed.charAt(i++); do map[j++] = value; while (--count > 0); @@ -935,410 +1002,414 @@ return yylength()-s.length(); zzMarkedPos = zzMarkedPosL; switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { - case 89: + case 90: { return PyTokenTypes.YIELD_KEYWORD; } - case 100: break; - case 84: + case 101: break; + case 85: { yypushback(getSpaceLength(yytext())); if (zzCurrentPos != 0) return PyTokenTypes.TRIPLE_QUOTED_STRING; yybegin(PENDING_DOCSTRING); return PyTokenTypes.DOCSTRING; } - case 101: break; + case 102: break; case 2: { return PyTokenTypes.INTEGER_LITERAL; } - case 102: break; - case 17: - { return PyTokenTypes.DIV; - } case 103: break; case 18: - { return PyTokenTypes.PERC; + { return PyTokenTypes.DIV; } case 104: break; + case 19: + { return PyTokenTypes.PERC; + } + case 105: break; case 8: { return PyTokenTypes.BACKSLASH; } - case 105: break; - case 26: + case 106: break; + case 27: { return PyTokenTypes.RPAR; } - case 106: break; + case 107: break; case 1: { return PyTokenTypes.BAD_CHARACTER; } - case 107: break; - case 29: + case 108: break; + case 30: { return PyTokenTypes.LBRACE; } - case 108: break; - case 35: - { yypushback(1); yybegin(YYINITIAL); - } case 109: break; - case 71: + case 72: { yybegin(IN_DOCSTRING_OWNER); return PyTokenTypes.DEF_KEYWORD; } case 110: break; - case 87: - { yybegin(IN_DOCSTRING_OWNER); return PyTokenTypes.CLASS_KEYWORD; + case 35: + { yypushback(1); yybegin(YYINITIAL); } case 111: break; - case 79: - { yypushback(getSpaceLength(yytext())); return PyTokenTypes.DOCSTRING; + case 88: + { yybegin(IN_DOCSTRING_OWNER); return PyTokenTypes.CLASS_KEYWORD; } case 112: break; + case 80: + { yypushback(getSpaceLength(yytext())); return PyTokenTypes.DOCSTRING; + } + case 113: break; case 6: { return PyTokenTypes.MINUS; } - case 113: break; + case 114: break; case 7: { if (zzInput == YYEOF && zzStartRead == 0) return PyTokenTypes.DOCSTRING; else return PyTokenTypes.SINGLE_QUOTED_STRING; } - case 114: break; - case 86: + case 115: break; + case 87: { return PyTokenTypes.BREAK_KEYWORD; } - case 115: break; - case 28: + case 116: break; + case 29: { return PyTokenTypes.RBRACKET; } - case 116: break; - case 64: + case 117: break; + case 65: { yypushback(getSpaceLength(yytext())); yybegin(YYINITIAL); return PyTokenTypes.DOCSTRING; } - case 117: break; + case 118: break; case 5: { return PyTokenTypes.DOT; } - case 118: break; + case 119: break; case 3: { return PyTokenTypes.IDENTIFIER; } - case 119: break; - case 25: + case 120: break; + case 26: { return PyTokenTypes.LPAR; } - case 120: break; - case 23: + case 121: break; + case 24: { return PyTokenTypes.LT; } - case 121: break; + case 122: break; case 46: { return PyTokenTypes.IN_KEYWORD; } - case 122: break; - case 88: + case 123: break; + case 89: { return PyTokenTypes.RAISE_KEYWORD; } - case 123: break; - case 76: + case 124: break; + case 77: { return PyTokenTypes.GTGTEQ; } - case 124: break; + case 125: break; case 9: { return PyTokenTypes.SPACE; } - case 125: break; - case 92: + case 126: break; + case 93: { return PyTokenTypes.EXCEPT_KEYWORD; } - case 126: break; + case 127: break; case 41: { return PyTokenTypes.IMAGINARY_LITERAL; } - case 127: break; + case 128: break; case 39: { return PyTokenTypes.SINGLE_QUOTED_STRING; } - case 128: break; + case 129: break; case 11: { return PyTokenTypes.FORMFEED; } - case 129: break; + case 130: break; case 13: { return PyTokenTypes.SEMICOLON; } - case 130: break; - case 22: + case 131: break; + case 23: { return PyTokenTypes.GT; } - case 131: break; - case 27: + case 132: break; + case 28: { return PyTokenTypes.LBRACKET; } - case 132: break; + case 133: break; case 33: { return PyTokenTypes.COLON; } - case 133: break; - case 77: + case 134: break; + case 78: { return PyTokenTypes.LTLTEQ; } - case 134: break; - case 82: - { return PyTokenTypes.ELSE_KEYWORD; - } case 135: break; - case 20: - { return PyTokenTypes.OR; + case 52: + { return PyTokenTypes.ATEQ; } case 136: break; - case 68: + case 83: + { return PyTokenTypes.ELSE_KEYWORD; + } + case 137: break; + case 21: + { return PyTokenTypes.OR; + } + case 138: break; + case 69: { yypushback(getSpaceLength(yytext())); if (zzCurrentPos != 0) return PyTokenTypes.SINGLE_QUOTED_STRING; yybegin(PENDING_DOCSTRING); return PyTokenTypes.DOCSTRING; } - case 137: break; - case 67: + case 139: break; + case 68: { if (zzInput == YYEOF && zzStartRead == 0) return PyTokenTypes.DOCSTRING; else return PyTokenTypes.TRIPLE_QUOTED_STRING; } - case 138: break; + case 140: break; case 50: { return PyTokenTypes.MULTEQ; } - case 139: break; - case 97: + case 141: break; + case 98: { return PyTokenTypes.FINALLY_KEYWORD; } - case 140: break; - case 90: + case 142: break; + case 91: { return PyTokenTypes.WHILE_KEYWORD; } - case 141: break; + case 143: break; case 16: { return PyTokenTypes.MULT; } - case 142: break; - case 93: + case 144: break; + case 94: { return PyTokenTypes.ASSERT_KEYWORD; } - case 143: break; - case 53: + case 145: break; + case 54: { return PyTokenTypes.FLOORDIV; } - case 144: break; - case 96: + case 146: break; + case 97: { return PyTokenTypes.GLOBAL_KEYWORD; } - case 145: break; + case 147: break; case 37: { if (zzInput == YYEOF) return PyTokenTypes.DOCSTRING; else yybegin(YYINITIAL); return PyTokenTypes.SINGLE_QUOTED_STRING; } - case 146: break; - case 91: + case 148: break; + case 92: { return PyTokenTypes.LAMBDA_KEYWORD; } - case 147: break; - case 57: + case 149: break; + case 58: { return PyTokenTypes.XOREQ; } - case 148: break; - case 66: + case 150: break; + case 67: { return PyTokenTypes.FOR_KEYWORD; } - case 149: break; - case 31: + case 151: break; + case 17: { return PyTokenTypes.AT; } - case 150: break; - case 70: + case 152: break; + case 71: { return PyTokenTypes.NOT_KEYWORD; } - case 151: break; + case 153: break; case 14: { return PyTokenTypes.PLUS; } - case 152: break; + case 154: break; case 43: { return PyTokenTypes.MINUSEQ; } - case 153: break; - case 63: + case 155: break; + case 64: { return PyTokenTypes.NE; } - case 154: break; + case 156: break; case 32: { return PyTokenTypes.COMMA; } - case 155: break; + case 157: break; case 49: { return PyTokenTypes.EQEQ; } - case 156: break; + case 158: break; case 34: { return PyTokenTypes.TICK; } - case 157: break; + case 159: break; case 51: { return PyTokenTypes.EXP; } - case 158: break; - case 80: + case 160: break; + case 81: { return PyTokenTypes.TRIPLE_QUOTED_STRING; } - case 159: break; - case 99: + case 161: break; + case 100: { return PyTokenTypes.CONTINUE_KEYWORD; } - case 160: break; - case 62: + case 162: break; + case 63: { return PyTokenTypes.LTLT; } - case 161: break; - case 60: + case 163: break; + case 61: { return PyTokenTypes.LE; } - case 162: break; - case 69: + case 164: break; + case 70: { return PyTokenTypes.AND_KEYWORD; } - case 163: break; + case 165: break; case 42: { return PyTokenTypes.OR_KEYWORD; } - case 164: break; + case 166: break; case 4: { if (zzCurrentPos == 0) yybegin(PENDING_DOCSTRING); return PyTokenTypes.END_OF_LINE_COMMENT; } - case 165: break; + case 167: break; case 44: { yypushback(getSpaceLength(yytext())); if (zzCurrentPos != 0) return PyTokenTypes.SINGLE_QUOTED_STRING; return PyTokenTypes.DOCSTRING; } - case 166: break; - case 85: + case 168: break; + case 86: { return PyTokenTypes.PASS_KEYWORD; } - case 167: break; - case 65: + case 169: break; + case 66: { yypushback(yylength()-1); yybegin(PENDING_DOCSTRING); return PyTokenTypes.COLON; } - case 168: break; + case 170: break; case 36: { return PyTokenTypes.END_OF_LINE_COMMENT; } - case 169: break; - case 98: + case 171: break; + case 99: { yypushback(getSpaceLength(yytext())); if (zzCurrentPos != 0) return PyTokenTypes.TRIPLE_QUOTED_STRING; return PyTokenTypes.DOCSTRING; } - case 170: break; - case 56: + case 172: break; + case 57: { return PyTokenTypes.OREQ; } - case 171: break; - case 59: + case 173: break; + case 60: { return PyTokenTypes.GTGT; } - case 172: break; - case 19: + case 174: break; + case 20: { return PyTokenTypes.AND; } - case 173: break; - case 52: + case 175: break; + case 53: { return PyTokenTypes.DIVEQ; } - case 174: break; - case 94: + case 176: break; + case 95: { return PyTokenTypes.RETURN_KEYWORD; } - case 175: break; - case 95: + case 177: break; + case 96: { return PyTokenTypes.IMPORT_KEYWORD; } - case 176: break; - case 58: + case 178: break; + case 59: { return PyTokenTypes.GE; } - case 177: break; + case 179: break; case 48: { return PyTokenTypes.PLUSEQ; } - case 178: break; - case 78: + case 180: break; + case 79: { if (zzInput == YYEOF) return PyTokenTypes.DOCSTRING; else yybegin(YYINITIAL); return PyTokenTypes.TRIPLE_QUOTED_STRING; } - case 179: break; + case 181: break; case 47: { return PyTokenTypes.IS_KEYWORD; } - case 180: break; - case 75: + case 182: break; + case 76: { return PyTokenTypes.FLOORDIVEQ; } - case 181: break; + case 183: break; case 40: { return PyTokenTypes.FLOAT_LITERAL; } - case 182: break; + case 184: break; case 38: { return PyTokenTypes.LINE_BREAK; } - case 183: break; - case 54: - { return PyTokenTypes.PERCEQ; - } - case 184: break; - case 73: - { return PyTokenTypes.TRY_KEYWORD; - } case 185: break; case 55: - { return PyTokenTypes.ANDEQ; + { return PyTokenTypes.PERCEQ; } case 186: break; + case 74: + { return PyTokenTypes.TRY_KEYWORD; + } + case 187: break; + case 56: + { return PyTokenTypes.ANDEQ; + } + case 188: break; case 15: { return PyTokenTypes.EQ; } - case 187: break; - case 81: + case 189: break; + case 82: { return PyTokenTypes.FROM_KEYWORD; } - case 188: break; + case 190: break; case 12: { if (zzCurrentPos == 0) yybegin(PENDING_DOCSTRING); return PyTokenTypes.LINE_BREAK; } - case 189: break; - case 74: + case 191: break; + case 75: { return PyTokenTypes.EXPEQ; } - case 190: break; - case 83: + case 192: break; + case 84: { return PyTokenTypes.ELIF_KEYWORD; } - case 191: break; - case 30: + case 193: break; + case 31: { return PyTokenTypes.RBRACE; } - case 192: break; + case 194: break; case 45: { return PyTokenTypes.IF_KEYWORD; } - case 193: break; + case 195: break; case 10: { return PyTokenTypes.TAB; } - case 194: break; - case 61: + case 196: break; + case 62: { return PyTokenTypes.NE_OLD; } - case 195: break; - case 24: + case 197: break; + case 25: { return PyTokenTypes.TILDE; } - case 196: break; - case 72: + case 198: break; + case 73: { return PyTokenTypes.DEL_KEYWORD; } - case 197: break; - case 21: + case 199: break; + case 22: { return PyTokenTypes.XOR; } - case 198: break; + case 200: break; default: if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { zzAtEOF = true; diff --git a/python/psi-api/src/com/jetbrains/python/PyTokenTypes.java b/python/psi-api/src/com/jetbrains/python/PyTokenTypes.java index 630668388aed..f1f73a969fd9 100644 --- a/python/psi-api/src/com/jetbrains/python/PyTokenTypes.java +++ b/python/psi-api/src/com/jetbrains/python/PyTokenTypes.java @@ -128,6 +128,7 @@ public class PyTokenTypes { public static final PyElementType PLUSEQ = new PyElementType("PLUSEQ");// += public static final PyElementType MINUSEQ = new PyElementType("MINUSEQ");// -= public static final PyElementType MULTEQ = new PyElementType("MULTEQ");// *= + public static final PyElementType ATEQ = new PyElementType("ATEQ"); // @= public static final PyElementType DIVEQ = new PyElementType("DIVEQ"); // /= public static final PyElementType FLOORDIVEQ = new PyElementType("FLOORDIVEQ"); // //= public static final PyElementType PERCEQ = new PyElementType("PERCEQ");// %= @@ -139,10 +140,10 @@ public class PyTokenTypes { public static final PyElementType EXPEQ = new PyElementType("EXPEQ");// **= public static final TokenSet OPERATIONS = TokenSet.create( - PLUS, MINUS, MULT, EXP, DIV, FLOORDIV, PERC, LTLT, GTGT, AND, OR, + PLUS, MINUS, MULT, AT, EXP, DIV, FLOORDIV, PERC, LTLT, GTGT, AND, OR, XOR, TILDE, LT, GT, LE, GE, EQEQ, NE, NE_OLD, AT, COLON, TICK, EQ, PLUSEQ, MINUSEQ, - MULTEQ, DIVEQ, FLOORDIVEQ, PERCEQ, ANDEQ, OREQ, XOREQ, LTLTEQ, GTGTEQ, + MULTEQ, ATEQ, DIVEQ, FLOORDIVEQ, PERCEQ, ANDEQ, OREQ, XOREQ, LTLTEQ, GTGTEQ, EXPEQ); public static final TokenSet COMPARISON_OPERATIONS = TokenSet.create( @@ -150,8 +151,8 @@ public class PyTokenTypes { public static final TokenSet SHIFT_OPERATIONS = TokenSet.create(LTLT, GTGT); public static final TokenSet ADDITIVE_OPERATIONS = TokenSet.create(PLUS, MINUS); - public static final TokenSet MULTIPLICATIVE_OPERATIONS = TokenSet.create(MULT, FLOORDIV, DIV, PERC); - public static final TokenSet MULTIPLICATIVE_OR_EXP = TokenSet.create(MULT, FLOORDIV, DIV, PERC, EXP); + public static final TokenSet MULTIPLICATIVE_OPERATIONS = TokenSet.create(MULT, AT, FLOORDIV, DIV, PERC); + public static final TokenSet MULTIPLICATIVE_OR_EXP = TokenSet.create(MULT, AT, FLOORDIV, DIV, PERC, EXP); public static final TokenSet UNARY_OPERATIONS = TokenSet.create(PLUS, MINUS, TILDE); public static final TokenSet BITWISE_OPERATIONS = TokenSet.create(AND, OR, XOR); public static final TokenSet EQUALITY_OPERATIONS = TokenSet.create(EQEQ, NE, NE_OLD); @@ -162,7 +163,7 @@ public class PyTokenTypes { public static final TokenSet OPEN_BRACES = TokenSet.create(LBRACKET, LBRACE, LPAR); public static final TokenSet CLOSE_BRACES = TokenSet.create(RBRACKET, RBRACE, RPAR); - public static final TokenSet AUG_ASSIGN_OPERATIONS = TokenSet.create(PLUSEQ, MINUSEQ, MULTEQ, DIVEQ, + public static final TokenSet AUG_ASSIGN_OPERATIONS = TokenSet.create(PLUSEQ, MINUSEQ, MULTEQ, ATEQ, DIVEQ, PERCEQ, EXPEQ, GTGTEQ, LTLTEQ, ANDEQ, OREQ, XOREQ, FLOORDIVEQ); public static final PyElementType BACKSLASH = new PyElementType("BACKSLASH"); diff --git a/python/src/com/jetbrains/python/PyElementTypes.java b/python/src/com/jetbrains/python/PyElementTypes.java index 7a713524f6c4..400e21b178c7 100644 --- a/python/src/com/jetbrains/python/PyElementTypes.java +++ b/python/src/com/jetbrains/python/PyElementTypes.java @@ -127,7 +127,8 @@ public interface PyElementTypes { PyTokenTypes.OR, PyTokenTypes.XOR, PyTokenTypes.AND, PyTokenTypes.LTLT, PyTokenTypes.GTGT, PyTokenTypes.EQEQ, PyTokenTypes.GE, PyTokenTypes.LE, PyTokenTypes.NE, PyTokenTypes.NE_OLD, PyTokenTypes.IN_KEYWORD, PyTokenTypes.IS_KEYWORD, PyTokenTypes.NOT_KEYWORD, PyTokenTypes.PLUS, - PyTokenTypes.MINUS, PyTokenTypes.MULT, PyTokenTypes.FLOORDIV, PyTokenTypes.DIV, PyTokenTypes.PERC, PyTokenTypes.EXP); + PyTokenTypes.MINUS, PyTokenTypes.MULT, PyTokenTypes.AT, PyTokenTypes.FLOORDIV, PyTokenTypes.DIV, + PyTokenTypes.PERC, PyTokenTypes.EXP); TokenSet UNARY_OPS = TokenSet.create(PyTokenTypes.NOT_KEYWORD, PyTokenTypes.PLUS, PyTokenTypes.MINUS, PyTokenTypes.TILDE); diff --git a/python/src/com/jetbrains/python/lexer/Python.flex b/python/src/com/jetbrains/python/lexer/Python.flex index 07a627d8e15f..8755304365ba 100644 --- a/python/src/com/jetbrains/python/lexer/Python.flex +++ b/python/src/com/jetbrains/python/lexer/Python.flex @@ -160,6 +160,7 @@ return PyTokenTypes.DOCSTRING; } "-=" { return PyTokenTypes.MINUSEQ; } "**=" { return PyTokenTypes.EXPEQ; } "*=" { return PyTokenTypes.MULTEQ; } +"@=" { return PyTokenTypes.ATEQ; } "//=" { return PyTokenTypes.FLOORDIVEQ; } "/=" { return PyTokenTypes.DIVEQ; } "%=" { return PyTokenTypes.PERCEQ; } diff --git a/python/testData/psi/MatMul.py b/python/testData/psi/MatMul.py new file mode 100644 index 000000000000..4cd35008d8af --- /dev/null +++ b/python/testData/psi/MatMul.py @@ -0,0 +1,5 @@ +x @ y +x @ y @ z +x @ y * z +x + y @ z +z @= x diff --git a/python/testData/psi/MatMul.txt b/python/testData/psi/MatMul.txt new file mode 100644 index 000000000000..44ff4ee93774 --- /dev/null +++ b/python/testData/psi/MatMul.txt @@ -0,0 +1,67 @@ +PyFile:MatMul.py + PyExpressionStatement + PyBinaryExpression + PyReferenceExpression: x + PsiElement(Py:IDENTIFIER)('x') + PsiWhiteSpace(' ') + PsiElement(Py:AT)('@') + PsiWhiteSpace(' ') + PyReferenceExpression: y + PsiElement(Py:IDENTIFIER)('y') + PsiWhiteSpace('\n') + PyExpressionStatement + PyBinaryExpression + PyBinaryExpression + PyReferenceExpression: x + PsiElement(Py:IDENTIFIER)('x') + PsiWhiteSpace(' ') + PsiElement(Py:AT)('@') + PsiWhiteSpace(' ') + PyReferenceExpression: y + PsiElement(Py:IDENTIFIER)('y') + PsiWhiteSpace(' ') + PsiElement(Py:AT)('@') + PsiWhiteSpace(' ') + PyReferenceExpression: z + PsiElement(Py:IDENTIFIER)('z') + PsiWhiteSpace('\n') + PyExpressionStatement + PyBinaryExpression + PyBinaryExpression + PyReferenceExpression: x + PsiElement(Py:IDENTIFIER)('x') + PsiWhiteSpace(' ') + PsiElement(Py:AT)('@') + PsiWhiteSpace(' ') + PyReferenceExpression: y + PsiElement(Py:IDENTIFIER)('y') + PsiWhiteSpace(' ') + PsiElement(Py:MULT)('*') + PsiWhiteSpace(' ') + PyReferenceExpression: z + PsiElement(Py:IDENTIFIER)('z') + PsiWhiteSpace('\n') + PyExpressionStatement + PyBinaryExpression + PyReferenceExpression: x + PsiElement(Py:IDENTIFIER)('x') + PsiWhiteSpace(' ') + PsiElement(Py:PLUS)('+') + PsiWhiteSpace(' ') + PyBinaryExpression + PyReferenceExpression: y + PsiElement(Py:IDENTIFIER)('y') + PsiWhiteSpace(' ') + PsiElement(Py:AT)('@') + PsiWhiteSpace(' ') + PyReferenceExpression: z + PsiElement(Py:IDENTIFIER)('z') + PsiWhiteSpace('\n') + PyAugAssignmentStatement + PyReferenceExpression: z + PsiElement(Py:IDENTIFIER)('z') + PsiWhiteSpace(' ') + PsiElement(Py:ATEQ)('@=') + PsiWhiteSpace(' ') + PyReferenceExpression: x + PsiElement(Py:IDENTIFIER)('x') \ No newline at end of file diff --git a/python/testSrc/com/jetbrains/python/PythonParsingTest.java b/python/testSrc/com/jetbrains/python/PythonParsingTest.java index 9bdc65e52428..ecc415216428 100644 --- a/python/testSrc/com/jetbrains/python/PythonParsingTest.java +++ b/python/testSrc/com/jetbrains/python/PythonParsingTest.java @@ -468,6 +468,11 @@ public class PythonParsingTest extends ParsingTestCase { doTest(); } + // PY-15390 + public void testMatMul() { + doTest(LanguageLevel.PYTHON35); + } + public void doTest(LanguageLevel languageLevel) { LanguageLevel prev = myLanguageLevel; myLanguageLevel = languageLevel; From 186032ab9d0fa06c8cd541b29990d7487ee05c5a Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Tue, 24 Mar 2015 18:08:29 +0300 Subject: [PATCH 05/11] Added PyAugAssignmentStatement.getOperator() There was no public API for accessing the operator of an augmented assignment expression, the *Impl class was used instead which is a bad practice. --- .../com/jetbrains/python/psi/PyAugAssignmentStatement.java | 3 +++ .../python/refactoring/inline/PyInlineLocalHandler.java | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/python/psi-api/src/com/jetbrains/python/psi/PyAugAssignmentStatement.java b/python/psi-api/src/com/jetbrains/python/psi/PyAugAssignmentStatement.java index 17ea926fb536..46d483ca7104 100644 --- a/python/psi-api/src/com/jetbrains/python/psi/PyAugAssignmentStatement.java +++ b/python/psi-api/src/com/jetbrains/python/psi/PyAugAssignmentStatement.java @@ -15,6 +15,7 @@ */ package com.jetbrains.python.psi; +import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -26,4 +27,6 @@ public interface PyAugAssignmentStatement extends PyStatement { PyExpression getTarget(); @Nullable PyExpression getValue(); + @Nullable + PsiElement getOperation(); } diff --git a/python/src/com/jetbrains/python/refactoring/inline/PyInlineLocalHandler.java b/python/src/com/jetbrains/python/refactoring/inline/PyInlineLocalHandler.java index 82f42fdf9afa..910f35c3c570 100644 --- a/python/src/com/jetbrains/python/refactoring/inline/PyInlineLocalHandler.java +++ b/python/src/com/jetbrains/python/refactoring/inline/PyInlineLocalHandler.java @@ -50,7 +50,6 @@ import com.jetbrains.python.PythonLanguage; import com.jetbrains.python.codeInsight.controlflow.ReadWriteInstruction; import com.jetbrains.python.codeInsight.controlflow.ScopeOwner; import com.jetbrains.python.psi.*; -import com.jetbrains.python.psi.impl.PyAugAssignmentStatementImpl; import com.jetbrains.python.psi.impl.PyPsiUtils; import com.jetbrains.python.refactoring.PyDefUseUtil; import com.jetbrains.python.refactoring.PyReplaceExpressionUtil; @@ -315,8 +314,8 @@ public class PyInlineLocalHandler extends InlineActionHandler { private static PyExpression prepareValue(@NotNull PyStatement def, @NotNull String localName, @NotNull Project project) { final PyExpression value = getValue(def); assert value != null; - if (def instanceof PyAugAssignmentStatementImpl) { - final PyAugAssignmentStatementImpl expression = (PyAugAssignmentStatementImpl)def; + if (def instanceof PyAugAssignmentStatement) { + final PyAugAssignmentStatement expression = (PyAugAssignmentStatement)def; final PsiElement operation = expression.getOperation(); assert operation != null; final String op = operation.getText().replace('=', ' '); From 2a3a64e3d05846ddcec11e7ec944e9d93150a2c9 Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Tue, 24 Mar 2015 18:19:33 +0300 Subject: [PATCH 06/11] Compatibility inspection reports warnings for '@' and '@=' in Python < 3.5 (PY-15390) --- .../validation/CompatibilityVisitor.java | 29 +++++++++++++++++++ .../PyCompatibilityInspection/matMul.py | 2 ++ .../PyCompatibilityInspectionTest.java | 5 ++++ 3 files changed, 36 insertions(+) create mode 100644 python/testData/inspections/PyCompatibilityInspection/matMul.py diff --git a/python/src/com/jetbrains/python/validation/CompatibilityVisitor.java b/python/src/com/jetbrains/python/validation/CompatibilityVisitor.java index 4e60035be074..fb6d344475c7 100644 --- a/python/src/com/jetbrains/python/validation/CompatibilityVisitor.java +++ b/python/src/com/jetbrains/python/validation/CompatibilityVisitor.java @@ -22,6 +22,7 @@ import com.intellij.lang.ASTNode; import com.intellij.openapi.util.TextRange; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiWhiteSpace; +import com.intellij.psi.tree.IElementType; import com.intellij.psi.util.PsiTreeUtil; import com.intellij.psi.util.QualifiedName; import com.jetbrains.python.PyNames; @@ -195,6 +196,22 @@ public abstract class CompatibilityVisitor extends PyAnnotator { } commonRegisterProblem(message, " not support <>, use != instead.", len, node, new ReplaceNotEqOperatorQuickFix()); } + else if (node.isOperator("@")) { + checkMatrixMultiplicationOperator(node.getPsiOperator()); + } + } + + private void checkMatrixMultiplicationOperator(PsiElement node) { + boolean problem = false; + for (LanguageLevel level : myVersionsToProcess) { + if (level.isOlderThan(LanguageLevel.PYTHON35)) { + problem = true; + break; + } + } + if (problem) { + registerProblem(node, "Python versions < 3.5 do not support matrix multiplication operators"); + } } @Override @@ -542,6 +559,18 @@ public abstract class CompatibilityVisitor extends PyAnnotator { } } + @Override + public void visitPyAugAssignmentStatement(PyAugAssignmentStatement node) { + super.visitPyAugAssignmentStatement(node); + final PsiElement operation = node.getOperation(); + if (operation != null) { + final IElementType operationType = operation.getNode().getElementType(); + if (PyTokenTypes.ATEQ.equals(operationType)) { + checkMatrixMultiplicationOperator(operation); + } + } + } + private static class YieldVisitor extends PyElementVisitor { private boolean _haveYield = false; diff --git a/python/testData/inspections/PyCompatibilityInspection/matMul.py b/python/testData/inspections/PyCompatibilityInspection/matMul.py new file mode 100644 index 000000000000..d67dcc2221f8 --- /dev/null +++ b/python/testData/inspections/PyCompatibilityInspection/matMul.py @@ -0,0 +1,2 @@ +x @ y +x @= y diff --git a/python/testSrc/com/jetbrains/python/inspections/PyCompatibilityInspectionTest.java b/python/testSrc/com/jetbrains/python/inspections/PyCompatibilityInspectionTest.java index b46c523b0993..b941defb2b16 100644 --- a/python/testSrc/com/jetbrains/python/inspections/PyCompatibilityInspectionTest.java +++ b/python/testSrc/com/jetbrains/python/inspections/PyCompatibilityInspectionTest.java @@ -150,6 +150,11 @@ public class PyCompatibilityInspectionTest extends PyTestCase { doTest(); } + // PY-15390 + public void testMatMul() { + doTest(LanguageLevel.PYTHON35); + } + private void doTest(@NotNull LanguageLevel level) { runWithLanguageLevel(level, new Runnable() { @Override From 9f555474a76471424f489cee07b97a8089345ea5 Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Tue, 24 Mar 2015 18:30:08 +0300 Subject: [PATCH 07/11] Operator precedence for '@' (PY-15390) --- .../refactoring/PyReplaceExpressionUtil.java | 2 +- .../matrixMultiplication.after.py | 57 +++++++++++++++++++ .../python/refactoring/PyInlineLocalTest.java | 5 ++ 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 python/testData/refactoring/inlinelocal/operatorPrecedence/matrixMultiplication.after.py diff --git a/python/src/com/jetbrains/python/refactoring/PyReplaceExpressionUtil.java b/python/src/com/jetbrains/python/refactoring/PyReplaceExpressionUtil.java index 9b4c95f7d2b2..8aeba796877a 100644 --- a/python/src/com/jetbrains/python/refactoring/PyReplaceExpressionUtil.java +++ b/python/src/com/jetbrains/python/refactoring/PyReplaceExpressionUtil.java @@ -453,7 +453,7 @@ public class PyReplaceExpressionUtil implements PyElementTypes { else if (expr instanceof PyBinaryExpression) { final IElementType opType = getOperationType(expr); if (opType == EXP) priority = 3; - if (opType == MULT || opType == DIV || opType == PERC || opType == FLOORDIV) priority = 4; + if (opType == MULT || opType == AT || opType == DIV || opType == PERC || opType == FLOORDIV) priority = 4; if (opType == PLUS || opType == MINUS) priority = 5; if (opType == LTLT || opType == GTGT) priority = 6; if (opType == AND) priority = 7; diff --git a/python/testData/refactoring/inlinelocal/operatorPrecedence/matrixMultiplication.after.py b/python/testData/refactoring/inlinelocal/operatorPrecedence/matrixMultiplication.after.py new file mode 100644 index 000000000000..932b7d34be33 --- /dev/null +++ b/python/testData/refactoring/inlinelocal/operatorPrecedence/matrixMultiplication.after.py @@ -0,0 +1,57 @@ +(y @ z)[::-5] +(y @ z)[5] +(y @ z)(5) +(y @ z).foo + +-(y @ z) ++(y @ z) +~(y @ z) + +5 ** (y @ z) +(y @ z) ** 5 + +5 * y @ z +y @ z * 5 + +5 / (y @ z) +y @ z / 5 + +5 // (y @ z) +y @ z // 5 + +5 + y @ z +y @ z + 5 + +y @ z - 5 +5 - y @ z + +5 >> y @ z +y @ z << 5 + +5 & y @ z +y @ z & 5 + +5 ^ y @ z +y @ z ^ 5 + +5 | y @ z +y @ z | 5 + +() in y @ z +y @ z in () + +5 is y @ z +y @ z is 5 + +5 < y @ z +y @ z < 5 + +not y @ z + +5 and y @ z +y @ z and 5 + +5 or y @ z +y @ z or 5 + +y @ z if y @ z else y @ z diff --git a/python/testSrc/com/jetbrains/python/refactoring/PyInlineLocalTest.java b/python/testSrc/com/jetbrains/python/refactoring/PyInlineLocalTest.java index 993c0fd794b2..30e68e38ece0 100644 --- a/python/testSrc/com/jetbrains/python/refactoring/PyInlineLocalTest.java +++ b/python/testSrc/com/jetbrains/python/refactoring/PyInlineLocalTest.java @@ -145,6 +145,11 @@ public class PyInlineLocalTest extends PyTestCase { checkOperatorPrecedence("x = 10 if True else 2", "conditional"); } + // PY-15390 + public void testMatMulPrecedence() throws Exception { + checkOperatorPrecedence("x = y @ z", "matrixMultiplication"); + } + private void checkOperatorPrecedence(@NotNull final String firstLine, @NotNull String resultPrefix) throws Exception { myFixture.configureByFile("/refactoring/inlinelocal/operatorPrecedence/template.py"); WriteCommandAction.runWriteCommandAction(myFixture.getProject(), new Runnable() { From 009cb3ee3d9229a541931924ad998edece3a7d82 Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Tue, 24 Mar 2015 18:38:03 +0300 Subject: [PATCH 08/11] Resolve '@' to '__matmul__' and '__rmatmul__' (PY-15390) --- .../psi-api/src/com/jetbrains/python/PyTokenTypes.java | 2 +- python/testData/resolve/MatMul.py | 8 ++++++++ python/testData/resolve/RMatMul.py | 8 ++++++++ python/testSrc/com/jetbrains/python/PyResolveTest.java | 10 ++++++++++ 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 python/testData/resolve/MatMul.py create mode 100644 python/testData/resolve/RMatMul.py diff --git a/python/psi-api/src/com/jetbrains/python/PyTokenTypes.java b/python/psi-api/src/com/jetbrains/python/PyTokenTypes.java index f1f73a969fd9..a54bdc39ad92 100644 --- a/python/psi-api/src/com/jetbrains/python/PyTokenTypes.java +++ b/python/psi-api/src/com/jetbrains/python/PyTokenTypes.java @@ -118,7 +118,7 @@ public class PyTokenTypes { public static final PyElementType RBRACKET = new PyElementType("RBRACKET");// ] public static final PyElementType LBRACE = new PyElementType("LBRACE");// { public static final PyElementType RBRACE = new PyElementType("RBRACE");// } - public static final PyElementType AT = new PyElementType("AT");// @ + public static final PyElementType AT = new PyElementType("AT", "__matmul__");// @ public static final PyElementType COMMA = new PyElementType("COMMA");// , public static final PyElementType COLON = new PyElementType("COLON");// : public static final PyElementType DOT = new PyElementType("DOT");// . diff --git a/python/testData/resolve/MatMul.py b/python/testData/resolve/MatMul.py new file mode 100644 index 000000000000..d3315dfe09b3 --- /dev/null +++ b/python/testData/resolve/MatMul.py @@ -0,0 +1,8 @@ +class C: + def __matmul__(self, other): + return self + + +x = C() +x @ y +# diff --git a/python/testData/resolve/RMatMul.py b/python/testData/resolve/RMatMul.py new file mode 100644 index 000000000000..ed242419d045 --- /dev/null +++ b/python/testData/resolve/RMatMul.py @@ -0,0 +1,8 @@ +class C: + def __rmatmul__(self, other): + return self + + +x = C() +y @ x +# diff --git a/python/testSrc/com/jetbrains/python/PyResolveTest.java b/python/testSrc/com/jetbrains/python/PyResolveTest.java index 78be57f40c5a..27c7558970b9 100644 --- a/python/testSrc/com/jetbrains/python/PyResolveTest.java +++ b/python/testSrc/com/jetbrains/python/PyResolveTest.java @@ -571,4 +571,14 @@ public class PyResolveTest extends PyResolveTestCase { public void testResolveAttributesUsingOldStyleMROWhenUnresolvedAncestorsAndC3Fails() { assertResolvesTo(PyFunction.class, "foo"); } + + // PY-15390 + public void testMatMul() { + assertResolvesTo(PyFunction.class, "__matmul__"); + } + + // PY-15390 + public void testRMatMul() { + assertResolvesTo(PyFunction.class, "__rmatmul__"); + } } From 1cc48a15bd0fb8d0cd423e800c7eacbe74adec82 Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Tue, 24 Mar 2015 18:44:57 +0300 Subject: [PATCH 09/11] Added matrix multiplication method names to the Python spelling dictionary (PY-15390) --- python/src/com/jetbrains/python/spellchecker/python.dic | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/src/com/jetbrains/python/spellchecker/python.dic b/python/src/com/jetbrains/python/spellchecker/python.dic index d486a4f1ba34..d5d09e51ebdb 100644 --- a/python/src/com/jetbrains/python/spellchecker/python.dic +++ b/python/src/com/jetbrains/python/spellchecker/python.dic @@ -919,6 +919,7 @@ ihave ilog imagetext imagnumber +imatmul imode impls importfile @@ -1242,6 +1243,7 @@ mapdict mapstar markedsectionclose markobject +matmul maxamount maxbinsize maxcache @@ -1702,6 +1704,7 @@ ripemd rlecoderengine rledecoderengine rlshift +rmatmul rmcolorizer rmenu rmod From a77b51054b2bf69d3ce2c97ef29722e4e3b8cfc6 Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Tue, 24 Mar 2015 18:58:53 +0300 Subject: [PATCH 10/11] Compeltion for matrix multiplication methods (PY-15390) --- .../src/com/jetbrains/python/PyNames.java | 17 ++++++++++++++++- python/testData/completion/matMul.after.py | 2 ++ python/testData/completion/matMul.py | 2 ++ .../com/jetbrains/python/Py3CompletionTest.java | 10 ++++++++++ 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 python/testData/completion/matMul.after.py create mode 100644 python/testData/completion/matMul.py diff --git a/python/psi-api/src/com/jetbrains/python/PyNames.java b/python/psi-api/src/com/jetbrains/python/PyNames.java index 20a37449454e..d41d00baed8c 100644 --- a/python/psi-api/src/com/jetbrains/python/PyNames.java +++ b/python/psi-api/src/com/jetbrains/python/PyNames.java @@ -357,8 +357,23 @@ public class PyNames { .put("__round__", new BuiltinDescription("(self, n=None)")) .build(); + public static ImmutableMap PY35_BUILTIN_METHODS = ImmutableMap.builder() + .putAll(PY3_BUILTIN_METHODS) + .put("__imatmul__", _self_other_descr) + .put("__matmul__", _self_other_descr) + .put("__rmatmul__", _self_other_descr) + .build(); + public static ImmutableMap getBuiltinMethods(LanguageLevel level) { - return level.isPy3K() ? PY3_BUILTIN_METHODS : PY2_BUILTIN_METHODS; + if (level.isAtLeast(LanguageLevel.PYTHON35)) { + return PY35_BUILTIN_METHODS; + } + else if (level.isAtLeast(LanguageLevel.PYTHON30)) { + return PY3_BUILTIN_METHODS; + } + else { + return PY2_BUILTIN_METHODS; + } } // canonical names, not forced by interpreter diff --git a/python/testData/completion/matMul.after.py b/python/testData/completion/matMul.after.py new file mode 100644 index 000000000000..8d677c50431a --- /dev/null +++ b/python/testData/completion/matMul.after.py @@ -0,0 +1,2 @@ +class C: + def __matmul__(self, other): diff --git a/python/testData/completion/matMul.py b/python/testData/completion/matMul.py new file mode 100644 index 000000000000..e18502dd6752 --- /dev/null +++ b/python/testData/completion/matMul.py @@ -0,0 +1,2 @@ +class C: + def __matmul diff --git a/python/testSrc/com/jetbrains/python/Py3CompletionTest.java b/python/testSrc/com/jetbrains/python/Py3CompletionTest.java index 51b463948b03..ea154cb1084c 100644 --- a/python/testSrc/com/jetbrains/python/Py3CompletionTest.java +++ b/python/testSrc/com/jetbrains/python/Py3CompletionTest.java @@ -141,4 +141,14 @@ public class Py3CompletionTest extends PyTestCase { public void testNotImportedSubmodulesOfNamespacePackage() { doMultiFileTest(); } + + // PY-15390 + public void testMatMul() { + runWithLanguageLevel(LanguageLevel.PYTHON35, new Runnable() { + @Override + public void run() { + doTest(); + } + }); + } } From 3a1eeaa0f02f80fdfd9271141492a43c8c63b0c1 Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Tue, 24 Mar 2015 20:24:31 +0300 Subject: [PATCH 11/11] Fixed extra space between '@' and decorator name '@' is now a binary operator (see PY-15390), so the formatter surrounds it with spaces. This change broke many formatter-related tests. We need an extra rule for not adding spaces if '@' is used inside a decorator statement. --- .../jetbrains/python/formatter/PythonFormattingModelBuilder.java | 1 + 1 file changed, 1 insertion(+) diff --git a/python/src/com/jetbrains/python/formatter/PythonFormattingModelBuilder.java b/python/src/com/jetbrains/python/formatter/PythonFormattingModelBuilder.java index c468290a8514..04d0c69547da 100644 --- a/python/src/com/jetbrains/python/formatter/PythonFormattingModelBuilder.java +++ b/python/src/com/jetbrains/python/formatter/PythonFormattingModelBuilder.java @@ -108,6 +108,7 @@ public class PythonFormattingModelBuilder implements FormattingModelBuilderEx, C .between(FROM_KEYWORD, DOT).spaces(1) .between(DOT, IMPORT_KEYWORD).spaces(1) .around(DOT).spaces(0) + .aroundInside(AT, DECORATOR_CALL).none() .before(SEMICOLON).spaceIf(commonSettings.SPACE_BEFORE_SEMICOLON) .withinPairInside(LPAR, RPAR, ARGUMENT_LIST).spaceIf(commonSettings.SPACE_WITHIN_METHOD_CALL_PARENTHESES) .withinPairInside(LPAR, RPAR, PARAMETER_LIST).spaceIf(commonSettings.SPACE_WITHIN_METHOD_PARENTHESES)