PyReprism 0.0.2__tar.gz → 0.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. pyreprism-0.0.3/.flake8 +7 -0
  2. pyreprism-0.0.3/.github/FUNDING.yaml +1 -0
  3. pyreprism-0.0.3/.github/ISSUE_TEMPLATE/bug_report.md +17 -0
  4. pyreprism-0.0.3/.github/ISSUE_TEMPLATE/feature_request.md +17 -0
  5. pyreprism-0.0.3/.github/PULL_REQUEST_TEMPLATE.md +13 -0
  6. pyreprism-0.0.3/.github/workflows/ci.yml +41 -0
  7. pyreprism-0.0.3/.github/workflows/publish.yml +38 -0
  8. pyreprism-0.0.3/.readthedocs.yaml +31 -0
  9. pyreprism-0.0.3/CONTRIBUTING.md +65 -0
  10. {pyreprism-0.0.2 → pyreprism-0.0.3}/PKG-INFO +39 -22
  11. pyreprism-0.0.3/README.md +91 -0
  12. pyreprism-0.0.3/codecov.yml +13 -0
  13. {pyreprism-0.0.2 → pyreprism-0.0.3}/pyproject.toml +5 -7
  14. pyreprism-0.0.3/requirements.txt +7 -0
  15. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/__init__.py +1 -1
  16. pyreprism-0.0.3/src/PyReprism/languages/abap.py +50 -0
  17. pyreprism-0.0.3/src/PyReprism/languages/actionscript.py +43 -0
  18. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/ada.py +7 -11
  19. pyreprism-0.0.3/src/PyReprism/languages/apacheconf.py +49 -0
  20. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/apl.py +7 -10
  21. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/applescript.py +7 -10
  22. pyreprism-0.0.3/src/PyReprism/languages/arduino.py +49 -0
  23. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/arff.py +7 -10
  24. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/asciidoc.py +7 -10
  25. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/asm6502.py +7 -9
  26. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/aspnet.py +7 -9
  27. pyreprism-0.0.3/src/PyReprism/languages/autohotkey.py +49 -0
  28. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/autoit.py +9 -10
  29. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/bash.py +8 -11
  30. pyreprism-0.0.3/src/PyReprism/languages/basic.py +49 -0
  31. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/batch.py +7 -10
  32. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/bison.py +9 -11
  33. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/brainfuck.py +8 -10
  34. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/bro.py +8 -9
  35. pyreprism-0.0.3/src/PyReprism/languages/c.py +43 -0
  36. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/clike.py +8 -11
  37. pyreprism-0.0.3/src/PyReprism/languages/clojure.py +50 -0
  38. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/coffeescript.py +7 -8
  39. pyreprism-0.0.3/src/PyReprism/languages/cpp.py +43 -0
  40. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/crystal.py +7 -8
  41. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/csharp.py +7 -11
  42. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/csp.py +7 -8
  43. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/css.py +8 -9
  44. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/css_extras.py +8 -9
  45. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/d.py +7 -8
  46. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/dart.py +8 -11
  47. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/diff.py +8 -8
  48. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/django.py +12 -19
  49. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/docker.py +7 -8
  50. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/eiffel.py +8 -8
  51. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/elixir.py +7 -8
  52. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/erlang.py +7 -8
  53. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/fortran.py +6 -6
  54. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/fsharp.py +8 -8
  55. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/go.py +7 -11
  56. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/graphql.py +7 -8
  57. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/groovy.py +7 -11
  58. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/haml.py +7 -8
  59. pyreprism-0.0.3/src/PyReprism/languages/haskell.py +49 -0
  60. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/html.py +10 -17
  61. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/ini.py +5 -6
  62. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/j.py +7 -8
  63. pyreprism-0.0.3/src/PyReprism/languages/java.py +43 -0
  64. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/javascript.py +7 -11
  65. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/jolie.py +7 -8
  66. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/json.py +7 -8
  67. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/jsx.py +7 -11
  68. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/julia.py +7 -11
  69. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/kotlin.py +7 -11
  70. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/latex.py +7 -8
  71. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/less.py +8 -9
  72. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/liquid.py +8 -8
  73. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/livescript.py +8 -8
  74. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/makefile.py +7 -8
  75. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/markdown.py +4 -5
  76. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/markup.py +9 -10
  77. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/matlab.py +10 -12
  78. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/n4js.py +8 -9
  79. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/nginx.py +7 -8
  80. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/objectivec.py +10 -10
  81. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/ocaml.py +10 -12
  82. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/pascal.py +10 -11
  83. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/perl.py +9 -13
  84. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/php.py +9 -10
  85. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/prolog.py +9 -11
  86. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/python.py +11 -14
  87. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/ruby.py +8 -9
  88. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/rust.py +8 -11
  89. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/scala.py +7 -11
  90. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/scheme.py +9 -11
  91. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/scss.py +10 -10
  92. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/smalltalk.py +9 -11
  93. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/stylus.py +8 -11
  94. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/swift.py +8 -11
  95. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/tsx.py +7 -10
  96. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/typescript.py +7 -10
  97. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/vbnet.py +9 -11
  98. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/velocity.py +8 -11
  99. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/vim.py +9 -11
  100. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/visual_basic.py +9 -11
  101. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/yaml.py +9 -12
  102. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/utils/extension.py +1 -1
  103. pyreprism-0.0.3/src/PyReprism/utils/normalizer.py +15 -0
  104. pyreprism-0.0.2/.flake8 +0 -6
  105. pyreprism-0.0.2/.readthedocs.yaml +0 -0
  106. pyreprism-0.0.2/README.md +0 -71
  107. pyreprism-0.0.2/requirements.txt +0 -3
  108. pyreprism-0.0.2/src/PyReprism/languages/_base.py +0 -30
  109. pyreprism-0.0.2/src/PyReprism/languages/abap.py +0 -52
  110. pyreprism-0.0.2/src/PyReprism/languages/actionscript.py +0 -52
  111. pyreprism-0.0.2/src/PyReprism/languages/apacheconf.py +0 -52
  112. pyreprism-0.0.2/src/PyReprism/languages/arduino.py +0 -52
  113. pyreprism-0.0.2/src/PyReprism/languages/autohotkey.py +0 -51
  114. pyreprism-0.0.2/src/PyReprism/languages/basic.py +0 -52
  115. pyreprism-0.0.2/src/PyReprism/languages/c.py +0 -52
  116. pyreprism-0.0.2/src/PyReprism/languages/clojure.py +0 -50
  117. pyreprism-0.0.2/src/PyReprism/languages/cpp.py +0 -52
  118. pyreprism-0.0.2/src/PyReprism/languages/haskell.py +0 -53
  119. pyreprism-0.0.2/src/PyReprism/languages/java.py +0 -53
  120. pyreprism-0.0.2/src/PyReprism/utils/normalizer.py +0 -18
  121. {pyreprism-0.0.2 → pyreprism-0.0.3}/.gitignore +0 -0
  122. {pyreprism-0.0.2 → pyreprism-0.0.3}/LICENSE +0 -0
  123. {pyreprism-0.0.2 → pyreprism-0.0.3}/pytest.ini +0 -0
  124. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/__init__.py +0 -0
  125. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/erb.py +0 -0
  126. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/flow.py +0 -0
  127. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/gedcom.py +0 -0
  128. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/gherkin.py +0 -0
  129. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/git.py +0 -0
  130. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/glsl.py +0 -0
  131. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/handlebars.py +0 -0
  132. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/haxe.py +0 -0
  133. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/hpkp.py +0 -0
  134. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/hsts.py +0 -0
  135. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/ichigojam.py +0 -0
  136. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/icon.py +0 -0
  137. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/inform7.py +0 -0
  138. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/io.py +0 -0
  139. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/keyman.py +0 -0
  140. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/lolcode.py +0 -0
  141. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/lua.py +0 -0
  142. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/markup_templating.py +0 -0
  143. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/mel.py +0 -0
  144. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/mizar.py +0 -0
  145. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/monkey.py +0 -0
  146. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/nasm.py +0 -0
  147. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/nim.py +0 -0
  148. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/nix.py +0 -0
  149. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/nsis.py +0 -0
  150. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/opencl.py +0 -0
  151. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/oz.py +0 -0
  152. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/parigp.py +0 -0
  153. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/parser.py +0 -0
  154. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/php_extras.py +0 -0
  155. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/plsql.py +0 -0
  156. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/powershell.py +0 -0
  157. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/processing.py +0 -0
  158. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/properties.py +0 -0
  159. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/protobuf.py +0 -0
  160. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/pug.py +0 -0
  161. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/puppet.py +0 -0
  162. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/pure.py +0 -0
  163. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/q.py +0 -0
  164. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/qore.py +0 -0
  165. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/r.py +0 -0
  166. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/reason.py +0 -0
  167. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/renpy.py +0 -0
  168. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/rest.py +0 -0
  169. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/rip.py +0 -0
  170. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/roboconf.py +0 -0
  171. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/sas.py +0 -0
  172. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/sass.py +0 -0
  173. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/smarty.py +0 -0
  174. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/soy.py +0 -0
  175. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/tcl.py +0 -0
  176. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/textile.py +0 -0
  177. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/twig.py +0 -0
  178. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/verilog.py +0 -0
  179. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/vhdl.py +0 -0
  180. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/wasam.py +0 -0
  181. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/xeora.py +0 -0
  182. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/languages/xojo.py +0 -0
  183. {pyreprism-0.0.2 → pyreprism-0.0.3}/src/PyReprism/utils/__init__.py +0 -0
