Browse Source

HUE-9494 [lib] Upgrade ply from 3.9 to 3.11

Ying Chen 5 years ago
parent
commit
760a2f5444
100 changed files with 208 additions and 152 deletions
  1. 4 4
      desktop/core/ext-py/ply-3.11/ANNOUNCE
  2. 33 0
      desktop/core/ext-py/ply-3.11/CHANGES
  3. 0 0
      desktop/core/ext-py/ply-3.11/MANIFEST.in
  4. 2 1
      desktop/core/ext-py/ply-3.11/PKG-INFO
  5. 4 2
      desktop/core/ext-py/ply-3.11/README.md
  6. 0 0
      desktop/core/ext-py/ply-3.11/TODO
  7. 1 1
      desktop/core/ext-py/ply-3.11/doc/internal.html
  8. 0 0
      desktop/core/ext-py/ply-3.11/doc/makedoc.py
  9. 25 25
      desktop/core/ext-py/ply-3.11/doc/ply.html
  10. 0 0
      desktop/core/ext-py/ply-3.11/example/BASIC/README
  11. 0 0
      desktop/core/ext-py/ply-3.11/example/BASIC/basic.py
  12. 0 0
      desktop/core/ext-py/ply-3.11/example/BASIC/basiclex.py
  13. 0 0
      desktop/core/ext-py/ply-3.11/example/BASIC/basiclog.py
  14. 0 0
      desktop/core/ext-py/ply-3.11/example/BASIC/basinterp.py
  15. 0 0
      desktop/core/ext-py/ply-3.11/example/BASIC/basparse.py
  16. 0 0
      desktop/core/ext-py/ply-3.11/example/BASIC/dim.bas
  17. 0 0
      desktop/core/ext-py/ply-3.11/example/BASIC/func.bas
  18. 0 0
      desktop/core/ext-py/ply-3.11/example/BASIC/gcd.bas
  19. 0 0
      desktop/core/ext-py/ply-3.11/example/BASIC/gosub.bas
  20. 0 0
      desktop/core/ext-py/ply-3.11/example/BASIC/hello.bas
  21. 0 0
      desktop/core/ext-py/ply-3.11/example/BASIC/linear.bas
  22. 0 0
      desktop/core/ext-py/ply-3.11/example/BASIC/maxsin.bas
  23. 0 0
      desktop/core/ext-py/ply-3.11/example/BASIC/powers.bas
  24. 0 0
      desktop/core/ext-py/ply-3.11/example/BASIC/rand.bas
  25. 0 0
      desktop/core/ext-py/ply-3.11/example/BASIC/sales.bas
  26. 0 0
      desktop/core/ext-py/ply-3.11/example/BASIC/sears.bas
  27. 0 0
      desktop/core/ext-py/ply-3.11/example/BASIC/sqrt1.bas
  28. 0 0
      desktop/core/ext-py/ply-3.11/example/BASIC/sqrt2.bas
  29. 0 0
      desktop/core/ext-py/ply-3.11/example/GardenSnake/GardenSnake.py
  30. 0 0
      desktop/core/ext-py/ply-3.11/example/GardenSnake/README
  31. 0 0
      desktop/core/ext-py/ply-3.11/example/README
  32. 0 0
      desktop/core/ext-py/ply-3.11/example/ansic/README
  33. 0 0
      desktop/core/ext-py/ply-3.11/example/ansic/clex.py
  34. 0 0
      desktop/core/ext-py/ply-3.11/example/ansic/cparse.py
  35. 0 0
      desktop/core/ext-py/ply-3.11/example/calc/calc.py
  36. 0 0
      desktop/core/ext-py/ply-3.11/example/calcdebug/calc.py
  37. 0 0
      desktop/core/ext-py/ply-3.11/example/calceof/calc.py
  38. 0 0
      desktop/core/ext-py/ply-3.11/example/classcalc/calc.py
  39. 0 0
      desktop/core/ext-py/ply-3.11/example/cleanup.sh
  40. 0 0
      desktop/core/ext-py/ply-3.11/example/closurecalc/calc.py
  41. 0 0
      desktop/core/ext-py/ply-3.11/example/hedit/hedit.py
  42. 0 0
      desktop/core/ext-py/ply-3.11/example/newclasscalc/calc.py
  43. 0 0
      desktop/core/ext-py/ply-3.11/example/optcalc/README
  44. 0 0
      desktop/core/ext-py/ply-3.11/example/optcalc/calc.py
  45. 0 0
      desktop/core/ext-py/ply-3.11/example/unicalc/calc.py
  46. 0 0
      desktop/core/ext-py/ply-3.11/example/yply/README
  47. 2 2
      desktop/core/ext-py/ply-3.11/example/yply/ylex.py
  48. 16 16
      desktop/core/ext-py/ply-3.11/example/yply/yparse.py
  49. 4 4
      desktop/core/ext-py/ply-3.11/example/yply/yply.py
  50. 1 1
      desktop/core/ext-py/ply-3.11/ply/__init__.py
  51. 34 37
      desktop/core/ext-py/ply-3.11/ply/cpp.py
  52. 3 9
      desktop/core/ext-py/ply-3.11/ply/ctokens.py
  53. 14 16
      desktop/core/ext-py/ply-3.11/ply/lex.py
  54. 36 26
      desktop/core/ext-py/ply-3.11/ply/yacc.py
  55. 1 6
      desktop/core/ext-py/ply-3.11/ply/ygen.py
  56. 0 1
      desktop/core/ext-py/ply-3.11/setup.cfg
  57. 1 1
      desktop/core/ext-py/ply-3.11/setup.py
  58. 1 0
      desktop/core/ext-py/ply-3.11/test/README
  59. 0 0
      desktop/core/ext-py/ply-3.11/test/calclex.py
  60. 0 0
      desktop/core/ext-py/ply-3.11/test/cleanup.sh
  61. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_closure.py
  62. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_doc1.py
  63. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_dup1.py
  64. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_dup2.py
  65. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_dup3.py
  66. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_empty.py
  67. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_error1.py
  68. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_error2.py
  69. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_error3.py
  70. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_error4.py
  71. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_hedit.py
  72. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_ignore.py
  73. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_ignore2.py
  74. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_literal1.py
  75. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_literal2.py
  76. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_literal3.py
  77. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_many_tokens.py
  78. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_module.py
  79. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_module_import.py
  80. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_object.py
  81. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_opt_alias.py
  82. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_optimize.py
  83. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_optimize2.py
  84. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_optimize3.py
  85. 26 0
      desktop/core/ext-py/ply-3.11/test/lex_optimize4.py
  86. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_re1.py
  87. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_re2.py
  88. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_re3.py
  89. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_rule1.py
  90. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_rule2.py
  91. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_rule3.py
  92. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_state1.py
  93. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_state2.py
  94. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_state3.py
  95. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_state4.py
  96. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_state5.py
  97. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_state_noerror.py
  98. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_state_norule.py
  99. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_state_try.py
  100. 0 0
      desktop/core/ext-py/ply-3.11/test/lex_token1.py

+ 4 - 4
desktop/core/ext-py/ply-3.9/ANNOUNCE → desktop/core/ext-py/ply-3.11/ANNOUNCE

@@ -1,11 +1,11 @@
-August 31, 2016
+February 15, 2018
 
 
-                  Announcing :  PLY-3.9 (Python Lex-Yacc)
+                  Announcing :  PLY-3.11 (Python Lex-Yacc)
 
 
                         http://www.dabeaz.com/ply
                         http://www.dabeaz.com/ply
 
 
-I'm pleased to announce PLY-3.9--a pure Python implementation of the
-common parsing tools lex and yacc.  PLY-3.9 is a minor bug fix
+I'm pleased to announce PLY-3.11--a pure Python implementation of the
+common parsing tools lex and yacc.  PLY-3.11 is a minor bug fix
 release.  It supports both Python 2 and Python 3.
 release.  It supports both Python 2 and Python 3.
 
 
 If you are new to PLY, here are a few highlights:
 If you are new to PLY, here are a few highlights:

+ 33 - 0
desktop/core/ext-py/ply-3.9/CHANGES → desktop/core/ext-py/ply-3.11/CHANGES

@@ -1,3 +1,36 @@
+Version 3.11
+---------------------
+02/15/18  beazley
+          Fixed some minor bugs related to re flags and token order.  
+          Github pull requests #151 and #153.
+
+02/15/18  beazley
+          Added a set_lexpos() method to grammar symbols.  Github issue #148.
+
+
+04/13/17  beazley
+          Mostly minor bug fixes and small code cleanups.
+
+Version 3.10
+---------------------
+01/31/17: beazley
+          Changed grammar signature computation to not involve hashing
+          functions. Parts are just combined into a big string.
+
+10/07/16: beazley
+          Fixed Issue #101: Incorrect shift-reduce conflict resolution with
+          precedence specifier.
+
+          PLY was incorrectly resolving shift-reduce conflicts in certain
+          cases.  For example, in the example/calc/calc.py example, you 
+          could trigger it doing this:
+
+          calc > -3 - 4            
+          1                         (correct answer should be -7)
+          calc >
+
+          Issue and suggested patch contributed by https://github.com/RomaVis
+           
 Version 3.9
 Version 3.9
 ---------------------
 ---------------------
 08/30/16: beazley
 08/30/16: beazley

