emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/phps-mode f4a26e193d 16/27: Updated and parser tests to


From: Christian Johansson
Subject: [elpa] externals/phps-mode f4a26e193d 16/27: Updated and parser tests to 8.2
Date: Sat, 4 Mar 2023 03:24:56 -0500 (EST)

branch: externals/phps-mode
commit f4a26e193d25cca9dca7e6df16136d89323deddc
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>

    Updated and parser tests to 8.2
---
 phps-mode-parser.el           | 14 +++++++-------
 test/phps-mode-test-parser.el | 27 ++++++++++++---------------
 2 files changed, 19 insertions(+), 22 deletions(-)

diff --git a/phps-mode-parser.el b/phps-mode-parser.el
index 81b71dd540..65afa0b3dc 100644
--- a/phps-mode-parser.el
+++ b/phps-mode-parser.el
@@ -1,4 +1,4 @@
-;; export: ;;; phps-mode-parser.el --- Exported Emacs Parser Generator -*- 
lexical-binding: t -*-
+;;; phps-mode-parser.el --- Exported Emacs Parser Generator -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2018-2023  Free Software Foundation, Inc.
 
@@ -26,27 +26,27 @@
 
 (defvar
   phps-mode-parser--action-tables
-  #s(hash-table size 28048 test equal rehash-size 1.5 rehash-threshold 0.8125 
data (0 0 1 1 2 2 3 3 4 4 5 2 6 2 7 2 8 8 9 2 10 10 11 11 12 2 13 13 14 2 15 15 
16 16 17 17 18 2 19 16 20 20 21 15 22 22 23 11 24 24 25 25 26 26 27 2 28 2 29 
11 30 16 31 11 32 32 33 33 34 34 35 35 36 11 37 11 38 38 39 39 40 40 41 16 42 
11 43 11 44 22 45 2 46 2 47 47 48 16 49 2 50 11 51 51 52 11 53 53 54 11 55 55 
56 56 57 57 58 58 59 59 60 60 61 61 62 2 63 2 64 2 65 2 66 15 67 67 68 68 69 69 
70 2 71 11 72 2 73 1 [...]
+  #s(hash-table size 42072 test equal rehash-size 1.5 rehash-threshold 0.8125 
data (0 0 1 1 2 2 3 3 4 4 5 2 6 2 7 2 8 8 9 2 10 10 11 11 12 2 13 13 14 2 15 15 
16 16 17 17 18 2 19 16 20 20 21 15 22 22 23 11 24 24 25 25 26 26 27 2 28 2 29 
11 30 16 31 11 32 32 33 33 34 34 35 35 36 11 37 11 38 38 39 39 40 40 41 16 42 
11 43 11 44 22 45 2 46 2 47 47 48 16 49 2 50 11 51 51 52 11 53 53 54 11 55 55 
56 56 57 57 58 58 59 59 60 60 61 61 62 2 63 2 64 64 65 2 66 2 67 15 68 68 69 69 
70 70 71 2 72 11 73  [...]
   "The generated action-tables.")
 
 (defvar
   phps-mode-parser--distinct-action-tables
-  #s(hash-table size 12466 test equal rehash-size 1.5 rehash-threshold 0.8125 
data (0 ((("!") reduce 84) (("\"") reduce 84) (($) reduce 84) (("$") reduce 84) 
(("(") reduce 84) (("+") reduce 84) (("-") reduce 84) ((";") reduce 84) (("@") 
reduce 84) ((T_ABSTRACT) reduce 84) ((T_ARRAY) reduce 84) ((T_ARRAY_CAST) 
reduce 84) ((T_ATTRIBUTE) reduce 84) ((T_BOOL_CAST) reduce 84) ((T_BREAK) 
reduce 84) ((T_CLASS) reduce 84) ((T_CLASS_C) reduce 84) ((T_CLONE) reduce 84) 
((T_CONST) reduce 84) ((T_CO [...]
+  #s(hash-table size 12466 test equal rehash-size 1.5 rehash-threshold 0.8125 
data (0 ((("!") reduce 84) (("\"") reduce 84) (($) reduce 84) (("$") reduce 84) 
(("(") reduce 84) (("+") reduce 84) (("-") reduce 84) ((";") reduce 84) (("@") 
reduce 84) ((T_ABSTRACT) reduce 84) ((T_ARRAY) reduce 84) ((T_ARRAY_CAST) 
reduce 84) ((T_ATTRIBUTE) reduce 84) ((T_BOOL_CAST) reduce 84) ((T_BREAK) 
reduce 84) ((T_CLASS) reduce 84) ((T_CLASS_C) reduce 84) ((T_CLONE) reduce 84) 
((T_CONST) reduce 84) ((T_CO [...]
   "The generated distinct action-tables.")
 
 (defvar
   phps-mode-parser--goto-tables
-  #s(hash-table size 28048 test equal rehash-size 1.5 rehash-threshold 0.8125 
data (0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 8 11 10 12 11 13 12 14 13 15 
14 16 15 17 8 18 16 19 17 20 8 21 18 22 19 23 20 24 8 25 8 26 21 27 22 28 23 29 
24 30 25 31 26 32 27 33 8 34 8 35 8 36 28 37 29 38 8 39 8 40 30 41 31 42 32 43 
33 44 34 45 35 46 36 47 8 48 37 49 38 50 39 51 8 52 40 53 8 54 41 55 8 56 42 57 
8 58 8 59 8 60 43 61 8 62 44 63 45 64 46 65 47 66 48 67 49 68 50 69 51 70 52 71 
53 72 54 73 55 74 [...]
+  #s(hash-table size 42072 test equal rehash-size 1.5 rehash-threshold 0.8125 
data (0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 8 11 10 12 11 13 12 14 13 15 
14 16 15 17 8 18 16 19 17 20 8 21 18 22 19 23 20 24 8 25 8 26 21 27 22 28 23 29 
24 30 25 31 26 32 27 33 8 34 8 35 8 36 28 37 29 38 8 39 8 40 30 41 31 42 32 43 
33 44 34 45 35 46 36 47 8 48 37 49 38 50 39 51 8 52 40 53 8 54 41 55 8 56 42 57 
8 58 8 59 8 60 43 61 8 62 44 63 45 64 46 65 47 66 48 67 49 68 50 69 51 70 52 71 
53 72 54 73 55 74 [...]
   "The generated goto-tables.")
 
 (defvar
   phps-mode-parser--distinct-goto-tables
-  #s(hash-table size 18699 test equal rehash-size 1.5 rehash-threshold 0.8125 
data (0 ((top_statement_list 1)) 1 (("!" 2) ("\"" 3) ("$" 4) ("(" 5) ("+" 6) 
("-" 7) (";" 8) ("@" 9) (T_ABSTRACT 10) (T_ARRAY 11) (T_ARRAY_CAST 12) 
(T_ATTRIBUTE 13) (T_BOOL_CAST 14) (T_BREAK 15) (T_CLASS 16) (T_CLASS_C 17) 
(T_CLONE 18) (T_CONST 19) (T_CONSTANT_ENCAPSED_STRING 20) (T_CONTINUE 21) 
(T_DEC 22) (T_DECLARE 23) (T_DIR 24) (T_DNUMBER 25) (T_DO 26) (T_DOUBLE_CAST 
27) (T_ECHO 28) (T_EMPTY 29) (T_ENUM 30) [...]
+  #s(hash-table size 18699 test equal rehash-size 1.5 rehash-threshold 0.8125 
data (0 ((top_statement_list 1)) 1 (("!" 2) ("\"" 3) ("$" 4) ("(" 5) ("+" 6) 
("-" 7) (";" 8) ("@" 9) (T_ABSTRACT 10) (T_ARRAY 11) (T_ARRAY_CAST 12) 
(T_ATTRIBUTE 13) (T_BOOL_CAST 14) (T_BREAK 15) (T_CLASS 16) (T_CLASS_C 17) 
(T_CLONE 18) (T_CONST 19) (T_CONSTANT_ENCAPSED_STRING 20) (T_CONTINUE 21) 
(T_DEC 22) (T_DECLARE 23) (T_DIR 24) (T_DNUMBER 25) (T_DO 26) (T_DOUBLE_CAST 
27) (T_ECHO 28) (T_EMPTY 29) (T_ENUM 30) [...]
   "The generated distinct goto-tables.")
 
 (defvar
   phps-mode-parser--table-productions-number-reverse
-  #s(hash-table size 730 test equal rehash-size 1.5 rehash-threshold 0.8125 
data (0 ((start) (top_statement_list)) 1 ((reserved_non_modifiers) (T_INCLUDE)) 
2 ((reserved_non_modifiers) (T_INCLUDE_ONCE)) 3 ((reserved_non_modifiers) 
(T_EVAL)) 4 ((reserved_non_modifiers) (T_REQUIRE)) 5 ((reserved_non_modifiers) 
(T_REQUIRE_ONCE)) 6 ((reserved_non_modifiers) (T_LOGICAL_OR)) 7 
((reserved_non_modifiers) (T_LOGICAL_XOR)) 8 ((reserved_non_modifiers) 
(T_LOGICAL_AND)) 9 ((reserved_non_modifiers) (T_ [...]
+  #s(hash-table size 730 test equal rehash-size 1.5 rehash-threshold 0.8125 
data (0 ((start) (top_statement_list)) 1 ((reserved_non_modifiers) (T_INCLUDE)) 
2 ((reserved_non_modifiers) (T_INCLUDE_ONCE)) 3 ((reserved_non_modifiers) 
(T_EVAL)) 4 ((reserved_non_modifiers) (T_REQUIRE)) 5 ((reserved_non_modifiers) 
(T_REQUIRE_ONCE)) 6 ((reserved_non_modifiers) (T_LOGICAL_OR)) 7 
((reserved_non_modifiers) (T_LOGICAL_XOR)) 8 ((reserved_non_modifiers) 
(T_LOGICAL_AND)) 9 ((reserved_non_modifiers) (T_ [...]
   "The hash-table indexed by production-number and value is production.")
 
 (defvar
@@ -61,7 +61,7 @@
 
 (defvar
   phps-mode-parser--table-non-terminal-p
-  #s(hash-table size 217 test equal rehash-size 1.5 rehash-threshold 0.8125 
data (isset_variable t isset_variables t encaps_var_offset t encaps_var t 
possible_array_pair t array_pair t non_empty_array_pair_list t static_member t 
function_call t property_name t array_object_dereferenceable t 
callable_variable t fully_dereferenceable t class_constant t constant t 
dereferenceable_scalar t encaps_list t new_variable t callable_expr t 
variable_class_name t member_name t lexical_var t lexical_ [...]
+  #s(hash-table size 217 test equal rehash-size 1.5 rehash-threshold 0.8125 
data (isset_variable t isset_variables t encaps_var_offset t encaps_var t 
possible_array_pair t array_pair t non_empty_array_pair_list t static_member t 
function_call t property_name t array_object_dereferenceable t 
callable_variable t fully_dereferenceable t class_constant t constant t 
dereferenceable_scalar t encaps_list t new_variable t callable_expr t 
variable_class_name t member_name t lexical_var t lexical_ [...]
   "The hash-table of valid non-terminals.")
 
 (defvar
diff --git a/test/phps-mode-test-parser.el b/test/phps-mode-test-parser.el
index a2c1ddab3f..c3aa1019b1 100644
--- a/test/phps-mode-test-parser.el
+++ b/test/phps-mode-test-parser.el
@@ -78,7 +78,7 @@
        (phps-mode-test--output-parse-productions parse)
        (should
         (equal
-         '(84 198 202 443 297 330 328 327 442 446 81 443 243 91 274 262 258 
280 444 140 323 444 300 302 296 330 328 327 442 446 81 443 243 91 274 262 258 
280 444 140 323 444 300 302 296 330 328 327 442 446 81 443 243 91 274 262 258 
280 444 140 323 444 300 302 296 185 103 108 83)
+         '(84 201 205 450 304 337 335 334 449 453 81 450 246 91 279 265 261 
287 451 140 330 451 307 309 303 337 335 334 449 453 81 450 246 91 279 265 261 
287 451 140 330 451 307 309 303 337 335 334 449 453 81 450 246 91 279 265 261 
287 451 140 330 451 307 309 303 187 103 108 83)
          parse)))))
 
   (phps-mode-test-parser--buffer-contents
@@ -90,12 +90,9 @@
        (phps-mode-test--output-parse-productions parse)
        (should
         (equal
-         '(84 443 297 330 328 327 81 474 426 443 343 342 299 302 296 190 104 
108 83 198 202 443 297 91 459 305 307 304 296 185 103 108 83)
+         '(84 450 304 337 335 334 81 482 433 450 350 349 306 309 303 193 104 
108 83 201 205 450 304 91 467 312 314 311 303 187 103 108 83)
          parse)))))
 
-  ;; TODO Make PHP 8.2 tests below pass
-
-
   (phps-mode-test-parser--buffer-contents
    "<?php\nreadonly class BlogData\n{\n    public string $title;\n\n    public 
Status $status;\n\n    public function __construct(string $title, Status 
$status)\n    {\n        $this->title = $title;\n        $this->status = 
$status;\n    }\n}\n"
    "PHP 8.2 - readonly classes"
@@ -105,7 +102,7 @@
        (phps-mode-test--output-parse-productions parse)
        (should
         (equal
-         '(84 472 479 426 347 346 157 107 83)
+         '(84 192 188 201 205 450 304 337 335 331 91 279 273 260 450 346 345 
305 309 303 337 335 331 91 279 273 260 450 346 345 305 309 303 337 335 334 449 
453 81 450 251 91 279 273 260 182 184 450 257 250 247 251 91 279 273 260 182 
184 450 257 250 248 123 245 286 451 140 523 513 519 504 508 538 521 523 513 519 
363 366 159 141 139 523 513 519 504 508 538 521 523 513 519 363 366 159 141 139 
330 451 307 309 303 186 103 108 83)
          parse)))))
 
   (phps-mode-test-parser--buffer-contents
@@ -117,7 +114,7 @@
        (phps-mode-test--output-parse-productions parse)
        (should
         (equal
-         '(84 472 479 426 347 346 157 107 83)
+         '(84 201 205 450 304 337 335 334 449 453 81 450 251 91 279 91 279 284 
281 91 279 280 282 275 260 182 184 450 257 250 247 123 245 286 451 140 523 513 
519 363 502 154 141 139 330 451 307 309 303 187 103 108 83)
          parse)))))
 
   (phps-mode-test-parser--buffer-contents
@@ -129,7 +126,7 @@
        (phps-mode-test--output-parse-productions parse)
        (should
         (equal
-         '(84 472 479 426 347 346 157 107 83)
+         '(84 480 487 433 354 353 157 107 83)
          parse)))))
 
   (phps-mode-test-parser--buffer-contents
@@ -138,7 +135,7 @@
    (lambda()
      (should
       (equal
-       '(84 472 479 426 347 346 157 107 83 164 107 83)
+       '(84 480 487 433 354 353 157 107 83 164 107 83)
        (phps-mode-parser-parse)))))
 
   (phps-mode-test-parser--buffer-contents
@@ -147,7 +144,7 @@
    (lambda()
      (should
       (equal
-       '(84 472 479 426 347 346 157 107 83)
+       '(84 480 487 433 354 353 157 107 83)
        (phps-mode-parser-parse)))))
 
   (phps-mode-test-parser--buffer-contents
@@ -172,7 +169,7 @@
        (phps-mode-test--output-parse-productions parse)
        (should
         (equal
-         '(84 472 479 426 347 346 157 107 83 164 107 83 158 107 83 472 479 426 
347 346 157 107 83 164 107 83 158 107 83)
+         '(84 480 487 433 354 353 157 107 83 164 107 83 158 107 83 480 487 433 
354 353 157 107 83 164 107 83 158 107 83)
          parse)))))
 
   (phps-mode-test-parser--buffer-contents
@@ -183,7 +180,7 @@
        (phps-mode-test--output-parse-productions parse)
        (should
         (equal
-         '(84 442 446 443 248 256 180 182 443 254 247 244 123 242 279 444 140 
515 505 511 474 426 359 159 141 139 515 505 511 356 494 154 141 139 444 179 102 
108 83)
+         '(84 449 453 179 450 251 259 182 184 450 257 250 247 123 245 286 451 
140 523 513 519 482 433 366 159 141 139 523 513 519 363 502 154 141 139 451 181 
102 108 83)
          parse)))))
 
   (phps-mode-test-parser--buffer-contents
@@ -194,7 +191,7 @@
        (phps-mode-test--output-parse-productions parse)
        (should
         (equal
-         '(84 81 85 111 83 442 446 443 248 256 180 182 443 254 247 244 123 242 
279 444 140 515 505 511 474 426 359 159 141 139 515 505 511 356 494 154 141 139 
444 179 102 108 83)
+         '(84 81 85 111 83 449 453 179 450 251 259 182 184 450 257 250 247 123 
245 286 451 140 523 513 519 482 433 366 159 141 139 523 513 519 363 502 154 141 
139 451 181 102 108 83)
          parse)))))
 
   (phps-mode-test-parser--buffer-contents
@@ -205,7 +202,7 @@
        (phps-mode-test--output-parse-productions parse)
        (should
         (equal
-         '(84 81 85 84 442 446 443 248 256 180 182 443 254 247 244 123 242 279 
444 140 515 505 511 474 426 359 159 141 139 515 505 511 356 494 154 141 139 444 
179 102 108 83 112 83)
+         '(84 81 85 84 449 453 179 450 251 259 182 184 450 257 250 247 123 245 
286 451 140 523 513 519 482 433 366 159 141 139 523 513 519 363 502 154 141 139 
451 181 102 108 83 112 83)
          parse)))))
 
   (phps-mode-test-parser--buffer-contents
@@ -216,7 +213,7 @@
        (phps-mode-test--output-parse-productions parse)
        (should
         (equal
-         '(84 81 85 111 83 198 202 443 297 332 328 324 256 472 479 426 443 340 
338 298 302 296 330 328 327 442 446 81 443 248 256 180 182 443 254 247 244 123 
242 279 444 140 515 505 511 474 426 359 159 141 139 515 505 511 356 494 154 141 
139 323 444 300 302 296 185 103 108 83)
+         '(84 81 85 111 83 201 205 450 304 339 335 331 259 480 487 433 450 347 
345 305 309 303 337 335 334 449 453 81 450 251 259 182 184 450 257 250 247 123 
245 286 451 140 523 513 519 482 433 366 159 141 139 523 513 519 363 502 154 141 
139 330 451 307 309 303 187 103 108 83)
          parse)))))
 
   (phps-mode-test-parser--buffer-contents



reply via email to

[Prev in Thread] Current Thread [Next in Thread]