@@ -0,0 +1,7 @@
1
+ [flake8]
2
+ show-source = True
3
+ count = True
4
+ statistics = True
5
+ ; max-line-length = 150
6
+ ignore = E501
7
+ exclude = .github,venv,build,dist,docs,.venv,src/tests,src/PyReprism/languages/__init__.py,__test__.py
@@ -0,0 +1 @@
1
+ github: unlv-evol
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the bug. For example, a specific commit in a repository, and/or a modification.
15
+
16
+ **OS Version:**
17
+ Windows/MacOS/Linux
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Example: I often have the problem of [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Additional context**
17
+ Add any other information or screenshots about the feature request here.
@@ -0,0 +1,13 @@
1
+ * **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)
2
+
3
+
4
+
5
+ * **What is the current behavior?** (You can also link to an open issue here)
6
+
7
+
8
+
9
+ * **What is the new behavior (if this is a feature change)?**
10
+
11
+
12
+
13
+ * **Other information**:
@@ -0,0 +1,41 @@
1
+ name: CI
2
+ on:
3
+ push:
4
+ branches-ignore:
5
+ - main
6
+ pull_request:
7
+ branches-ignore:
8
+ - main
9
+
10
+ jobs:
11
+ publish:
12
+ name: "Lint, test and upload to codecov"
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Check out the code
16
+ uses: actions/checkout@v3
17
+
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v3
20
+ with:
21
+ python-version: '3.x'
22
+
23
+ - name: Install dependencies
24
+ run: |
25
+ python -m pip install --upgrade pip
26
+ pip install flake8 pytest pytest-cov
27
+
28
+ - name: Lint with flake8
29
+ run: |
30
+ flake8 .
31
+
32
+ - name: Run tests with pytest
33
+ run: |
34
+ pytest --cov=src/ --cov-report=xml
35
+
36
+ - name: Upload coverage to Codecov
37
+ uses: codecov/codecov-action@v4
38
+ with:
39
+ verbose: true
40
+ env:
41
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
@@ -0,0 +1,38 @@
1
+ name: Publish Python 🐍 distributions 📦 to PyPI
2
+ on:
3
+ push:
4
+ tags:
5
+ - 'v*'
6
+ branches:
7
+ - main
8
+ - stable
9
+
10
+ jobs:
11
+ publish:
12
+ name: "Build and upload to pypi"
13
+ runs-on: "ubuntu-latest"
14
+ # environment:
15
+ # name: pypi
16
+ # url: https://pypi.org/project/PyReprism/
17
+ # permissions:
18
+ # id-token: write
19
+
20
+ steps:
21
+ - uses: actions/checkout@v3
22
+ - name: Install python
23
+ uses: actions/setup-python@v4
24
+ with:
25
+ python-version: '3.11'
26
+ - name: Install dependencies
27
+ run: |
28
+ python -m pip install --upgrade pip
29
+ pip install hatchling twine build hatch-vcs
30
+ - name: Build app
31
+ run: |
32
+ python -m build
33
+ - name: Publish distribution 📦 to PyPI
34
+ if: startsWith(github.ref, 'refs/tags')
35
+ uses: pypa/gh-action-pypi-publish@release/v1
36
+ with:
37
+ password: ${{ secrets.PYPI_API_TOKEN }}
38
+ # run: twine upload dist/*
@@ -0,0 +1,31 @@
1
+ # .readthedocs.yaml
2
+ # Read the Docs configuration file
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version: 2
7
+
8
+ # Set the version of Python and other tools you might need
9
+ build:
10
+ os: ubuntu-22.04
11
+ tools:
12
+ python: "3.10"
13
+ # You can also specify other tool versions:
14
+ # nodejs: "16"
15
+ # rust: "1.55"
16
+ # golang: "1.17"
17
+
18
+ # Build documentation in the docs/ directory with Sphinx
19
+ sphinx:
20
+ configuration: docs/conf.py
21
+
22
+ # If using Sphinx, optionally build your docs in additional formats such as PDF
23
+ # formats:
24
+ # - pdf
25
+
26
+ # Optionally declare the Python requirements required to build your docs
27
+ python:
28
+ install:
29
+ - requirements: docs/requirements.txt
30
+ - method: pip
31
+ path: .
@@ -0,0 +1,65 @@
1
+ # PyReprism Contributing Guide
2
+
3
+ Thank you for investing your time in contributing to this project!
4
+
5
+ In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.
6
+
7
+ ## New contributor guide
8
+
9
+ To get an overview of this project, to read the `README`:
10
+
11
+ - [README](README.md)
12
+ Here are some resources to help you get started with open source contributions:
13
+
14
+ - [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
15
+ - [Set up Git](https://docs.github.com/en/get-started/quickstart/set-up-git)
16
+ - [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests)
17
+
18
+ ## Getting started
19
+
20
+ ### Issues
21
+
22
+ #### Create a new issue
23
+
24
+ If you spot a problem with any of our product, check the [existing issues](https://github.com/unlv-evol/PyReprism/issues) to establish if the problem has already been reported. If a related issue doesn't exist, you can open a new issue using a relevant [issue form](https://github.com/unlv-evol/PyReprism/issues/new/choose).
25
+
26
+ #### Solve an issue
27
+
28
+ Scan through the [existing issues](https://github.com/unlv-evol/PyReprism/issues) to find one that interests you. You can narrow down the search using `labels` as filters. If you find an issue to work on, you are welcome to open a PR with a fix.
29
+
30
+ **Note** that you don't need to be assigned to this issue to work on it. Simply raise a PR that address it and add `closes #issue-number` in the PR description to [automatically link your PR to the issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword).
31
+
32
+ ### Make Changes
33
+
34
+ #### Make changes locally
35
+
36
+ 1. [Fork the repository](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository).
37
+
38
+ 2. [Create a working branch](https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-a-branch-for-an-issue) and start with your changes!
39
+
40
+ ## Style Guides
41
+ We try our best to adhere to the style guide for Python which is the main languages for this project. Please ensure that you follow the style guides according.
42
+ - [Python](https://google.github.io/styleguide/pyguide.html)
43
+
44
+ ### Commit your update
45
+
46
+ Commit the changes, with a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) once you are happy with them.
47
+
48
+ Once your changes are ready, don't forget to test and self-review them to speed up the review process:zap:.
49
+
50
+ ### Pull Request
51
+
52
+ When you're finished with the changes, create a pull request, also known as a PR.
53
+
54
+ - Fill the "Ready for review" template so that we can review your PR. This template helps reviewers understand your changes as well as the purpose of your pull request.
55
+ - Don't forget to [link PR to issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) if you are solving one.
56
+ - Enable the checkbox to [allow maintainer edits](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork) so the branch can be updated for a merge.
57
+ Once you submit your PR, maintainers will review your proposal.
58
+ - We may ask for changes to be made before a PR can be merged. You can apply suggested changes and/or make any other changes in your fork, then commit them to your branch.
59
+ - As you update your PR and apply changes, mark each conversation as [resolved](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#resolving-conversations).
60
+ - If you run into any merge conflict issues, checkout this [git tutorial](https://github.com/skills/resolve-merge-conflicts) to help you resolve merge conflicts and other issues.
61
+
62
+ ### Your PR is merged!
63
+
64
+ Congratulations :tada::tada: <br />
65
+ The PyReprism team thanks you :sparkles:.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: PyReprism
3
- Version: 0.0.2
3
+ Version: 0.0.3
4
4
  Summary: Framework for Source Code Preprocessing
5
5
  Project-URL: Homepage, https://github.com/unlv-evol/PyReprism
6
6
  Project-URL: Issues, https://github.com/unlv-evol/PyReprism/issues
@@ -33,11 +33,8 @@ Classifier: Intended Audience :: Developers
33
33
  Classifier: Intended Audience :: Science/Research
34
34
  Classifier: License :: OSI Approved :: MIT License
35
35
  Classifier: Operating System :: OS Independent
36
- Classifier: Programming Language :: Python :: 3.6
37
- Classifier: Programming Language :: Python :: 3.7
38
- Classifier: Programming Language :: Python :: 3.8
39
- Classifier: Programming Language :: Python :: 3.9
40
- Classifier: Programming Language :: Python :: 3.10
36
+ Classifier: Programming Language :: Python :: 3
37
+ Classifier: Programming Language :: Python :: 3.12
41
38
  Requires-Python: >=3.6
42
39
  Provides-Extra: dev
43
40
  Requires-Dist: flake8; extra == 'dev'
@@ -46,7 +43,13 @@ Requires-Dist: pytest-cov; extra == 'dev'
46
43
  Description-Content-Type: text/markdown
47
44
 
48
45
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
49
- ![PyPI - Downloads](https://img.shields.io/pypi/dd/PyReprism)
46
+ [![Downloads](https://static.pepy.tech/badge/pyreprism)](https://pepy.tech/project/pyreprism)
47
+ [![FOSSA Status](https://app.fossa.com/api/projects/custom%2B46484%2Fgithub.com%2Funlv-evol%2FPyReprism.svg?type=shield&issueType=license)](https://app.fossa.com/projects/custom%2B46484%2Fgithub.com%2Funlv-evol%2FPyReprism?ref=badge_shield&issueType=license)
48
+ [![FOSSA Status](https://app.fossa.com/api/projects/custom%2B46484%2Fgithub.com%2Funlv-evol%2FPyReprism.svg?type=shield&issueType=security)](https://app.fossa.com/projects/custom%2B46484%2Fgithub.com%2Funlv-evol%2FPyReprism?ref=badge_shield&issueType=security)
49
+ [![Documentation Status](https://readthedocs.org/projects/pyreprism/badge/?version=latest)](https://pyreprism.readthedocs.io/en/latest/?badge=latest)
50
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/PyReprism)
51
+ <!-- [![codecov](https://codecov.io/gh/unlv-evol/PyReprism/graph/badge.svg?token=J2JV31837H)](https://codecov.io/gh/unlv-evol/PyReprism) -->
52
+
50
53
  # PyReprism
51
54
 
52
55
  PyReprism is a suite of essential methods designed for common preprocessing tasks in code clone detection research.
@@ -73,46 +76,60 @@ print(x)
73
76
  """
74
77
 
75
78
  source = Python.remove_comments(source)
79
+
80
+ # expected output
81
+
82
+ x = 5 + 6
83
+
84
+
85
+ print(x)
86
+
76
87
  ```
77
88
 
78
89
  Use case 2: Removing whitespaces
79
90
  ```python
80
91
  from PyReprism.utils.normalizer import Normalizer
81
92
  source = """
82
- # single line comment
93
+
83
94
  x = 5 + 6
84
- '''
85
- multiline
86
- comment
87
- '''
95
+
96
+
88
97
  print(x)
98
+
89
99
  """
90
100
 
101
+
91
102
  source = Normalizer.remove_whitespaces(source)
103
+
104
+ # expected output
105
+ x=5+6
106
+ print(x)
92
107
  ```
93
108
 
94
- Read the [docs]() for more usage examples. -- Coming soon!!
109
+ Read the [docs](https://pyreprism.readthedocs.io) for more usage examples.
95
110
 
96
- NB: The beta versions of PyReprism is still highly unstable, we are working 24/7 to ensure the tool is usable.
111
+ NB: The beta versions of PyReprism is still unstable, but we are working 24/7 to ensure the tool is usable.
97
112
 
98
113
  ## How to Contribute
99
114
  We invite you to help us build this tool and make it more extensive. Contribution is open to OSS community.
100
115
 
101
116
  ```shell
102
- git clone https://github.com/unlv-evol/PyReprism.git
103
- cd PyReprism
117
+ $ git clone https://github.com/unlv-evol/PyReprism.git
118
+ $ cd PyReprism
104
119
  ```
105
120
  **(Optional)** It is suggested to make use of virtualenv. Therefore, before installing the requirements run:
106
121
 
107
- ```
108
- python3 -m venv venv
109
- source venv/bin/activate
122
+ ```shell
123
+ $ python3 -m venv venv
124
+ $ source venv/bin/activate
110
125
  ```
111
126
 
112
127
  Then, install the requirements:
113
128
 
129
+ ```shell
130
+ $ pip install -r requirements.txt
114
131
  ```
115
- pip install -r requirements.txt
116
- ```
132
+ For more information on how to contribute, read our [contributing guidelines](CONTRIBUTING.md).
133
+
117
134
  ## Issues
118
- If you experience any issue, feel free to report it here. We are developing the issue reporting guidelines which will be available soon.
135
+ If you experience any issue, feel free to report it.
@@ -0,0 +1,91 @@
1
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
2
+ [![Downloads](https://static.pepy.tech/badge/pyreprism)](https://pepy.tech/project/pyreprism)
3
+ [![FOSSA Status](https://app.fossa.com/api/projects/custom%2B46484%2Fgithub.com%2Funlv-evol%2FPyReprism.svg?type=shield&issueType=license)](https://app.fossa.com/projects/custom%2B46484%2Fgithub.com%2Funlv-evol%2FPyReprism?ref=badge_shield&issueType=license)
4
+ [![FOSSA Status](https://app.fossa.com/api/projects/custom%2B46484%2Fgithub.com%2Funlv-evol%2FPyReprism.svg?type=shield&issueType=security)](https://app.fossa.com/projects/custom%2B46484%2Fgithub.com%2Funlv-evol%2FPyReprism?ref=badge_shield&issueType=security)
5
+ [![Documentation Status](https://readthedocs.org/projects/pyreprism/badge/?version=latest)](https://pyreprism.readthedocs.io/en/latest/?badge=latest)
6
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/PyReprism)
7
+ <!-- [![codecov](https://codecov.io/gh/unlv-evol/PyReprism/graph/badge.svg?token=J2JV31837H)](https://codecov.io/gh/unlv-evol/PyReprism) -->
8
+
9
+ # PyReprism
10
+
11
+ PyReprism is a suite of essential methods designed for common preprocessing tasks in code clone detection research.
12
+
13
+ ## Install
14
+ ```shell
15
+ pip install PyReprism
16
+ ```
17
+ ## Quick Usage
18
+ Use case 1: Removing comments
19
+ ```python
20
+
21
+ from PyReprism.languages import Python
22
+ # from PyReprism.languages import Java
23
+
24
+ source = """
25
+ # single line comment
26
+ x = 5 + 6
27
+ '''
28
+ multiline
29
+ comment
30
+ '''
31
+ print(x)
32
+ """
33
+
34
+ source = Python.remove_comments(source)
35
+
36
+ # expected output
37
+
38
+ x = 5 + 6
39
+
40
+
41
+ print(x)
42
+
43
+ ```
44
+
45
+ Use case 2: Removing whitespaces
46
+ ```python
47
+ from PyReprism.utils.normalizer import Normalizer
48
+ source = """
49
+
50
+ x = 5 + 6
51
+
52
+
53
+ print(x)
54
+
55
+ """
56
+
57
+
58
+ source = Normalizer.remove_whitespaces(source)
59
+
60
+ # expected output
61
+ x=5+6
62
+ print(x)
63
+ ```
64
+
65
+ Read the [docs](https://pyreprism.readthedocs.io) for more usage examples.
66
+
67
+ NB: The beta versions of PyReprism is still unstable, but we are working 24/7 to ensure the tool is usable.
68
+
69
+ ## How to Contribute
70
+ We invite you to help us build this tool and make it more extensive. Contribution is open to OSS community.
71
+
72
+ ```shell
73
+ $ git clone https://github.com/unlv-evol/PyReprism.git
74
+ $ cd PyReprism
75
+ ```
76
+ **(Optional)** It is suggested to make use of virtualenv. Therefore, before installing the requirements run:
77
+
78
+ ```shell
79
+ $ python3 -m venv venv
80
+ $ source venv/bin/activate
81
+ ```
82
+
83
+ Then, install the requirements:
84
+
85
+ ```shell
86
+ $ pip install -r requirements.txt
87
+ ```
88
+ For more information on how to contribute, read our [contributing guidelines](CONTRIBUTING.md).
89
+
90
+ ## Issues
91
+ If you experience any issue, feel free to report it.
@@ -0,0 +1,13 @@
1
+ flag_management:
2
+ individual_flags:
3
+ - name: smart-tests
4
+ carryforward: true
5
+ carryforward_mode: "labels"
6
+ statuses:
7
+ - type: "project"
8
+ - type: "patch"
9
+
10
+ cli:
11
+ plugins:
12
+ pycoverage:
13
+ report_type: "json"
@@ -1,13 +1,14 @@
1
1
  [build-system]
2
- requires = ["hatchling"]
2
+ requires = ["hatchling", "hatch_vcs"]
3
3
  build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "PyReprism"
7
- version = "0.0.2"
7
+ version = "0.0.3"
8
8
  authors = [
9
9
  { name= "UNLV EVOL LAB", email="ogenrwot@unlv.nevada.edu" },
10
10
  ]
11
+
11
12
  license={file="LICENSE" }
12
13
  python_requires = ">=3.5"
13
14
  description = "Framework for Source Code Preprocessing"
@@ -18,11 +19,8 @@ classifiers = [
18
19
  "Development Status :: 4 - Beta",
19
20
  "Intended Audience :: Developers",
20
21
  "Intended Audience :: Science/Research",
21
- "Programming Language :: Python :: 3.6",
22
- "Programming Language :: Python :: 3.7",
23
- "Programming Language :: Python :: 3.8",
24
- "Programming Language :: Python :: 3.9",
25
- "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3",
23
+ "Programming Language :: Python :: 3.12",
26
24
  "License :: OSI Approved :: MIT License",
27
25
  "Operating System :: OS Independent",
28
26
  ]
@@ -0,0 +1,7 @@
1
+ pytest
2
+ flake8
3
+ pytest-cov
4
+ build
5
+ twine
6
+ hatchling
7
+ hatch-vcs
@@ -1,3 +1,4 @@
1
+ __version__ = "0.0.3"
1
2
  from .python import *
2
3
  from .java import *
3
4
  from .c import *
@@ -114,7 +115,6 @@ from .pure import *
114
115
  from .q import *
115
116
  from .qore import *
116
117
  from .r import *
117
- from .r import *
118
118
  from .reason import *
119
119
  from .renpy import *
120
120
  from .rest import *
@@ -0,0 +1,50 @@
1
+ import re
2
+ from PyReprism.utils import extension
3
+
4
+
5
+ class Abap:
6
+ def __init__(self):
7
+ pass
8
+
9
+ @staticmethod
10
+ def file_extension() -> str:
11
+ return extension.abap
12
+
13
+ @staticmethod
14
+ def keywords() -> list:
15
+ # keyword = 'SCIENTIFIC_WITH_LEADING_ZERO|SCALE_PRESERVING_SCIENTIFIC|RMC_COMMUNICATION_FAILURE|END-ENHANCEMENT-SECTION|MULTIPLY-CORRESPONDING|SUBTRACT-CORRESPONDING|VERIFICATION-MESSAGE|DIVIDE-CORRESPONDING|ENHANCEMENT-SECTION|CURRENCY_CONVERSION|RMC_SYSTEM_FAILURE|START-OF-SELECTION|MOVE-CORRESPONDING|RMC_INVALID_STATUS|CUSTOMER-FUNCTION|END-OF-DEFINITION|ENHANCEMENT-POINT|SYSTEM-EXCEPTIONS|ADD-CORRESPONDING|SCALE_PRESERVING|SELECTION-SCREEN|CURSOR-SELECTION|END-OF-SELECTION|LOAD-OF-PROGRAM|SCROLL-BOUNDARY|SELECTION-TABLE|EXCEPTION-TABLE|IMPLEMENTATIONS|PARAMETER-TABLE|RIGHT-JUSTIFIED|UNIT_CONVERSION|AUTHORITY-CHECK|LIST-PROCESSING|SIGN_AS_POSTFIX|COL_BACKGROUND|IMPLEMENTATION|INTERFACE-POOL|TRANSFORMATION|IDENTIFICATION|ENDENHANCEMENT|LINE-SELECTION|INITIALIZATION|LEFT-JUSTIFIED|SELECT-OPTIONS|SELECTION-SETS|COMMUNICATION|CORRESPONDING|DECIMAL_SHIFT|PRINT-CONTROL|VALUE-REQUEST|CHAIN-REQUEST|FUNCTION-POOL|FIELD-SYMBOLS|FUNCTIONALITY|INVERTED-DATE|SELECTION-SET|CLASS-METHODS|OUTPUT-LENGTH|CLASS-CODING|COL_NEGATIVE|ERRORMESSAGE|FIELD-GROUPS|HELP-REQUEST|NO-EXTENSION|NO-TOPOFPAGE|REDEFINITION|DISPLAY-MODE|ENDINTERFACE|EXIT-COMMAND|FIELD-SYMBOL|NO-SCROLLING|SHORTDUMP-ID|ACCESSPOLICY|CLASS-EVENTS|COL_POSITIVE|DECLARATIONS|ENHANCEMENTS|FILTER-TABLE|SWITCHSTATES|SYNTAX-CHECK|TRANSPORTING|ASYNCHRONOUS|SYNTAX-TRACE|TOKENIZATION|USER-COMMAND|WITH-HEADING|ABAP-SOURCE|BREAK-POINT|CHAIN-INPUT|COMPRESSION|FIXED-POINT|NEW-SECTION|NON-UNICODE|OCCURRENCES|RESPONSIBLE|SYSTEM-CALL|TRACE-TABLE|ABBREVIATED|CHAR-TO-HEX|END-OF-FILE|ENDFUNCTION|ENVIRONMENT|ASSOCIATION|COL_HEADING|EDITOR-CALL|END-OF-PAGE|ENGINEERING|IMPLEMENTED|INTENSIFIED|RADIOBUTTON|SYSTEM-EXIT|TOP-OF-PAGE|TRANSACTION|APPLICATION|CONCATENATE|DESTINATION|ENHANCEMENT|IMMEDIATELY|NO-GROUPING|PRECOMPILED|REPLACEMENT|TITLE-LINES|ACTIVATION|BYTE-ORDER|CLASS-POOL|CONNECTION|CONVERSION|DEFINITION|DEPARTMENT|EXPIRATION|INHERITING|MESSAGE-ID|NO-HEADING|PERFORMING|QUEUE-ONLY|RIGHTSPACE|SCIENTIFIC|STATUSINFO|STRUCTURES|SYNCPOINTS|WITH-TITLE|ATTRIBUTES|BOUNDARIES|CLASS-DATA|COL_NORMAL|DD\/MM\/YYYY|DESCENDING|INTERFACES|LINE-COUNT|MM\/DD\/YYYY|NON-UNIQUE|PRESERVING|SELECTIONS|STATEMENTS|SUBROUTINE|TRUNCATION|TYPE-POOLS|ARITHMETIC|BACKGROUND|ENDPROVIDE|EXCEPTIONS|IDENTIFIER|INDEX-LINE|OBLIGATORY|PARAMETERS|PERCENTAGE|PUSHBUTTON|RESOLUTION|COMPONENTS|DEALLOCATE|DISCONNECT|DUPLICATES|FIRST-LINE|HEAD-LINES|NO-DISPLAY|OCCURRENCE|RESPECTING|RETURNCODE|SUBMATCHES|TRACE-FILE|ASCENDING|BYPASSING|ENDMODULE|EXCEPTION|EXCLUDING|EXPORTING|INCREMENT|MATCHCODE|PARAMETER|PARTIALLY|PREFERRED|REFERENCE|REPLACING|RETURNING|SELECTION|SEPARATED|SPECIFIED|STATEMENT|TIMESTAMP|TYPE-POOL|ACCEPTING|APPENDAGE|ASSIGNING|COL_GROUP|COMPARING|CONSTANTS|DANGEROUS|IMPORTING|INSTANCES|LEFTSPACE|LOG-POINT|QUICKINFO|READ-ONLY|SCROLLING|SQLSCRIPT|STEP-LOOP|TOP-LINES|TRANSLATE|APPENDING|AUTHORITY|CHARACTER|COMPONENT|CONDITION|DIRECTORY|DUPLICATE|MESSAGING|RECEIVING|SUBSCREEN|ACCORDING|COL_TOTAL|END-LINES|ENDMETHOD|ENDSELECT|EXPANDING|EXTENSION|INCLUDING|INFOTYPES|INTERFACE|INTERVALS|LINE-SIZE|PF-STATUS|PROCEDURE|PROTECTED|REQUESTED|RESUMABLE|RIGHTPLUS|SAP-SPOOL|SECONDARY|STRUCTURE|SUBSTRING|TABLEVIEW|NUMOFCHAR|ADJACENT|ANALYSIS|ASSIGNED|BACKWARD|CHANNELS|CHECKBOX|CONTINUE|CRITICAL|DATAINFO|DD\/MM\/YY|DURATION|ENCODING|ENDCLASS|FUNCTION|LEFTPLUS|LINEFEED|MM\/DD\/YY|OVERFLOW|RECEIVED|SKIPPING|SORTABLE|STANDARD|SUBTRACT|SUPPRESS|TABSTRIP|TITLEBAR|TRUNCATE|UNASSIGN|WHENEVER|ANALYZER|COALESCE|COMMENTS|CONDENSE|DECIMALS|DEFERRED|ENDWHILE|EXPLICIT|KEYWORDS|MESSAGES|POSITION|PRIORITY|RECEIVER|RENAMING|TIMEZONE|TRAILING|ALLOCATE|CENTERED|CIRCULAR|CONTROLS|CURRENCY|DELETING|DESCRIBE|DISTANCE|ENDCATCH|EXPONENT|EXTENDED|GENERATE|IGNORING|INCLUDES|INTERNAL|MAJOR-ID|MODIFIER|NEW-LINE|OPTIONAL|PROPERTY|ROLLBACK|STARTING|SUPPLIED|ABSTRACT|CHANGING|CONTEXTS|CREATING|CUSTOMER|DATABASE|DAYLIGHT|DEFINING|DISTINCT|DIVISION|ENABLING|ENDCHAIN|ESCAPING|HARMLESS|IMPLICIT|INACTIVE|LANGUAGE|MINOR-ID|MULTIPLY|NEW-PAGE|NO-TITLE|POS_HIGH|SEPARATE|TEXTPOOL|TRANSFER|SELECTOR|DBMAXLEN|ITERATOR|SELECTOR|ARCHIVE|BIT-XOR|BYTE-CO|COLLECT|COMMENT|CURRENT|DEFAULT|DISPLAY|ENDFORM|EXTRACT|LEADING|LISTBOX|LOCATOR|MEMBERS|METHODS|NESTING|POS_LOW|PROCESS|PROVIDE|RAISING|RESERVE|SECONDS|SUMMARY|VISIBLE|BETWEEN|BIT-AND|BYTE-CS|CLEANUP|COMPUTE|CONTROL|CONVERT|DATASET|ENDCASE|FORWARD|HEADERS|HOTSPOT|INCLUDE|INVERSE|KEEPING|NO-ZERO|OBJECTS|OVERLAY|PADDING|PATTERN|PROGRAM|REFRESH|SECTION|SUMMING|TESTING|VERSION|WINDOWS|WITHOUT|BIT-NOT|BYTE-CA|BYTE-NA|CASTING|CONTEXT|COUNTRY|DYNAMIC|ENABLED|ENDLOOP|EXECUTE|FRIENDS|HANDLER|HEADING|INITIAL|\*-INPUT|LOGFILE|MAXIMUM|MINIMUM|NO-GAPS|NO-SIGN|PRAGMAS|PRIMARY|PRIVATE|REDUCED|REPLACE|REQUEST|RESULTS|UNICODE|WARNING|ALIASES|BYTE-CN|BYTE-NS|CALLING|COL_KEY|COLUMNS|CONNECT|ENDEXEC|ENTRIES|EXCLUDE|FILTERS|FURTHER|HELP-ID|LOGICAL|MAPPING|MESSAGE|NAMETAB|OPTIONS|PACKAGE|PERFORM|RECEIVE|STATICS|VARYING|BINDING|CHARLEN|GREATER|XSTRLEN|ACCEPT|APPEND|DETAIL|ELSEIF|ENDING|ENDTRY|FORMAT|FRAMES|GIVING|HASHED|HEADER|IMPORT|INSERT|MARGIN|MODULE|NATIVE|OBJECT|OFFSET|REMOTE|RESUME|SAVING|SIMPLE|SUBMIT|TABBED|TOKENS|UNIQUE|UNPACK|UPDATE|WINDOW|YELLOW|ACTUAL|ASPECT|CENTER|CURSOR|DELETE|DIALOG|DIVIDE|DURING|ERRORS|EVENTS|EXTEND|FILTER|HANDLE|HAVING|IGNORE|LITTLE|MEMORY|NO-GAP|OCCURS|OPTION|PERSON|PLACES|PUBLIC|REDUCE|REPORT|RESULT|SINGLE|SORTED|SWITCH|SYNTAX|TARGET|VALUES|WRITER|ASSERT|BLOCKS|BOUNDS|BUFFER|CHANGE|COLUMN|COMMIT|CONCAT|COPIES|CREATE|DDMMYY|DEFINE|ENDIAN|ESCAPE|EXPAND|KERNEL|LAYOUT|LEGACY|LEVELS|MMDDYY|NUMBER|OUTPUT|RANGES|READER|RETURN|SCREEN|SEARCH|SELECT|SHARED|SOURCE|STABLE|STATIC|SUBKEY|SUFFIX|TABLES|UNWIND|YYMMDD|ASSIGN|BACKUP|BEFORE|BINARY|BIT-OR|BLANKS|CLIENT|CODING|COMMON|DEMAND|DYNPRO|EXCEPT|EXISTS|EXPORT|FIELDS|GLOBAL|GROUPS|LENGTH|LOCALE|MEDIUM|METHOD|MODIFY|NESTED|OTHERS|REJECT|SCROLL|SUPPLY|SYMBOL|ENDFOR|STRLEN|ALIGN|BEGIN|BOUND|ENDAT|ENTRY|EVENT|FINAL|FLUSH|GRANT|INNER|SHORT|USING|WRITE|AFTER|BLACK|BLOCK|CLOCK|COLOR|COUNT|DUMMY|EMPTY|ENDDO|ENDON|GREEN|INDEX|INOUT|LEAVE|LEVEL|LINES|MODIF|ORDER|OUTER|RANGE|RESET|RETRY|RIGHT|SMART|SPLIT|STYLE|TABLE|THROW|UNDER|UNTIL|UPPER|UTF-8|WHERE|ALIAS|BLANK|CLEAR|CLOSE|EXACT|FETCH|FIRST|FOUND|GROUP|LLANG|LOCAL|OTHER|REGEX|SPOOL|TITLE|TYPES|VALID|WHILE|ALPHA|BOXED|CATCH|CHAIN|CHECK|CLASS|COVER|ENDIF|EQUIV|FIELD|FLOOR|FRAME|INPUT|LOWER|MATCH|NODES|PAGES|PRINT|RAISE|ROUND|SHIFT|SPACE|SPOTS|STAMP|STATE|TASKS|TIMES|TRMAC|ULINE|UNION|VALUE|WIDTH|EQUAL|LOG10|TRUNC|BLOB|CASE|CEIL|CLOB|COND|EXIT|FILE|GAPS|HOLD|INCL|INTO|KEEP|KEYS|LAST|LINE|LONG|LPAD|MAIL|MODE|OPEN|PINK|READ|ROWS|TEST|THEN|ZERO|AREA|BACK|BADI|BYTE|CAST|EDIT|EXEC|FAIL|FIND|FKEQ|FONT|FREE|GKEQ|HIDE|INIT|ITNO|LATE|LOOP|MAIN|MARK|MOVE|NEXT|NULL|RISK|ROLE|UNIT|WAIT|ZONE|BASE|CALL|CODE|DATA|DATE|FKGE|GKGE|HIGH|KIND|LEFT|LIST|MASK|MESH|NAME|NODE|PACK|PAGE|POOL|SEND|SIGN|SIZE|SOME|STOP|TASK|TEXT|TIME|USER|VARY|WITH|WORD|BLUE|CONV|COPY|DEEP|ELSE|FORM|FROM|HINT|ICON|JOIN|LIKE|LOAD|ONLY|PART|SCAN|SKIP|SORT|TYPE|UNIX|VIEW|WHEN|WORK|ACOS|ASIN|ATAN|COSH|EACH|FRAC|LESS|RTTI|SINH|SQRT|TANH|AVG|BIT|DIV|ISO|LET|OUT|PAD|SQL|ALL|CI_|CPI|END|LOB|LPI|MAX|MIN|NEW|OLE|RUN|SET|\?TO|YES|ABS|ADD|AND|BIG|FOR|HDB|JOB|LOW|NOT|SAP|TRY|VIA|XML|ANY|GET|IDS|KEY|MOD|OFF|PUT|RAW|RED|REF|SUM|TAB|XSD|CNT|COS|EXP|LOG|SIN|TAN|XOR|AT|CO|CP|DO|GT|ID|IF|NS|OR|BT|CA|CS|GE|NA|NB|EQ|IN|LT|NE|NO|OF|ON|PF|TO|AS|BY|CN|IS|LE|NP|UP|E|I|M|O|Z|C|X'.split('|')
16
+ # return keyword
17
+ pass
18
+
19
+ @staticmethod
20
+ def comment_regex():
21
+ pattern = re.compile(r'(?P<comment>^\*.*?$|".*?$|\(\*[\s\S]*?\*\)|\(\*.*?$|^.*?\*\))|(?P<noncomment>\'(\\.|[^\\\'])*\'|"(\\.|[^\\"])*"|.[^*"\'"]*)', re.DOTALL | re.MULTILINE)
22
+ return pattern
23
+
24
+ @staticmethod
25
+ def number_regex():
26
+ pattern = re.compile(r'\b\d+\b')
27
+ return pattern
28
+
29
+ @staticmethod
30
+ def operator_regex():
31
+ pattern = re.compile(r'(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)')
32
+ return pattern
33
+
34
+ @staticmethod
35
+ def keywords_regex():
36
+ return re.compile(r'\b(' + '|'.join(Abap.keywords()) + r')\b')
37
+
38
+ @staticmethod
39
+ def remove_comments(source_code: str) -> str:
40
+ result = []
41
+ for match in Abap.comment_regex().finditer(source_code):
42
+ if match.group('noncomment'):
43
+ result.append(match.group('noncomment'))
44
+ # if isList:
45
+ # return result
46
+ return ''.join(result).strip()
47
+
48
+ @staticmethod
49
+ def remove_keywords(source: str):
50
+ return re.sub(re.compile(Abap.keywords_regex()), '', source)
@@ -0,0 +1,43 @@
1
+ import re
2
+ from PyReprism.utils import extension
3
+
4
+
5
+ class ActionScript:
6
+ def __init__(self):
7
+ pass
8
+
9
+ @staticmethod
10
+ def file_extension() -> str:
11
+ return extension.actionscript
12
+
13
+ @staticmethod
14
+ def keywords() -> list:
15
+ keyword = 'as|break|case|catch|class|const|default|delete|do|else|extends|finally|for|function|if|implements|import|in|instanceof|interface|internal|is|native|new|null|package|private|protected|public|return|super|switch|this|throw|try|typeof|use|var|void|while|with|dynamic|each|final|get|include|namespace|native|override|set|static'.split('|')
16
+ return keyword
17
+
18
+ @staticmethod
19
+ def comment_regex():
20
+ pattern = re.compile(r'(?P<comment>//.*?$|/\*[^*]*\*+(?:[^/*][^*]*\*+)*?/)|(?P<noncomment>[^/]+)', re.DOTALL | re.MULTILINE)
21
+ return pattern
22
+
23
+ @staticmethod
24
+ def number_regex():
25
+ pattern = re.compile(r'\b\d+\b')
26
+ return pattern
27
+
28
+ @staticmethod
29
+ def operator_regex():
30
+ pattern = re.compile(r'\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]')
31
+ return pattern
32
+
33
+ @staticmethod
34
+ def keywords_regex():
35
+ return re.compile(r'\b(' + '|'.join(ActionScript.keywords()) + r')\b')
36
+
37
+ @staticmethod
38
+ def remove_comments(source_code: str) -> str:
39
+ return ActionScript.comment_regex().sub(lambda match: match.group('noncomment') if match.group('noncomment') else '', source_code).strip()
40
+
41
+ @staticmethod
42
+ def remove_keywords(source: str):
43
+ return re.sub(re.compile(ActionScript.keywords_regex()), '', source)
@@ -9,33 +9,31 @@ class Ada:
9
9
  @staticmethod
10
10
  def file_extension() -> str:
11
11
  return extension.ada
12
-
12
+
13
13
  @staticmethod
14
14
  def keywords() -> list:
15
- keyword = 'abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|new|return|elsif|end|entry|exception|exit|for|function|generic|Adato|if|in|interface|is|limited|loop|mod|not|null|of|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor|true|false'.split('|')
16
-
17
- return keyword
18
-
15
+ keyword = 'abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|new|return|elsif|end|entry|exception|exit|for|function|generic|Adato|if|in|interface|is|limited|loop|mod|not|null|of|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor|true|false'.split('|')
16
+ return keyword
17
+
19
18
  @staticmethod
20
19
  def comment_regex():
21
20
  pattern = re.compile(r'(?P<comment>--.*?$|/\*[\s\S]*?\*/|/\*.*?$|^.*?\*/)|(?P<noncomment>\'(\\.|[^\\\'])*\'|"(\\.|[^\\"])*"|.[^/\'"]*)', re.DOTALL | re.MULTILINE)
22
21
  return pattern
23
22
 
24
-
25
23
  @staticmethod
26
24
  def number_regex():
27
25
  pattern = re.compile(r'\b\d(?:_?\d)*#[\dA-F](?:_?[\dA-F])*(?:\.[\dA-F](?:_?[\dA-F])*)?#(?:E[+-]?\d(?:_?\d)*)?')
28
26
  return pattern
29
-
27
+
30
28
  @staticmethod
31
29
  def operator_regex():
32
30
  pattern = re.compile(r'<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]')
33
31
  return pattern
34
-
32
+
35
33
  @staticmethod
36
34
  def keywords_regex():
37
35
  return re.compile(r'\b(' + '|'.join(Ada.keywords()) + r')\b')
38
-
36
+
39
37
  @staticmethod
40
38
  def remove_comments(source_code: str, isList: bool = False) -> str:
41
39
  result = []
@@ -46,8 +44,6 @@ class Ada:
46
44
  return result
47
45
  return ''.join(result)
48
46
 
49
-
50
47
  @staticmethod
51
48
  def remove_keywords(source: str):
52
49
  return re.sub(re.compile(Ada.keywords_regex()), '', source)
53
-