+ 0 - 0
desktop/core/ext-py/ply-3.9/MANIFEST.in → desktop/core/ext-py/ply-3.11/MANIFEST.in


+ 2 - 1
desktop/core/ext-py/ply-3.9/PKG-INFO → desktop/core/ext-py/ply-3.11/PKG-INFO

@@ -1,11 +1,12 @@
 Metadata-Version: 1.1
 Metadata-Version: 1.1
 Name: ply
 Name: ply
-Version: 3.9
+Version: 3.11
 Summary: Python Lex & Yacc
 Summary: Python Lex & Yacc
 Home-page: http://www.dabeaz.com/ply/
 Home-page: http://www.dabeaz.com/ply/
 Author: David Beazley
 Author: David Beazley
 Author-email: dave@dabeaz.com
 Author-email: dave@dabeaz.com
 License: BSD
 License: BSD
+Description-Content-Type: UNKNOWN
 Description: 
 Description: 
         PLY is yet another implementation of lex and yacc for Python. Some notable
         PLY is yet another implementation of lex and yacc for Python. Some notable
         features include the fact that its implemented entirely in Python and it
         features include the fact that its implemented entirely in Python and it

+ 4 - 2
desktop/core/ext-py/ply-3.9/README.md → desktop/core/ext-py/ply-3.11/README.md

@@ -1,6 +1,8 @@
-PLY (Python Lex-Yacc)                   Version 3.9
+# PLY (Python Lex-Yacc)                   Version 3.11
 
 
-Copyright (C) 2001-2016
+[![Build Status](https://travis-ci.org/dabeaz/ply.svg?branch=master)](https://travis-ci.org/dabeaz/ply)
+
+Copyright (C) 2001-2018
 David M. Beazley (Dabeaz LLC)
 David M. Beazley (Dabeaz LLC)
 All rights reserved.
 All rights reserved.
 
 

+ 0 - 0
desktop/core/ext-py/ply-3.9/TODO → desktop/core/ext-py/ply-3.11/TODO


+ 1 - 1
desktop/core/ext-py/ply-3.9/doc/internal.html → desktop/core/ext-py/ply-3.11/doc/internal.html

@@ -12,7 +12,7 @@ dave@dabeaz.com<br>
 </b>
 </b>
 
 
 <p>
 <p>
-<b>PLY Version: 3.0</b>
+<b>PLY Version: 3.11</b>
 <p>
 <p>
 
 
 <!-- INDEX -->
 <!-- INDEX -->

+ 0 - 0
desktop/core/ext-py/ply-3.9/doc/makedoc.py → desktop/core/ext-py/ply-3.11/doc/makedoc.py


+ 25 - 25
desktop/core/ext-py/ply-3.9/doc/ply.html → desktop/core/ext-py/ply-3.11/doc/ply.html

@@ -12,13 +12,13 @@ dave@dabeaz.com<br>
 </b>
 </b>
 
 
 <p>
 <p>
-<b>PLY Version: 3.9</b>
+<b>PLY Version: 3.11</b>
 <p>
 <p>
 
 
 <!-- INDEX -->
 <!-- INDEX -->
 <div class="sectiontoc">
 <div class="sectiontoc">
 <ul>
 <ul>
-<li><a href="#ply_nn1">Preface and Requirements</a>
+<li><a href="#ply_nn0">Preface and Requirements</a>
 <li><a href="#ply_nn1">Introduction</a>
 <li><a href="#ply_nn1">Introduction</a>
 <li><a href="#ply_nn2">PLY Overview</a>
 <li><a href="#ply_nn2">PLY Overview</a>
 <li><a href="#ply_nn3">Lex</a>
 <li><a href="#ply_nn3">Lex</a>
@@ -34,7 +34,7 @@ dave@dabeaz.com<br>
 <li><a href="#ply_nn12">Error handling</a>
 <li><a href="#ply_nn12">Error handling</a>
 <li><a href="#ply_nn14">EOF Handling</a>
 <li><a href="#ply_nn14">EOF Handling</a>
 <li><a href="#ply_nn13">Building and using the lexer</a>
 <li><a href="#ply_nn13">Building and using the lexer</a>
-<li><a href="#ply_nn14">The @TOKEN decorator</a>
+<li><a href="#ply_nn14b">The @TOKEN decorator</a>
 <li><a href="#ply_nn15">Optimized mode</a>
 <li><a href="#ply_nn15">Optimized mode</a>
 <li><a href="#ply_nn16">Debugging</a>
 <li><a href="#ply_nn16">Debugging</a>
 <li><a href="#ply_nn17">Alternative specification of lexers</a>
 <li><a href="#ply_nn17">Alternative specification of lexers</a>
@@ -42,7 +42,7 @@ dave@dabeaz.com<br>
 <li><a href="#ply_nn19">Lexer cloning</a>
 <li><a href="#ply_nn19">Lexer cloning</a>
 <li><a href="#ply_nn20">Internal lexer state</a>
 <li><a href="#ply_nn20">Internal lexer state</a>
 <li><a href="#ply_nn21">Conditional lexing and start conditions</a>
 <li><a href="#ply_nn21">Conditional lexing and start conditions</a>
-<li><a href="#ply_nn21">Miscellaneous Issues</a>
+<li><a href="#ply_nn21b">Miscellaneous Issues</a>
 </ul>
 </ul>
 <li><a href="#ply_nn22">Parsing basics</a>
 <li><a href="#ply_nn22">Parsing basics</a>
 <li><a href="#ply_nn23">Yacc</a>
 <li><a href="#ply_nn23">Yacc</a>
@@ -50,10 +50,10 @@ dave@dabeaz.com<br>
 <li><a href="#ply_nn24">An example</a>
 <li><a href="#ply_nn24">An example</a>
 <li><a href="#ply_nn25">Combining Grammar Rule Functions</a>
 <li><a href="#ply_nn25">Combining Grammar Rule Functions</a>
 <li><a href="#ply_nn26">Character Literals</a>
 <li><a href="#ply_nn26">Character Literals</a>
-<li><a href="#ply_nn26">Empty Productions</a>
+<li><a href="#ply_nn26b">Empty Productions</a>
 <li><a href="#ply_nn28">Changing the starting symbol</a>
 <li><a href="#ply_nn28">Changing the starting symbol</a>
 <li><a href="#ply_nn27">Dealing With Ambiguous Grammars</a>
 <li><a href="#ply_nn27">Dealing With Ambiguous Grammars</a>
-<li><a href="#ply_nn28">The parser.out file</a>
+<li><a href="#ply_nn28b">The parser.out file</a>
 <li><a href="#ply_nn29">Syntax Error Handling</a>
 <li><a href="#ply_nn29">Syntax Error Handling</a>
 <ul>
 <ul>
 <li><a href="#ply_nn30">Recovery and resynchronization with error rules</a>
 <li><a href="#ply_nn30">Recovery and resynchronization with error rules</a>
@@ -64,11 +64,11 @@ dave@dabeaz.com<br>
 </ul>
 </ul>
 <li><a href="#ply_nn33">Line Number and Position Tracking</a>
 <li><a href="#ply_nn33">Line Number and Position Tracking</a>
 <li><a href="#ply_nn34">AST Construction</a>
 <li><a href="#ply_nn34">AST Construction</a>
-<li><a href="#ply_nn35">Embedded Actions</a>
+<li><a href="#ply_nn35b">Embedded Actions</a>
 <li><a href="#ply_nn36">Miscellaneous Yacc Notes</a>
 <li><a href="#ply_nn36">Miscellaneous Yacc Notes</a>
 </ul>
 </ul>
 <li><a href="#ply_nn37">Multiple Parsers and Lexers</a>
 <li><a href="#ply_nn37">Multiple Parsers and Lexers</a>
-<li><a href="#ply_nn38">Using Python's Optimized Mode</a>
+<li><a href="#ply_nn38b">Using Python's Optimized Mode</a>
 <li><a href="#ply_nn44">Advanced Debugging</a>
 <li><a href="#ply_nn44">Advanced Debugging</a>
 <ul>
 <ul>
 <li><a href="#ply_nn45">Debugging the lex() and yacc() commands</a>
 <li><a href="#ply_nn45">Debugging the lex() and yacc() commands</a>
@@ -85,7 +85,7 @@ dave@dabeaz.com<br>
 
 
 
 
 
 
-<H2><a name="ply_nn1"></a>1. Preface and Requirements</H2>
+<H2><a name="ply_nn0"></a>1. Preface and Requirements</H2>
 
 
 
 
 <p>
 <p>
@@ -552,21 +552,18 @@ Within the rule, the <tt>lineno</tt> attribute of the underlying lexer <tt>t.lex
 After the line number is updated, the token is simply discarded since nothing is returned.
 After the line number is updated, the token is simply discarded since nothing is returned.
 
 
 <p>
 <p>
-<tt>lex.py</tt> does not perform and kind of automatic column tracking.  However, it does record positional
+<tt>lex.py</tt> does not perform any kind of automatic column tracking.  However, it does record positional
 information related to each token in the <tt>lexpos</tt> attribute.   Using this, it is usually possible to compute 
 information related to each token in the <tt>lexpos</tt> attribute.   Using this, it is usually possible to compute 
 column information as a separate step.   For instance, just count backwards until you reach a newline.
 column information as a separate step.   For instance, just count backwards until you reach a newline.
 
 
 <blockquote>
 <blockquote>
 <pre>
 <pre>
-# Compute column. 
+# Compute column.
 #     input is the input text string
 #     input is the input text string
 #     token is a token instance
 #     token is a token instance
-def find_column(input,token):
-    last_cr = input.rfind('\n',0,token.lexpos)
-    if last_cr < 0:
-	last_cr = 0
-    column = (token.lexpos - last_cr) + 1
-    return column
+def find_column(input, token):
+    line_start = input.rfind('\n', 0, token.lexpos) + 1
+    return (token.lexpos - line_start) + 1
 </pre>
 </pre>
 </blockquote>
 </blockquote>
 
 
@@ -718,7 +715,7 @@ be used to control the lexer.
 None if the end of the input text has been reached.
 None if the end of the input text has been reached.
 </ul>
 </ul>
 
 
-<H3><a name="ply_nn14"></a>4.12 The @TOKEN decorator</H3>
+<H3><a name="ply_nn14b"></a>4.12 The @TOKEN decorator</H3>
 
 
 
 
 In some applications, you may want to define build tokens from as a series of
 In some applications, you may want to define build tokens from as a series of
@@ -1418,7 +1415,7 @@ However, if the closing right brace is encountered, the rule <tt>t_ccode_rbrace<
 position), stores it, and returns a token 'CCODE' containing all of that text.  When returning the token, the lexing state is restored back to its
 position), stores it, and returns a token 'CCODE' containing all of that text.  When returning the token, the lexing state is restored back to its
 initial state.
 initial state.
 
 
-<H3><a name="ply_nn21"></a>4.20 Miscellaneous Issues</H3>
+<H3><a name="ply_nn21b"></a>4.20 Miscellaneous Issues</H3>
 
 
 
 
 <P>
 <P>
@@ -1438,10 +1435,13 @@ well as for input text.
 
 
 <blockquote>
 <blockquote>
 <pre>
 <pre>
-lex.lex(reflags=re.UNICODE)
+lex.lex(reflags=re.UNICODE | re.VERBOSE)
 </pre>
 </pre>
 </blockquote>
 </blockquote>
 
 
+Note: by default, <tt>reflags</tt> is set to <tt>re.VERBOSE</tt>.  If you provide
+your own flags, you may need to include this for PLY to preserve its normal behavior.
+
 <p>
 <p>
 <li>Since the lexer is written entirely in Python, its performance is
 <li>Since the lexer is written entirely in Python, its performance is
 largely determined by that of the Python <tt>re</tt> module.  Although
 largely determined by that of the Python <tt>re</tt> module.  Although
@@ -1890,7 +1890,7 @@ literals = ['+','-','*','/' ]
 <b>Character literals are limited to a single character</b>.  Thus, it is not legal to specify literals such as <tt>'&lt;='</tt> or <tt>'=='</tt>.  For this, use
 <b>Character literals are limited to a single character</b>.  Thus, it is not legal to specify literals such as <tt>'&lt;='</tt> or <tt>'=='</tt>.  For this, use
 the normal lexing rules (e.g., define a rule such as <tt>t_EQ = r'=='</tt>).
 the normal lexing rules (e.g., define a rule such as <tt>t_EQ = r'=='</tt>).
 
 
-<H3><a name="ply_nn26"></a>6.4 Empty Productions</H3>
+<H3><a name="ply_nn26b"></a>6.4 Empty Productions</H3>
 
 
 
 
 <tt>yacc.py</tt> can handle empty productions by defining a rule like this:
 <tt>yacc.py</tt> can handle empty productions by defining a rule like this:
@@ -2208,7 +2208,7 @@ the contents of the
 <tt>parser.out</tt> debugging file with an appropriately high level of
 <tt>parser.out</tt> debugging file with an appropriately high level of
 caffeination.
 caffeination.
 
 
-<H3><a name="ply_nn28"></a>6.7 The parser.out file</H3>
+<H3><a name="ply_nn28b"></a>6.7 The parser.out file</H3>
 
 
 
 
 Tracking down shift/reduce and reduce/reduce conflicts is one of the finer pleasures of using an LR
 Tracking down shift/reduce and reduce/reduce conflicts is one of the finer pleasures of using an LR
@@ -2950,7 +2950,7 @@ def p_expression_binop(p):
 </pre>
 </pre>
 </blockquote>
 </blockquote>
 
 
-<H3><a name="ply_nn35"></a>6.11 Embedded Actions</H3>
+<H3><a name="ply_nn35b"></a>6.11 Embedded Actions</H3>
 
 
 
 
 The parsing technique used by yacc only allows actions to be executed at the end of a rule.  For example,
 The parsing technique used by yacc only allows actions to be executed at the end of a rule.  For example,
@@ -3140,7 +3140,7 @@ each time it runs (which may take awhile depending on how large your grammar is)
 
 
 <blockquote>
 <blockquote>
 <pre>
 <pre>
-parser = yacc.parse(debug=True)     
+parser.parse(input_text, debug=True)     
 </pre>
 </pre>
 </blockquote>
 </blockquote>
 
 
@@ -3270,7 +3270,7 @@ If necessary, arbitrary attributes can be attached to the lexer or parser object
 For example, if you wanted to have different parsing modes, you could attach a mode
 For example, if you wanted to have different parsing modes, you could attach a mode
 attribute to the parser object and look at it later.
 attribute to the parser object and look at it later.
 
 
-<H2><a name="ply_nn38"></a>8. Using Python's Optimized Mode</H2>
+<H2><a name="ply_nn38b"></a>8. Using Python's Optimized Mode</H2>
 
 
 
 
 Because PLY uses information from doc-strings, parsing and lexing
 Because PLY uses information from doc-strings, parsing and lexing

+ 0 - 0
desktop/core/ext-py/ply-3.9/example/BASIC/README → desktop/core/ext-py/ply-3.11/example/BASIC/README


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/BASIC/basic.py → desktop/core/ext-py/ply-3.11/example/BASIC/basic.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/BASIC/basiclex.py → desktop/core/ext-py/ply-3.11/example/BASIC/basiclex.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/BASIC/basiclog.py → desktop/core/ext-py/ply-3.11/example/BASIC/basiclog.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/BASIC/basinterp.py → desktop/core/ext-py/ply-3.11/example/BASIC/basinterp.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/BASIC/basparse.py → desktop/core/ext-py/ply-3.11/example/BASIC/basparse.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/BASIC/dim.bas → desktop/core/ext-py/ply-3.11/example/BASIC/dim.bas


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/BASIC/func.bas → desktop/core/ext-py/ply-3.11/example/BASIC/func.bas


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/BASIC/gcd.bas → desktop/core/ext-py/ply-3.11/example/BASIC/gcd.bas


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/BASIC/gosub.bas → desktop/core/ext-py/ply-3.11/example/BASIC/gosub.bas


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/BASIC/hello.bas → desktop/core/ext-py/ply-3.11/example/BASIC/hello.bas


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/BASIC/linear.bas → desktop/core/ext-py/ply-3.11/example/BASIC/linear.bas


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/BASIC/maxsin.bas → desktop/core/ext-py/ply-3.11/example/BASIC/maxsin.bas


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/BASIC/powers.bas → desktop/core/ext-py/ply-3.11/example/BASIC/powers.bas


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/BASIC/rand.bas → desktop/core/ext-py/ply-3.11/example/BASIC/rand.bas


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/BASIC/sales.bas → desktop/core/ext-py/ply-3.11/example/BASIC/sales.bas


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/BASIC/sears.bas → desktop/core/ext-py/ply-3.11/example/BASIC/sears.bas


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/BASIC/sqrt1.bas → desktop/core/ext-py/ply-3.11/example/BASIC/sqrt1.bas


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/BASIC/sqrt2.bas → desktop/core/ext-py/ply-3.11/example/BASIC/sqrt2.bas


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/GardenSnake/GardenSnake.py → desktop/core/ext-py/ply-3.11/example/GardenSnake/GardenSnake.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/GardenSnake/README → desktop/core/ext-py/ply-3.11/example/GardenSnake/README


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/README → desktop/core/ext-py/ply-3.11/example/README


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/ansic/README → desktop/core/ext-py/ply-3.11/example/ansic/README


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/ansic/clex.py → desktop/core/ext-py/ply-3.11/example/ansic/clex.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/ansic/cparse.py → desktop/core/ext-py/ply-3.11/example/ansic/cparse.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/calc/calc.py → desktop/core/ext-py/ply-3.11/example/calc/calc.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/calcdebug/calc.py → desktop/core/ext-py/ply-3.11/example/calcdebug/calc.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/calceof/calc.py → desktop/core/ext-py/ply-3.11/example/calceof/calc.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/classcalc/calc.py → desktop/core/ext-py/ply-3.11/example/classcalc/calc.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/cleanup.sh → desktop/core/ext-py/ply-3.11/example/cleanup.sh


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/closurecalc/calc.py → desktop/core/ext-py/ply-3.11/example/closurecalc/calc.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/hedit/hedit.py → desktop/core/ext-py/ply-3.11/example/hedit/hedit.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/newclasscalc/calc.py → desktop/core/ext-py/ply-3.11/example/newclasscalc/calc.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/optcalc/README → desktop/core/ext-py/ply-3.11/example/optcalc/README


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/optcalc/calc.py → desktop/core/ext-py/ply-3.11/example/optcalc/calc.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/unicalc/calc.py → desktop/core/ext-py/ply-3.11/example/unicalc/calc.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/example/yply/README → desktop/core/ext-py/ply-3.11/example/yply/README


+ 2 - 2
desktop/core/ext-py/ply-3.9/example/yply/ylex.py → desktop/core/ext-py/ply-3.11/example/yply/ylex.py

@@ -109,8 +109,8 @@ def t_code_error(t):
 
 
 
 
 def t_error(t):
 def t_error(t):
-    print "%d: Illegal character '%s'" % (t.lexer.lineno, t.value[0])
-    print t.value
+    print("%d: Illegal character '%s'" % (t.lexer.lineno, t.value[0]))
+    print(t.value)
     t.lexer.skip(1)
     t.lexer.skip(1)
 
 
 lex.lex()
 lex.lex()

+ 16 - 16
desktop/core/ext-py/ply-3.9/example/yply/yparse.py → desktop/core/ext-py/ply-3.11/example/yply/yparse.py

@@ -22,18 +22,18 @@ def p_defsection(p):
     '''defsection : definitions SECTION
     '''defsection : definitions SECTION
                   | SECTION'''
                   | SECTION'''
     p.lexer.lastsection = 1
     p.lexer.lastsection = 1
-    print "tokens = ", repr(tokenlist)
-    print
-    print "precedence = ", repr(preclist)
-    print
-    print "# -------------- RULES ----------------"
-    print
+    print("tokens = ", repr(tokenlist))
+    print()
+    print("precedence = ", repr(preclist))
+    print()
+    print("# -------------- RULES ----------------")
+    print()
 
 
 
 
 def p_rulesection(p):
 def p_rulesection(p):
     '''rulesection : rules SECTION'''
     '''rulesection : rules SECTION'''
 
 
-    print "# -------------- RULES END ----------------"
+    print("# -------------- RULES END ----------------")
     print_code(p[2], 0)
     print_code(p[2], 0)
 
 
 
 
@@ -49,7 +49,7 @@ def p_definition_literal(p):
 
 
 def p_definition_start(p):
 def p_definition_start(p):
     '''definition : START ID'''
     '''definition : START ID'''
-    print "start = '%s'" % p[2]
+    print("start = '%s'" % p[2])
 
 
 
 
 def p_definition_token(p):
 def p_definition_token(p):
@@ -138,7 +138,7 @@ def p_rules(p):
     rulecount = 1
     rulecount = 1
     for r in rule[1]:
     for r in rule[1]:
         # r contains one of the rule possibilities
         # r contains one of the rule possibilities
-        print "def p_%s_%d(p):" % (rulename, rulecount)
+        print("def p_%s_%d(p):" % (rulename, rulecount))
         prod = []
         prod = []
         prodcode = ""
         prodcode = ""
         for i in range(len(r)):
         for i in range(len(r)):
@@ -155,17 +155,17 @@ def p_rules(p):
                     embed_count += 1
                     embed_count += 1
             else:
             else:
                 prod.append(item)
                 prod.append(item)
-        print "    '''%s : %s'''" % (rulename, " ".join(prod))
+        print("    '''%s : %s'''" % (rulename, " ".join(prod)))
         # Emit code
         # Emit code
         print_code(prodcode, 4)
         print_code(prodcode, 4)
-        print
+        print()
         rulecount += 1
         rulecount += 1
 
 
     for e, code in embedded:
     for e, code in embedded:
-        print "def p_%s(p):" % e
-        print "    '''%s : '''" % e
+        print("def p_%s(p):" % e)
+        print("    '''%s : '''" % e)
         print_code(code, 4)
         print_code(code, 4)
-        print
+        print()
 
 
 
 
 def p_rule(p):
 def p_rule(p):
@@ -204,7 +204,7 @@ def p_morerules(p):
         p[0] = p[1]
         p[0] = p[1]
         p[0].append(p[3])
         p[0].append(p[3])
 
 
-#   print "morerules", len(p), p[0]
+#   print("morerules", len(p), p[0])
 
 
 
 
 def p_rulelist(p):
 def p_rulelist(p):
@@ -241,4 +241,4 @@ def print_code(code, indent):
         return
         return
     codelines = code.splitlines()
     codelines = code.splitlines()
     for c in codelines:
     for c in codelines:
-        print "%s# %s" % (" " * indent, c)
+        print("%s# %s" % (" " * indent, c))

+ 4 - 4
desktop/core/ext-py/ply-3.9/example/yply/yply.py → desktop/core/ext-py/ply-3.11/example/yply/yply.py

@@ -29,14 +29,14 @@ import yparse
 from ply import *
 from ply import *
 
 
 if len(sys.argv) == 1:
 if len(sys.argv) == 1:
-    print "usage : yply.py [-nocode] inputfile"
+    print("usage : yply.py [-nocode] inputfile")
     raise SystemExit
     raise SystemExit
 
 
 if len(sys.argv) == 3:
 if len(sys.argv) == 3:
     if sys.argv[1] == '-nocode':
     if sys.argv[1] == '-nocode':
         yparse.emit_code = 0
         yparse.emit_code = 0
     else:
     else:
-        print "Unknown option '%s'" % sys.argv[1]
+        print("Unknown option '%s'" % sys.argv[1])
         raise SystemExit
         raise SystemExit
     filename = sys.argv[2]
     filename = sys.argv[2]
 else:
 else:
@@ -44,8 +44,8 @@ else:
 
 
 yacc.parse(open(filename).read())
 yacc.parse(open(filename).read())
 
 
-print """
+print("""
 if __name__ == '__main__':
 if __name__ == '__main__':
     from ply import *
     from ply import *
     yacc.yacc()
     yacc.yacc()
-"""
+""")

+ 1 - 1
desktop/core/ext-py/ply-3.9/ply/__init__.py → desktop/core/ext-py/ply-3.11/ply/__init__.py

@@ -1,5 +1,5 @@
 # PLY package
 # PLY package
 # Author: David Beazley (dave@dabeaz.com)
 # Author: David Beazley (dave@dabeaz.com)
 
 
-__version__ = '3.9'
+__version__ = '3.11'
 __all__ = ['lex','yacc']
 __all__ = ['lex','yacc']

+ 34 - 37
desktop/core/ext-py/ply-3.9/ply/cpp.py → desktop/core/ext-py/ply-3.11/ply/cpp.py

@@ -5,7 +5,7 @@
 # Copyright (C) 2007
 # Copyright (C) 2007
 # All rights reserved
 # All rights reserved
 #
 #
-# This module implements an ANSI-C style lexical preprocessor for PLY. 
+# This module implements an ANSI-C style lexical preprocessor for PLY.
 # -----------------------------------------------------------------------------
 # -----------------------------------------------------------------------------
 from __future__ import generators
 from __future__ import generators
 
 
@@ -77,7 +77,8 @@ def t_CPP_COMMENT2(t):
     r'(//.*?(\n|$))'
     r'(//.*?(\n|$))'
     # replace with '/n'
     # replace with '/n'
     t.type = 'CPP_WS'; t.value = '\n'
     t.type = 'CPP_WS'; t.value = '\n'
-    
+    return t
+
 def t_error(t):
 def t_error(t):
     t.type = t.value[0]
     t.type = t.value[0]
     t.value = t.value[0]
     t.value = t.value[0]
@@ -91,8 +92,8 @@ import os.path
 
 
 # -----------------------------------------------------------------------------
 # -----------------------------------------------------------------------------
 # trigraph()
 # trigraph()
-# 
-# Given an input string, this function replaces all trigraph sequences. 
+#
+# Given an input string, this function replaces all trigraph sequences.
 # The following mapping is used:
 # The following mapping is used:
 #
 #
 #     ??=    #
 #     ??=    #
@@ -262,7 +263,7 @@ class Preprocessor(object):
     # ----------------------------------------------------------------------
     # ----------------------------------------------------------------------
     # add_path()
     # add_path()
     #
     #
-    # Adds a search path to the preprocessor.  
+    # Adds a search path to the preprocessor.
     # ----------------------------------------------------------------------
     # ----------------------------------------------------------------------
 
 
     def add_path(self,path):
     def add_path(self,path):
@@ -306,7 +307,7 @@ class Preprocessor(object):
 
 
     # ----------------------------------------------------------------------
     # ----------------------------------------------------------------------
     # tokenstrip()
     # tokenstrip()
-    # 
+    #
     # Remove leading/trailing whitespace tokens from a token list
     # Remove leading/trailing whitespace tokens from a token list
     # ----------------------------------------------------------------------
     # ----------------------------------------------------------------------
 
 
@@ -332,7 +333,7 @@ class Preprocessor(object):
     # argument.  Each argument is represented by a list of tokens.
     # argument.  Each argument is represented by a list of tokens.
     #
     #
     # When collecting arguments, leading and trailing whitespace is removed
     # When collecting arguments, leading and trailing whitespace is removed
-    # from each argument.  
+    # from each argument.
     #
     #
     # This function properly handles nested parenthesis and commas---these do not
     # This function properly handles nested parenthesis and commas---these do not
     # define new arguments.
     # define new arguments.
@@ -344,7 +345,7 @@ class Preprocessor(object):
         current_arg = []
         current_arg = []
         nesting = 1
         nesting = 1
         tokenlen = len(tokenlist)
         tokenlen = len(tokenlist)
-    
+
         # Search for the opening '('.
         # Search for the opening '('.
         i = 0
         i = 0
         while (i < tokenlen) and (tokenlist[i].type in self.t_WS):
         while (i < tokenlen) and (tokenlist[i].type in self.t_WS):
@@ -378,7 +379,7 @@ class Preprocessor(object):
             else:
             else:
                 current_arg.append(t)
                 current_arg.append(t)
             i += 1
             i += 1
-    
+
         # Missing end argument
         # Missing end argument
         self.error(self.source,tokenlist[-1].lineno,"Missing ')' in macro arguments")
         self.error(self.source,tokenlist[-1].lineno,"Missing ')' in macro arguments")
         return 0, [],[]
         return 0, [],[]
@@ -390,9 +391,9 @@ class Preprocessor(object):
     # This is used to speed up macro expansion later on---we'll know
     # This is used to speed up macro expansion later on---we'll know
     # right away where to apply patches to the value to form the expansion
     # right away where to apply patches to the value to form the expansion
     # ----------------------------------------------------------------------
     # ----------------------------------------------------------------------
-    
+
     def macro_prescan(self,macro):
     def macro_prescan(self,macro):
-        macro.patch     = []             # Standard macro arguments 
+        macro.patch     = []             # Standard macro arguments
         macro.str_patch = []             # String conversion expansion
         macro.str_patch = []             # String conversion expansion
         macro.var_comma_patch = []       # Variadic macro comma patch
         macro.var_comma_patch = []       # Variadic macro comma patch
         i = 0
         i = 0
@@ -410,10 +411,11 @@ class Preprocessor(object):
                 elif (i > 0 and macro.value[i-1].value == '##'):
                 elif (i > 0 and macro.value[i-1].value == '##'):
                     macro.patch.append(('c',argnum,i-1))
                     macro.patch.append(('c',argnum,i-1))
                     del macro.value[i-1]
                     del macro.value[i-1]
+                    i -= 1
                     continue
                     continue
                 elif ((i+1) < len(macro.value) and macro.value[i+1].value == '##'):
                 elif ((i+1) < len(macro.value) and macro.value[i+1].value == '##'):
                     macro.patch.append(('c',argnum,i))
                     macro.patch.append(('c',argnum,i))
-                    i += 1
+                    del macro.value[i + 1]
                     continue
                     continue
                 # Standard expansion
                 # Standard expansion
                 else:
                 else:
@@ -439,7 +441,7 @@ class Preprocessor(object):
         rep = [copy.copy(_x) for _x in macro.value]
         rep = [copy.copy(_x) for _x in macro.value]
 
 
         # Make string expansion patches.  These do not alter the length of the replacement sequence
         # Make string expansion patches.  These do not alter the length of the replacement sequence
-        
+
         str_expansion = {}
         str_expansion = {}
         for argnum, i in macro.str_patch:
         for argnum, i in macro.str_patch:
             if argnum not in str_expansion:
             if argnum not in str_expansion:
@@ -457,7 +459,7 @@ class Preprocessor(object):
         # Make all other patches.   The order of these matters.  It is assumed that the patch list
         # Make all other patches.   The order of these matters.  It is assumed that the patch list
         # has been sorted in reverse order of patch location since replacements will cause the
         # has been sorted in reverse order of patch location since replacements will cause the
         # size of the replacement sequence to expand from the patch point.
         # size of the replacement sequence to expand from the patch point.
-        
+
         expanded = { }
         expanded = { }
         for ptype, argnum, i in macro.patch:
         for ptype, argnum, i in macro.patch:
             # Concatenation.   Argument is left unexpanded
             # Concatenation.   Argument is left unexpanded
@@ -494,7 +496,7 @@ class Preprocessor(object):
                 if t.value in self.macros and t.value not in expanded:
                 if t.value in self.macros and t.value not in expanded:
                     # Yes, we found a macro match
                     # Yes, we found a macro match
                     expanded[t.value] = True
                     expanded[t.value] = True
-                    
+
                     m = self.macros[t.value]
                     m = self.macros[t.value]
                     if not m.arglist:
                     if not m.arglist:
                         # A simple macro
                         # A simple macro
@@ -508,7 +510,7 @@ class Preprocessor(object):
                         j = i + 1
                         j = i + 1
                         while j < len(tokens) and tokens[j].type in self.t_WS:
                         while j < len(tokens) and tokens[j].type in self.t_WS:
                             j += 1
                             j += 1
-                        if tokens[j].value == '(':
+                        if j < len(tokens) and tokens[j].value == '(':
                             tokcount,args,positions = self.collect_args(tokens[j:])
                             tokcount,args,positions = self.collect_args(tokens[j:])
                             if not m.variadic and len(args) !=  len(m.arglist):
                             if not m.variadic and len(args) !=  len(m.arglist):
                                 self.error(self.source,t.lineno,"Macro %s requires %d arguments" % (t.value,len(m.arglist)))
                                 self.error(self.source,t.lineno,"Macro %s requires %d arguments" % (t.value,len(m.arglist)))
@@ -526,7 +528,7 @@ class Preprocessor(object):
                                     else:
                                     else:
                                         args[len(m.arglist)-1] = tokens[j+positions[len(m.arglist)-1]:j+tokcount-1]
                                         args[len(m.arglist)-1] = tokens[j+positions[len(m.arglist)-1]:j+tokcount-1]
                                         del args[len(m.arglist):]
                                         del args[len(m.arglist):]
-                                        
+
                                 # Get macro replacement text
                                 # Get macro replacement text
                                 rep = self.macro_expand_args(m,args)
                                 rep = self.macro_expand_args(m,args)
                                 rep = self.expand_macros(rep,expanded)
                                 rep = self.expand_macros(rep,expanded)
@@ -534,18 +536,24 @@ class Preprocessor(object):
                                     r.lineno = t.lineno
                                     r.lineno = t.lineno
                                 tokens[i:j+tokcount] = rep
                                 tokens[i:j+tokcount] = rep
                                 i += len(rep)
                                 i += len(rep)
+                        else:
+                            # This is not a macro. It is just a word which
+                            # equals to name of the macro. Hence, go to the
+                            # next token.
+                            i += 1
+
                     del expanded[t.value]
                     del expanded[t.value]
                     continue
                     continue
                 elif t.value == '__LINE__':
                 elif t.value == '__LINE__':
                     t.type = self.t_INTEGER
                     t.type = self.t_INTEGER
                     t.value = self.t_INTEGER_TYPE(t.lineno)
                     t.value = self.t_INTEGER_TYPE(t.lineno)
-                
+
             i += 1
             i += 1
         return tokens
         return tokens
 
 
-    # ----------------------------------------------------------------------    
+    # ----------------------------------------------------------------------
     # evalexpr()
     # evalexpr()
-    # 
+    #
     # Evaluate an expression token sequence for the purposes of evaluating
     # Evaluate an expression token sequence for the purposes of evaluating
     # integral expressions.
     # integral expressions.
     # ----------------------------------------------------------------------
     # ----------------------------------------------------------------------
@@ -592,7 +600,7 @@ class Preprocessor(object):
                 tokens[i].value = str(tokens[i].value)
                 tokens[i].value = str(tokens[i].value)
                 while tokens[i].value[-1] not in "0123456789abcdefABCDEF":
                 while tokens[i].value[-1] not in "0123456789abcdefABCDEF":
                     tokens[i].value = tokens[i].value[:-1]
                     tokens[i].value = tokens[i].value[:-1]
-        
+
         expr = "".join([str(x.value) for x in tokens])
         expr = "".join([str(x.value) for x in tokens])
         expr = expr.replace("&&"," and ")
         expr = expr.replace("&&"," and ")
         expr = expr.replace("||"," or ")
         expr = expr.replace("||"," or ")
@@ -617,7 +625,7 @@ class Preprocessor(object):
 
 
         if not source:
         if not source:
             source = ""
             source = ""
-            
+
         self.define("__FILE__ \"%s\"" % source)
         self.define("__FILE__ \"%s\"" % source)
 
 
         self.source = source
         self.source = source
@@ -636,7 +644,7 @@ class Preprocessor(object):
                 for tok in x:
                 for tok in x:
                     if tok.type in self.t_WS and '\n' in tok.value:
                     if tok.type in self.t_WS and '\n' in tok.value:
                         chunk.append(tok)
                         chunk.append(tok)
-                
+
                 dirtokens = self.tokenstrip(x[i+1:])
                 dirtokens = self.tokenstrip(x[i+1:])
                 if dirtokens:
                 if dirtokens:
                     name = dirtokens[0].value
                     name = dirtokens[0].value
@@ -644,7 +652,7 @@ class Preprocessor(object):
                 else:
                 else:
                     name = ""
                     name = ""
                     args = []
                     args = []
-                
+
                 if name == 'define':
                 if name == 'define':
                     if enable:
                     if enable:
                         for tok in self.expand_macros(chunk):
                         for tok in self.expand_macros(chunk):
@@ -704,7 +712,7 @@ class Preprocessor(object):
                                     iftrigger = True
                                     iftrigger = True
                     else:
                     else:
                         self.error(self.source,dirtokens[0].lineno,"Misplaced #elif")
                         self.error(self.source,dirtokens[0].lineno,"Misplaced #elif")
-                        
+
                 elif name == 'else':
                 elif name == 'else':
                     if ifstack:
                     if ifstack:
                         if ifstack[-1][0]:
                         if ifstack[-1][0]:
@@ -874,7 +882,7 @@ class Preprocessor(object):
     def parse(self,input,source=None,ignore={}):
     def parse(self,input,source=None,ignore={}):
         self.ignore = ignore
         self.ignore = ignore
         self.parser = self.parsegen(input,source)
         self.parser = self.parsegen(input,source)
-        
+
     # ----------------------------------------------------------------------
     # ----------------------------------------------------------------------
     # token()
     # token()
     #
     #
@@ -904,14 +912,3 @@ if __name__ == '__main__':
         tok = p.token()
         tok = p.token()
         if not tok: break
         if not tok: break
         print(p.source, tok)
         print(p.source, tok)
-
-
-
-
-    
-
-
-
-
-
-

+ 3 - 9
desktop/core/ext-py/ply-3.9/ply/ctokens.py → desktop/core/ext-py/ply-3.11/ply/ctokens.py

@@ -16,7 +16,7 @@ tokens = [
     'OR', 'AND', 'NOT', 'XOR', 'LSHIFT', 'RSHIFT',
     'OR', 'AND', 'NOT', 'XOR', 'LSHIFT', 'RSHIFT',
     'LOR', 'LAND', 'LNOT',
     'LOR', 'LAND', 'LNOT',
     'LT', 'LE', 'GT', 'GE', 'EQ', 'NE',
     'LT', 'LE', 'GT', 'GE', 'EQ', 'NE',
-    
+
     # Assignment (=, *=, /=, %=, +=, -=, <<=, >>=, &=, ^=, |=)
     # Assignment (=, *=, /=, %=, +=, -=, <<=, >>=, &=, ^=, |=)
     'EQUALS', 'TIMESEQUAL', 'DIVEQUAL', 'MODEQUAL', 'PLUSEQUAL', 'MINUSEQUAL',
     'EQUALS', 'TIMESEQUAL', 'DIVEQUAL', 'MODEQUAL', 'PLUSEQUAL', 'MINUSEQUAL',
     'LSHIFTEQUAL','RSHIFTEQUAL', 'ANDEQUAL', 'XOREQUAL', 'OREQUAL',
     'LSHIFTEQUAL','RSHIFTEQUAL', 'ANDEQUAL', 'XOREQUAL', 'OREQUAL',
@@ -29,7 +29,7 @@ tokens = [
 
 
     # Ternary operator (?)
     # Ternary operator (?)
     'TERNARY',
     'TERNARY',
-    
+
     # Delimeters ( ) [ ] { } , . ; :
     # Delimeters ( ) [ ] { } , . ; :
     'LPAREN', 'RPAREN',
     'LPAREN', 'RPAREN',
     'LBRACKET', 'RBRACKET',
     'LBRACKET', 'RBRACKET',
@@ -39,7 +39,7 @@ tokens = [
     # Ellipsis (...)
     # Ellipsis (...)
     'ELLIPSIS',
     'ELLIPSIS',
 ]
 ]
-    
+
 # Operators
 # Operators
 t_PLUS             = r'\+'
 t_PLUS             = r'\+'
 t_MINUS            = r'-'
 t_MINUS            = r'-'
@@ -125,9 +125,3 @@ def t_CPPCOMMENT(t):
     r'//.*\n'
     r'//.*\n'
     t.lexer.lineno += 1
     t.lexer.lineno += 1
     return t
     return t
-
-
-    
-
-
-

+ 14 - 16
desktop/core/ext-py/ply-3.9/ply/lex.py → desktop/core/ext-py/ply-3.11/ply/lex.py

@@ -1,7 +1,7 @@
 # -----------------------------------------------------------------------------
 # -----------------------------------------------------------------------------
 # ply: lex.py
 # ply: lex.py
 #
 #
-# Copyright (C) 2001-2016
+# Copyright (C) 2001-2018
 # David M. Beazley (Dabeaz LLC)
 # David M. Beazley (Dabeaz LLC)
 # All rights reserved.
 # All rights reserved.
 #
 #
@@ -31,8 +31,8 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 # -----------------------------------------------------------------------------
 # -----------------------------------------------------------------------------
 
 
-__version__    = '3.9'
-__tabversion__ = '3.8'
+__version__    = '3.11'
+__tabversion__ = '3.10'
 
 
 import re
 import re
 import sys
 import sys
@@ -179,12 +179,12 @@ class Lexer:
         with open(filename, 'w') as tf:
         with open(filename, 'w') as tf:
             tf.write('# %s.py. This file automatically created by PLY (version %s). Don\'t edit!\n' % (basetabmodule, __version__))
             tf.write('# %s.py. This file automatically created by PLY (version %s). Don\'t edit!\n' % (basetabmodule, __version__))
             tf.write('_tabversion   = %s\n' % repr(__tabversion__))
             tf.write('_tabversion   = %s\n' % repr(__tabversion__))
-            tf.write('_lextokens    = set(%s)\n' % repr(tuple(self.lextokens)))
-            tf.write('_lexreflags   = %s\n' % repr(self.lexreflags))
+            tf.write('_lextokens    = set(%s)\n' % repr(tuple(sorted(self.lextokens))))
+            tf.write('_lexreflags   = %s\n' % repr(int(self.lexreflags)))
             tf.write('_lexliterals  = %s\n' % repr(self.lexliterals))
             tf.write('_lexliterals  = %s\n' % repr(self.lexliterals))
             tf.write('_lexstateinfo = %s\n' % repr(self.lexstateinfo))
             tf.write('_lexstateinfo = %s\n' % repr(self.lexstateinfo))
 
 
-            # Rewrite the lexstatere table, replacing function objects with function names 
+            # Rewrite the lexstatere table, replacing function objects with function names
             tabre = {}
             tabre = {}
             for statename, lre in self.lexstatere.items():
             for statename, lre in self.lexstatere.items():
                 titem = []
                 titem = []
@@ -230,7 +230,7 @@ class Lexer:
             titem = []
             titem = []
             txtitem = []
             txtitem = []
             for pat, func_name in lre:
             for pat, func_name in lre:
-                titem.append((re.compile(pat, lextab._lexreflags | re.VERBOSE), _names_to_funcs(func_name, fdict)))
+                titem.append((re.compile(pat, lextab._lexreflags), _names_to_funcs(func_name, fdict)))
 
 
             self.lexstatere[statename] = titem
             self.lexstatere[statename] = titem
             self.lexstateretext[statename] = txtitem
             self.lexstateretext[statename] = txtitem
@@ -495,7 +495,7 @@ def _form_master_re(relist, reflags, ldict, toknames):
         return []
         return []
     regex = '|'.join(relist)
     regex = '|'.join(relist)
     try:
     try:
-        lexre = re.compile(regex, re.VERBOSE | reflags)
+        lexre = re.compile(regex, reflags)
 
 
         # Build the index to function map for the matching engine
         # Build the index to function map for the matching engine
         lexindexfunc = [None] * (max(lexre.groupindex.values()) + 1)
         lexindexfunc = [None] * (max(lexre.groupindex.values()) + 1)
@@ -531,12 +531,11 @@ def _form_master_re(relist, reflags, ldict, toknames):
 # calling this with s = "t_foo_bar_SPAM" might return (('foo','bar'),'SPAM')
 # calling this with s = "t_foo_bar_SPAM" might return (('foo','bar'),'SPAM')
 # -----------------------------------------------------------------------------
 # -----------------------------------------------------------------------------
 def _statetoken(s, names):
 def _statetoken(s, names):
-    nonstate = 1
     parts = s.split('_')
     parts = s.split('_')
     for i, part in enumerate(parts[1:], 1):
     for i, part in enumerate(parts[1:], 1):
         if part not in names and part != 'ANY':
         if part not in names and part != 'ANY':
             break
             break
-    
+
     if i > 1:
     if i > 1:
         states = tuple(parts[1:i])
         states = tuple(parts[1:i])
     else:
     else:
@@ -758,7 +757,7 @@ class LexerReflect(object):
                     continue
                     continue
 
 
                 try:
                 try:
-                    c = re.compile('(?P<%s>%s)' % (fname, _get_regex(f)), re.VERBOSE | self.reflags)
+                    c = re.compile('(?P<%s>%s)' % (fname, _get_regex(f)), self.reflags)
                     if c.match(''):
                     if c.match(''):
                         self.log.error("%s:%d: Regular expression for rule '%s' matches empty string", file, line, f.__name__)
                         self.log.error("%s:%d: Regular expression for rule '%s' matches empty string", file, line, f.__name__)
                         self.error = True
                         self.error = True
@@ -782,7 +781,7 @@ class LexerReflect(object):
                     continue
                     continue
 
 
                 try:
                 try:
-                    c = re.compile('(?P<%s>%s)' % (name, r), re.VERBOSE | self.reflags)
+                    c = re.compile('(?P<%s>%s)' % (name, r), self.reflags)
                     if (c.match('')):
                     if (c.match('')):
                         self.log.error("Regular expression for rule '%s' matches empty string", name)
                         self.log.error("Regular expression for rule '%s' matches empty string", name)
                         self.error = True
                         self.error = True
@@ -861,7 +860,7 @@ class LexerReflect(object):
 # Build all of the regular expression rules from definitions in the supplied module
 # Build all of the regular expression rules from definitions in the supplied module
 # -----------------------------------------------------------------------------
 # -----------------------------------------------------------------------------
 def lex(module=None, object=None, debug=False, optimize=False, lextab='lextab',
 def lex(module=None, object=None, debug=False, optimize=False, lextab='lextab',
-        reflags=0, nowarn=False, outputdir=None, debuglog=None, errorlog=None):
+        reflags=int(re.VERBOSE), nowarn=False, outputdir=None, debuglog=None, errorlog=None):
 
 
     if lextab is None:
     if lextab is None:
         lextab = 'lextab'
         lextab = 'lextab'
@@ -949,8 +948,6 @@ def lex(module=None, object=None, debug=False, optimize=False, lextab='lextab',
 
 
         # Add rules defined by functions first
         # Add rules defined by functions first
         for fname, f in linfo.funcsym[state]:
         for fname, f in linfo.funcsym[state]:
-            line = f.__code__.co_firstlineno
-            file = f.__code__.co_filename
             regex_list.append('(?P<%s>%s)' % (fname, _get_regex(f)))
             regex_list.append('(?P<%s>%s)' % (fname, _get_regex(f)))
             if debug:
             if debug:
                 debuglog.info("lex: Adding rule %s -> '%s' (state '%s')", fname, _get_regex(f), state)
                 debuglog.info("lex: Adding rule %s -> '%s' (state '%s')", fname, _get_regex(f), state)
@@ -1041,6 +1038,8 @@ def lex(module=None, object=None, debug=False, optimize=False, lextab='lextab',
             outputdir = os.path.dirname(srcfile)
             outputdir = os.path.dirname(srcfile)
         try:
         try:
             lexobj.writetab(lextab, outputdir)
             lexobj.writetab(lextab, outputdir)
+            if lextab in sys.modules:
+                del sys.modules[lextab]
         except IOError as e:
         except IOError as e:
             errorlog.warning("Couldn't write lextab module %r. %s" % (lextab, e))
             errorlog.warning("Couldn't write lextab module %r. %s" % (lextab, e))
 
 
@@ -1097,4 +1096,3 @@ def TOKEN(r):
 
 
 # Alternative spelling of the TOKEN decorator
 # Alternative spelling of the TOKEN decorator
 Token = TOKEN
 Token = TOKEN
-

+ 36 - 26
desktop/core/ext-py/ply-3.9/ply/yacc.py → desktop/core/ext-py/ply-3.11/ply/yacc.py

@@ -1,7 +1,7 @@
 # -----------------------------------------------------------------------------
 # -----------------------------------------------------------------------------
 # ply: yacc.py
 # ply: yacc.py
 #
 #
-# Copyright (C) 2001-2016
+# Copyright (C) 2001-2018
 # David M. Beazley (Dabeaz LLC)
 # David M. Beazley (Dabeaz LLC)
 # All rights reserved.
 # All rights reserved.
 #
 #
@@ -32,7 +32,7 @@
 # -----------------------------------------------------------------------------
 # -----------------------------------------------------------------------------
 #
 #
 # This implements an LR parser that is constructed from grammar rules defined
 # This implements an LR parser that is constructed from grammar rules defined
-# as Python functions. The grammer is specified by supplying the BNF inside
+# as Python functions. The grammar is specified by supplying the BNF inside
 # Python documentation strings.  The inspiration for this technique was borrowed
 # Python documentation strings.  The inspiration for this technique was borrowed
 # from John Aycock's Spark parsing system.  PLY might be viewed as cross between
 # from John Aycock's Spark parsing system.  PLY might be viewed as cross between
 # Spark and the GNU bison utility.
 # Spark and the GNU bison utility.
@@ -64,11 +64,10 @@ import types
 import sys
 import sys
 import os.path
 import os.path
 import inspect
 import inspect
-import base64
 import warnings
 import warnings
 
 
-__version__    = '3.9'
-__tabversion__ = '3.8'
+__version__    = '3.11'
+__tabversion__ = '3.10'
 
 
 #-----------------------------------------------------------------------------
 #-----------------------------------------------------------------------------
 #                     === User configurable parameters ===
 #                     === User configurable parameters ===
@@ -268,6 +267,9 @@ class YaccProduction:
     def lexpos(self, n):
     def lexpos(self, n):
         return getattr(self.slice[n], 'lexpos', 0)
         return getattr(self.slice[n], 'lexpos', 0)
 
 
+    def set_lexpos(self, n, lexpos):
+        self.slice[n].lexpos = lexpos
+
     def lexspan(self, n):
     def lexspan(self, n):
         startpos = getattr(self.slice[n], 'lexpos', 0)
         startpos = getattr(self.slice[n], 'lexpos', 0)
         endpos = getattr(self.slice[n], 'endlexpos', startpos)
         endpos = getattr(self.slice[n], 'endlexpos', startpos)
@@ -1360,7 +1362,7 @@ class Production(object):
         p = LRItem(self, n)
         p = LRItem(self, n)
         # Precompute the list of productions immediately following.
         # Precompute the list of productions immediately following.
         try:
         try:
-            p.lr_after = Prodnames[p.prod[n+1]]
+            p.lr_after = self.Prodnames[p.prod[n+1]]
         except (IndexError, KeyError):
         except (IndexError, KeyError):
             p.lr_after = []
             p.lr_after = []
         try:
         try:
@@ -2301,7 +2303,6 @@ class LRGeneratedTable(LRTable):
     # -----------------------------------------------------------------------------
     # -----------------------------------------------------------------------------
 
 
     def dr_relation(self, C, trans, nullable):
     def dr_relation(self, C, trans, nullable):
-        dr_set = {}
         state, N = trans
         state, N = trans
         terms = []
         terms = []
 
 
@@ -2585,8 +2586,13 @@ class LRGeneratedTable(LRTable):
                                         # Need to decide on shift or reduce here
                                         # Need to decide on shift or reduce here
                                         # By default we favor shifting. Need to add
                                         # By default we favor shifting. Need to add
                                         # some precedence rules here.
                                         # some precedence rules here.
-                                        sprec, slevel = Productions[st_actionp[a].number].prec
-                                        rprec, rlevel = Precedence.get(a, ('right', 0))
+
+                                        # Shift precedence comes from the token
+                                        sprec, slevel = Precedence.get(a, ('right', 0))
+
+                                        # Reduce precedence comes from rule being reduced (p)
+                                        rprec, rlevel = Productions[p.number].prec
+
                                         if (slevel < rlevel) or ((slevel == rlevel) and (rprec == 'left')):
                                         if (slevel < rlevel) or ((slevel == rlevel) and (rprec == 'left')):
                                             # We really need to reduce here.
                                             # We really need to reduce here.
                                             st_action[a] = -p.number
                                             st_action[a] = -p.number
@@ -2644,8 +2650,13 @@ class LRGeneratedTable(LRTable):
                                         #   -  if precedence of reduce rule is higher, we reduce.
                                         #   -  if precedence of reduce rule is higher, we reduce.
                                         #   -  if precedence of reduce is same and left assoc, we reduce.
                                         #   -  if precedence of reduce is same and left assoc, we reduce.
                                         #   -  otherwise we shift
                                         #   -  otherwise we shift
-                                        rprec, rlevel = Productions[st_actionp[a].number].prec
+
+                                        # Shift precedence comes from the token
                                         sprec, slevel = Precedence.get(a, ('right', 0))
                                         sprec, slevel = Precedence.get(a, ('right', 0))
+
+                                        # Reduce precedence comes from the rule that could have been reduced
+                                        rprec, rlevel = Productions[st_actionp[a].number].prec
+
                                         if (slevel > rlevel) or ((slevel == rlevel) and (rprec == 'right')):
                                         if (slevel > rlevel) or ((slevel == rlevel) and (rprec == 'right')):
                                             # We decide to shift here... highest precedence to shift
                                             # We decide to shift here... highest precedence to shift
                                             Productions[st_actionp[a].number].reduced -= 1
                                             Productions[st_actionp[a].number].reduced -= 1
@@ -2725,6 +2736,7 @@ class LRGeneratedTable(LRTable):
             f.write('''
             f.write('''
 # %s
 # %s
 # This file is automatically generated. Do not edit.
 # This file is automatically generated. Do not edit.
+# pylint: disable=W,C,R
 _tabversion = %r
 _tabversion = %r
 
 
 _lr_method = %r
 _lr_method = %r
@@ -2958,28 +2970,20 @@ class ParserReflect(object):
 
 
     # Compute a signature over the grammar
     # Compute a signature over the grammar
     def signature(self):
     def signature(self):
+        parts = []
         try:
         try:
-            from hashlib import md5
-        except ImportError:
-            from md5 import md5
-        try:
-            sig = md5()
             if self.start:
             if self.start:
-                sig.update(self.start.encode('latin-1'))
+                parts.append(self.start)
             if self.prec:
             if self.prec:
-                sig.update(''.join([''.join(p) for p in self.prec]).encode('latin-1'))
+                parts.append(''.join([''.join(p) for p in self.prec]))
             if self.tokens:
             if self.tokens:
-                sig.update(' '.join(self.tokens).encode('latin-1'))
+                parts.append(' '.join(self.tokens))
             for f in self.pfuncs:
             for f in self.pfuncs:
                 if f[3]:
                 if f[3]:
-                    sig.update(f[3].encode('latin-1'))
+                    parts.append(f[3])
         except (TypeError, ValueError):
         except (TypeError, ValueError):
             pass
             pass
-
-        digest = base64.b16encode(sig.digest())
-        if sys.version_info[0] >= 3:
-            digest = digest.decode('latin-1')
-        return digest
+        return ''.join(parts)
 
 
     # -----------------------------------------------------------------------------
     # -----------------------------------------------------------------------------
     # validate_modules()
     # validate_modules()
@@ -3070,7 +3074,7 @@ class ParserReflect(object):
             self.error = True
             self.error = True
             return
             return
 
 
-        self.tokens = tokens
+        self.tokens = sorted(tokens)
 
 
     # Validate the tokens
     # Validate the tokens
     def validate_tokens(self):
     def validate_tokens(self):
@@ -3230,9 +3234,13 @@ def yacc(method='LALR', debug=yaccdebug, module=None, tabmodule=tab_module, star
     if module:
     if module:
         _items = [(k, getattr(module, k)) for k in dir(module)]
         _items = [(k, getattr(module, k)) for k in dir(module)]
         pdict = dict(_items)
         pdict = dict(_items)
-        # If no __file__ attribute is available, try to obtain it from the __module__ instead
+        # If no __file__ or __package__ attributes are available, try to obtain them
+        # from the __module__ instead
         if '__file__' not in pdict:
         if '__file__' not in pdict:
             pdict['__file__'] = sys.modules[pdict['__module__']].__file__
             pdict['__file__'] = sys.modules[pdict['__module__']].__file__
+        if '__package__' not in pdict and '__module__' in pdict:
+            if hasattr(sys.modules[pdict['__module__']], '__package__'):
+                pdict['__package__'] = sys.modules[pdict['__module__']].__package__
     else:
     else:
         pdict = get_caller_module_dict(2)
         pdict = get_caller_module_dict(2)
 
 
@@ -3474,6 +3482,8 @@ def yacc(method='LALR', debug=yaccdebug, module=None, tabmodule=tab_module, star
     if write_tables:
     if write_tables:
         try:
         try:
             lr.write_table(tabmodule, outputdir, signature)
             lr.write_table(tabmodule, outputdir, signature)
+            if tabmodule in sys.modules:
+                del sys.modules[tabmodule]
         except IOError as e:
         except IOError as e:
             errorlog.warning("Couldn't create %r. %s" % (tabmodule, e))
             errorlog.warning("Couldn't create %r. %s" % (tabmodule, e))
 
 

+ 1 - 6
desktop/core/ext-py/ply-3.9/ply/ygen.py → desktop/core/ext-py/ply-3.11/ply/ygen.py

@@ -3,7 +3,7 @@
 # This is a support program that auto-generates different versions of the YACC parsing
 # This is a support program that auto-generates different versions of the YACC parsing
 # function with different features removed for the purposes of performance.
 # function with different features removed for the purposes of performance.
 #
 #
-# Users should edit the method LParser.parsedebug() in yacc.py.   The source code 
+# Users should edit the method LRParser.parsedebug() in yacc.py.   The source code
 # for that method is then used to create the other methods.   See the comments in
 # for that method is then used to create the other methods.   See the comments in
 # yacc.py for further details.
 # yacc.py for further details.
 
 
@@ -67,8 +67,3 @@ def main():
 
 
 if __name__ == '__main__':
 if __name__ == '__main__':
     main()
     main()
-
-
-
-
-

+ 0 - 1
desktop/core/ext-py/ply-3.9/setup.cfg → desktop/core/ext-py/ply-3.11/setup.cfg

@@ -7,5 +7,4 @@ description-file = README.md
 [egg_info]
 [egg_info]
 tag_build = 
 tag_build = 
 tag_date = 0
 tag_date = 0
-tag_svn_revision = 0
 
 

+ 1 - 1
desktop/core/ext-py/ply-3.9/setup.py → desktop/core/ext-py/ply-3.11/setup.py

@@ -17,7 +17,7 @@ PLY is extremely easy to use and provides very extensive error checking.
 It is compatible with both Python 2 and Python 3.
 It is compatible with both Python 2 and Python 3.
 """,
 """,
             license="""BSD""",
             license="""BSD""",
-            version = "3.9",
+            version = "3.11",
             author = "David Beazley",
             author = "David Beazley",
             author_email = "dave@dabeaz.com",
             author_email = "dave@dabeaz.com",
             maintainer = "David Beazley",
             maintainer = "David Beazley",

+ 1 - 0
desktop/core/ext-py/ply-3.9/test/README → desktop/core/ext-py/ply-3.11/test/README

@@ -3,5 +3,6 @@ conditions.  To run:
 
 
   $ python testlex.py 
   $ python testlex.py 
   $ python testyacc.py 
   $ python testyacc.py 
+  $ python testcpp.py
 
 
 The script 'cleanup.sh' cleans up this directory to its original state.
 The script 'cleanup.sh' cleans up this directory to its original state.

+ 0 - 0
desktop/core/ext-py/ply-3.9/test/calclex.py → desktop/core/ext-py/ply-3.11/test/calclex.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/cleanup.sh → desktop/core/ext-py/ply-3.11/test/cleanup.sh


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_closure.py → desktop/core/ext-py/ply-3.11/test/lex_closure.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_doc1.py → desktop/core/ext-py/ply-3.11/test/lex_doc1.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_dup1.py → desktop/core/ext-py/ply-3.11/test/lex_dup1.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_dup2.py → desktop/core/ext-py/ply-3.11/test/lex_dup2.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_dup3.py → desktop/core/ext-py/ply-3.11/test/lex_dup3.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_empty.py → desktop/core/ext-py/ply-3.11/test/lex_empty.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_error1.py → desktop/core/ext-py/ply-3.11/test/lex_error1.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_error2.py → desktop/core/ext-py/ply-3.11/test/lex_error2.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_error3.py → desktop/core/ext-py/ply-3.11/test/lex_error3.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_error4.py → desktop/core/ext-py/ply-3.11/test/lex_error4.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_hedit.py → desktop/core/ext-py/ply-3.11/test/lex_hedit.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_ignore.py → desktop/core/ext-py/ply-3.11/test/lex_ignore.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_ignore2.py → desktop/core/ext-py/ply-3.11/test/lex_ignore2.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_literal1.py → desktop/core/ext-py/ply-3.11/test/lex_literal1.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_literal2.py → desktop/core/ext-py/ply-3.11/test/lex_literal2.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_literal3.py → desktop/core/ext-py/ply-3.11/test/lex_literal3.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_many_tokens.py → desktop/core/ext-py/ply-3.11/test/lex_many_tokens.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_module.py → desktop/core/ext-py/ply-3.11/test/lex_module.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_module_import.py → desktop/core/ext-py/ply-3.11/test/lex_module_import.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_object.py → desktop/core/ext-py/ply-3.11/test/lex_object.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_opt_alias.py → desktop/core/ext-py/ply-3.11/test/lex_opt_alias.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_optimize.py → desktop/core/ext-py/ply-3.11/test/lex_optimize.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_optimize2.py → desktop/core/ext-py/ply-3.11/test/lex_optimize2.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_optimize3.py → desktop/core/ext-py/ply-3.11/test/lex_optimize3.py


+ 26 - 0
desktop/core/ext-py/ply-3.11/test/lex_optimize4.py

@@ -0,0 +1,26 @@
+# -----------------------------------------------------------------------------
+# lex_optimize4.py
+# -----------------------------------------------------------------------------
+import re
+import sys
+
+if ".." not in sys.path: sys.path.insert(0,"..")
+import ply.lex as lex
+
+tokens = [
+    "PLUS",
+    "MINUS",
+    "NUMBER",
+    ]
+
+t_PLUS = r'\+?'
+t_MINUS = r'-'
+t_NUMBER = r'(\d+)'
+
+def t_error(t):
+    pass
+
+
+# Build the lexer
+lex.lex(optimize=True, lextab="opt4tab", reflags=re.UNICODE)
+lex.runmain(data="3+4")

+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_re1.py → desktop/core/ext-py/ply-3.11/test/lex_re1.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_re2.py → desktop/core/ext-py/ply-3.11/test/lex_re2.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_re3.py → desktop/core/ext-py/ply-3.11/test/lex_re3.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_rule1.py → desktop/core/ext-py/ply-3.11/test/lex_rule1.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_rule2.py → desktop/core/ext-py/ply-3.11/test/lex_rule2.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_rule3.py → desktop/core/ext-py/ply-3.11/test/lex_rule3.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_state1.py → desktop/core/ext-py/ply-3.11/test/lex_state1.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_state2.py → desktop/core/ext-py/ply-3.11/test/lex_state2.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_state3.py → desktop/core/ext-py/ply-3.11/test/lex_state3.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_state4.py → desktop/core/ext-py/ply-3.11/test/lex_state4.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_state5.py → desktop/core/ext-py/ply-3.11/test/lex_state5.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_state_noerror.py → desktop/core/ext-py/ply-3.11/test/lex_state_noerror.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_state_norule.py → desktop/core/ext-py/ply-3.11/test/lex_state_norule.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_state_try.py → desktop/core/ext-py/ply-3.11/test/lex_state_try.py


+ 0 - 0
desktop/core/ext-py/ply-3.9/test/lex_token1.py → desktop/core/ext-py/ply-3.11/test/lex_token1.py


Some files were not shown because too many files changed in this diff