diff --git a/CHANGELOG.md b/CHANGELOG.md index cca6d7ab..5c8772ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added support for PHP8.2 - Added a new way to extend Smarty functionality using `Smarty::addExtension()`. Please see the docs for more information. - Custom tags can accept positional parameters, so you can write a block compiler that support this: `{trans "Jack" "dull boy"}All work and no play makes %s a %s.{/trans}` [#164](https://github.com/smarty-php/smarty/issues/164) -- Full support for ternary operator: `{$test ? $a : $b}` and `{$var ?: $alternative}` [#881](https://github.com/smarty-php/smarty/issues/881) +- Full support for ternary operator: `{$test ? $a : $b}` and `{$var ?: $value_if_falsy}` [#881](https://github.com/smarty-php/smarty/issues/881) +- Full support for null coalescing operator: `{$var ?? $value_if_null}` [#882](https://github.com/smarty-php/smarty/issues/882) ### Changed - All Smarty code is now in the \Smarty namespace. For simple use-cases, you only need to add diff --git a/src/Parser/TemplateParser.php b/src/Parser/TemplateParser.php index 6e8e352d..6304581a 100644 --- a/src/Parser/TemplateParser.php +++ b/src/Parser/TemplateParser.php @@ -263,473 +263,505 @@ class TemplateParser const TP_ARRAYOPEN = 57; const TP_QUOTE = 58; const TP_BACKTICK = 59; - const YY_NO_ACTION = 520; - const YY_ACCEPT_ACTION = 519; - const YY_ERROR_ACTION = 518; + const YY_NO_ACTION = 525; + const YY_ACCEPT_ACTION = 524; + const YY_ERROR_ACTION = 523; - const YY_SZ_ACTTAB = 2040; + const YY_SZ_ACTTAB = 2191; public static $yy_action = array( - 240, 241, 242, 1, 135, 130, 230, 188, 101, 6, - 54, 12, 215, 232, 194, 107, 102, 389, 33, 210, - 254, 211, 97, 203, 389, 21, 389, 310, 42, 389, - 138, 43, 44, 270, 219, 389, 228, 389, 198, 389, - 53, 4, 317, 291, 32, 34, 218, 218, 5, 51, - 92, 240, 241, 242, 1, 136, 133, 383, 197, 229, - 6, 54, 262, 215, 174, 294, 107, 150, 291, 383, - 210, 254, 211, 445, 217, 383, 21, 249, 432, 42, - 445, 97, 43, 44, 270, 219, 303, 274, 209, 198, - 432, 53, 4, 134, 291, 224, 178, 519, 94, 5, - 51, 240, 241, 242, 1, 163, 95, 135, 52, 195, - 6, 54, 195, 215, 12, 249, 107, 45, 22, 277, - 210, 254, 211, 246, 217, 213, 21, 299, 53, 42, - 152, 291, 43, 44, 270, 219, 239, 274, 209, 198, - 249, 53, 4, 147, 291, 45, 22, 277, 147, 5, - 51, 240, 241, 242, 1, 140, 132, 97, 197, 178, - 6, 54, 3, 215, 97, 249, 107, 45, 22, 277, - 210, 254, 211, 276, 217, 148, 21, 250, 35, 42, - 97, 125, 43, 44, 270, 219, 110, 274, 144, 198, - 488, 53, 4, 110, 291, 195, 38, 139, 249, 5, - 51, 240, 241, 242, 1, 164, 132, 249, 189, 110, - 6, 54, 250, 215, 250, 249, 107, 45, 22, 277, - 210, 254, 211, 153, 217, 250, 21, 173, 294, 42, - 281, 432, 43, 44, 270, 219, 149, 274, 125, 198, - 89, 53, 4, 432, 291, 124, 249, 433, 259, 5, - 51, 240, 241, 242, 1, 96, 131, 146, 197, 433, - 6, 54, 9, 215, 258, 179, 107, 249, 289, 293, - 210, 254, 211, 172, 217, 220, 11, 195, 23, 42, - 309, 250, 43, 44, 270, 219, 151, 274, 195, 198, - 90, 53, 4, 24, 291, 292, 249, 173, 294, 5, - 51, 240, 241, 242, 1, 20, 132, 187, 184, 264, - 6, 54, 14, 215, 195, 179, 107, 142, 15, 432, - 210, 254, 211, 171, 206, 265, 21, 249, 226, 42, - 162, 432, 43, 44, 270, 219, 314, 274, 218, 198, - 249, 53, 4, 166, 291, 291, 313, 295, 179, 5, - 51, 240, 241, 242, 1, 257, 132, 257, 182, 350, - 6, 54, 195, 215, 282, 350, 107, 141, 179, 253, - 210, 254, 211, 248, 217, 14, 21, 102, 50, 42, - 50, 15, 43, 44, 270, 219, 230, 274, 25, 198, - 106, 53, 4, 327, 291, 301, 102, 350, 168, 5, - 51, 240, 241, 242, 1, 257, 132, 230, 197, 350, - 6, 54, 26, 215, 231, 350, 107, 102, 28, 432, - 210, 254, 211, 179, 183, 176, 21, 238, 50, 42, - 18, 432, 43, 44, 270, 219, 15, 274, 85, 198, - 7, 53, 4, 137, 291, 40, 41, 39, 13, 5, - 51, 240, 241, 242, 1, 169, 134, 86, 197, 165, - 6, 54, 284, 285, 286, 287, 107, 17, 300, 249, - 210, 254, 211, 326, 217, 155, 21, 175, 294, 46, - 179, 291, 43, 44, 270, 219, 257, 274, 262, 198, - 159, 53, 4, 324, 291, 40, 41, 39, 13, 5, - 51, 240, 241, 242, 1, 303, 134, 209, 197, 50, - 6, 54, 284, 285, 286, 287, 107, 257, 207, 192, - 210, 254, 211, 29, 217, 222, 21, 154, 9, 42, - 306, 291, 43, 44, 270, 219, 445, 274, 256, 198, - 50, 53, 4, 445, 291, 56, 305, 312, 161, 5, - 51, 279, 208, 209, 245, 252, 88, 104, 19, 186, - 98, 84, 251, 291, 252, 461, 96, 19, 461, 266, - 212, 251, 461, 178, 273, 199, 275, 38, 280, 289, - 237, 238, 279, 208, 209, 245, 252, 88, 104, 19, - 185, 98, 62, 251, 134, 87, 260, 96, 8, 16, - 266, 10, 14, 221, 145, 273, 199, 275, 15, 280, - 289, 253, 91, 111, 24, 279, 318, 209, 247, 290, - 109, 104, 193, 186, 98, 84, 279, 261, 209, 53, - 96, 109, 291, 266, 196, 114, 74, 156, 273, 199, - 275, 96, 280, 289, 266, 195, 24, 195, 319, 273, - 199, 275, 93, 280, 289, 167, 157, 351, 279, 385, - 209, 236, 243, 109, 202, 308, 196, 114, 74, 351, - 170, 385, 244, 96, 177, 351, 266, 385, 108, 255, - 116, 273, 199, 275, 263, 280, 289, 267, 269, 271, - 279, 218, 209, 272, 7, 103, 201, 308, 196, 117, - 48, 279, 115, 209, 288, 96, 109, 55, 266, 196, - 117, 69, 35, 273, 199, 275, 96, 280, 289, 266, - 252, 227, 315, 19, 273, 199, 275, 251, 280, 289, - 279, 158, 209, 160, 252, 109, 205, 19, 196, 117, - 69, 251, 325, 316, 461, 96, 36, 461, 266, 328, - 14, 461, 298, 273, 199, 275, 15, 280, 289, 214, - 298, 279, 298, 209, 298, 200, 109, 298, 195, 196, - 114, 74, 124, 298, 298, 225, 96, 298, 298, 266, - 382, 195, 96, 461, 273, 199, 275, 298, 280, 289, - 298, 298, 382, 354, 279, 289, 209, 223, 382, 109, - 307, 298, 196, 117, 69, 14, 298, 298, 298, 96, - 298, 15, 266, 298, 432, 298, 298, 273, 199, 275, - 298, 280, 289, 279, 298, 209, 432, 298, 103, 204, - 298, 196, 117, 60, 298, 231, 298, 298, 96, 298, - 298, 266, 298, 298, 298, 298, 273, 199, 275, 298, - 280, 289, 304, 105, 298, 298, 298, 298, 240, 241, - 242, 2, 298, 302, 298, 298, 298, 6, 54, 40, - 41, 39, 13, 107, 298, 298, 298, 210, 254, 211, - 298, 298, 37, 298, 14, 298, 284, 285, 286, 287, - 15, 298, 298, 298, 298, 40, 41, 39, 13, 298, - 298, 298, 298, 298, 298, 298, 298, 297, 27, 298, - 298, 304, 284, 285, 286, 287, 298, 240, 241, 242, - 2, 298, 302, 298, 298, 298, 6, 54, 298, 298, - 298, 298, 107, 298, 14, 298, 210, 254, 211, 298, - 15, 298, 298, 298, 298, 40, 41, 39, 13, 298, - 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, - 298, 298, 284, 285, 286, 287, 298, 27, 298, 298, - 233, 234, 235, 128, 298, 298, 240, 241, 242, 1, - 298, 298, 298, 298, 298, 6, 54, 298, 298, 298, - 298, 107, 298, 298, 298, 210, 254, 211, 279, 298, - 209, 298, 298, 109, 298, 298, 191, 112, 61, 298, - 298, 298, 298, 96, 298, 298, 266, 298, 298, 298, - 298, 273, 199, 275, 298, 280, 289, 298, 298, 298, - 298, 298, 298, 279, 298, 209, 298, 298, 109, 298, - 298, 196, 113, 66, 279, 298, 209, 298, 96, 109, - 298, 266, 196, 99, 83, 298, 273, 199, 275, 96, - 280, 289, 266, 298, 298, 298, 298, 273, 199, 275, - 298, 280, 289, 279, 298, 209, 298, 298, 109, 298, - 298, 196, 100, 82, 298, 298, 298, 298, 96, 298, - 298, 266, 298, 298, 298, 298, 273, 199, 275, 298, - 280, 289, 298, 298, 279, 298, 209, 298, 298, 109, - 298, 298, 196, 117, 57, 279, 298, 209, 298, 96, - 109, 298, 266, 196, 117, 68, 298, 273, 199, 275, - 96, 280, 289, 266, 298, 298, 298, 298, 273, 199, - 275, 298, 280, 289, 279, 298, 209, 298, 298, 109, - 298, 298, 196, 99, 58, 298, 298, 298, 298, 96, - 298, 298, 266, 298, 298, 298, 298, 273, 199, 275, - 298, 280, 289, 298, 298, 279, 298, 209, 298, 298, - 109, 298, 298, 196, 117, 67, 279, 298, 209, 298, - 96, 109, 298, 266, 196, 117, 59, 298, 273, 199, - 275, 96, 280, 289, 266, 298, 298, 298, 298, 273, - 199, 275, 298, 280, 289, 279, 298, 209, 298, 298, - 109, 298, 298, 196, 117, 60, 298, 298, 298, 298, - 96, 298, 298, 266, 298, 298, 298, 298, 273, 199, - 275, 298, 280, 289, 298, 298, 279, 298, 209, 298, - 298, 109, 298, 298, 196, 117, 70, 279, 298, 209, - 298, 96, 109, 298, 266, 196, 117, 71, 298, 273, - 199, 275, 96, 280, 289, 266, 298, 298, 298, 298, - 273, 199, 275, 298, 280, 289, 279, 298, 209, 298, - 298, 109, 298, 298, 196, 117, 72, 298, 298, 298, - 298, 96, 298, 298, 266, 298, 298, 298, 298, 273, - 199, 275, 298, 280, 289, 298, 298, 279, 298, 209, - 298, 298, 109, 298, 298, 196, 117, 73, 279, 298, - 209, 298, 96, 109, 298, 266, 196, 117, 75, 298, - 273, 199, 275, 96, 280, 289, 266, 298, 298, 298, - 298, 273, 199, 275, 298, 280, 289, 279, 298, 209, - 298, 298, 109, 298, 298, 190, 117, 63, 298, 298, - 298, 298, 96, 298, 298, 266, 298, 298, 298, 298, - 273, 199, 275, 298, 280, 289, 298, 298, 279, 298, - 209, 298, 298, 109, 298, 298, 196, 117, 64, 279, - 298, 209, 298, 96, 109, 298, 266, 196, 117, 65, - 298, 273, 199, 275, 96, 280, 289, 266, 298, 298, - 298, 298, 273, 199, 275, 298, 280, 289, 279, 298, - 209, 298, 298, 109, 298, 298, 196, 117, 76, 298, - 298, 298, 298, 96, 298, 298, 266, 298, 298, 298, - 298, 273, 199, 275, 298, 280, 289, 298, 298, 279, - 298, 209, 298, 298, 109, 298, 298, 196, 117, 77, - 279, 298, 209, 298, 96, 109, 298, 266, 196, 117, - 78, 298, 273, 199, 275, 96, 280, 289, 266, 298, - 298, 298, 298, 273, 199, 275, 298, 280, 289, 279, - 298, 209, 298, 298, 109, 298, 298, 196, 117, 79, - 298, 298, 298, 298, 96, 298, 298, 266, 298, 298, - 298, 298, 273, 199, 275, 298, 280, 289, 298, 298, - 279, 298, 209, 298, 298, 109, 298, 298, 196, 117, - 80, 279, 298, 209, 298, 96, 109, 298, 266, 196, - 117, 81, 298, 273, 199, 275, 96, 280, 289, 266, - 298, 298, 298, 298, 273, 199, 275, 298, 280, 289, - 279, 298, 209, 298, 298, 109, 298, 298, 196, 117, - 47, 298, 298, 298, 298, 96, 298, 298, 266, 298, - 298, 298, 298, 273, 199, 275, 298, 280, 289, 298, - 298, 279, 298, 209, 298, 298, 109, 298, 298, 196, - 117, 49, 279, 298, 209, 298, 96, 109, 298, 266, - 196, 129, 298, 298, 273, 199, 275, 96, 280, 289, - 298, 298, 298, 298, 322, 273, 199, 275, 216, 280, - 289, 279, 298, 209, 298, 461, 109, 298, 461, 196, - 123, 3, 461, 445, 298, 298, 96, 268, 298, 298, - 298, 298, 298, 278, 273, 199, 275, 298, 280, 289, - 298, 298, 279, 298, 209, 298, 298, 109, 298, 445, - 196, 127, 445, 279, 461, 209, 445, 96, 109, 298, - 298, 196, 118, 298, 298, 273, 199, 275, 96, 280, - 289, 298, 298, 298, 298, 298, 273, 199, 275, 216, - 280, 289, 279, 298, 209, 298, 461, 109, 298, 461, - 196, 119, 34, 461, 445, 298, 298, 96, 268, 298, - 298, 298, 298, 298, 298, 273, 199, 275, 298, 280, - 289, 298, 298, 279, 298, 209, 298, 298, 109, 298, - 445, 196, 120, 445, 279, 461, 209, 445, 96, 109, - 298, 298, 196, 121, 298, 298, 273, 199, 275, 96, - 280, 289, 298, 298, 298, 298, 298, 273, 199, 275, - 216, 280, 289, 279, 298, 209, 216, 461, 109, 298, - 461, 196, 122, 461, 461, 445, 461, 298, 96, 268, - 461, 445, 298, 298, 298, 268, 273, 199, 275, 298, - 280, 289, 298, 397, 279, 298, 209, 298, 298, 109, - 298, 445, 196, 126, 445, 298, 461, 445, 445, 96, - 445, 298, 461, 298, 445, 283, 298, 273, 199, 275, - 298, 280, 289, 298, 30, 432, 298, 397, 397, 397, - 397, 461, 298, 298, 461, 298, 298, 432, 461, 445, - 298, 298, 298, 268, 397, 397, 397, 397, 298, 143, - 298, 298, 298, 298, 298, 298, 298, 321, 298, 40, - 41, 39, 13, 298, 298, 445, 298, 298, 445, 298, - 461, 298, 445, 298, 298, 298, 284, 285, 286, 287, - 40, 41, 39, 13, 298, 320, 40, 41, 39, 13, - 296, 298, 298, 298, 180, 298, 298, 284, 285, 286, - 287, 298, 298, 284, 285, 286, 287, 40, 41, 39, - 13, 298, 298, 40, 41, 39, 13, 40, 41, 39, - 13, 181, 311, 31, 284, 285, 286, 287, 323, 298, - 284, 285, 286, 287, 284, 285, 286, 287, 298, 298, - 298, 298, 298, 298, 40, 41, 39, 13, 298, 298, - 298, 40, 41, 39, 13, 298, 298, 40, 41, 39, - 13, 284, 285, 286, 287, 298, 298, 298, 284, 285, - 286, 287, 298, 298, 284, 285, 286, 287, 461, 298, - 298, 461, 298, 298, 298, 461, 445, 298, 298, 298, - 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, - 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, - 298, 298, 445, 298, 298, 445, 298, 461, 298, 445, + 33, 126, 524, 96, 261, 279, 437, 242, 243, 244, + 1, 98, 135, 127, 199, 228, 6, 55, 437, 217, + 197, 260, 109, 317, 392, 292, 212, 256, 213, 103, + 219, 392, 21, 392, 99, 43, 392, 32, 44, 45, + 273, 221, 392, 277, 392, 200, 392, 54, 4, 313, + 294, 46, 22, 280, 220, 5, 52, 242, 243, 244, + 1, 20, 132, 189, 190, 266, 6, 55, 241, 217, + 211, 29, 109, 224, 9, 156, 212, 256, 213, 493, + 205, 267, 21, 252, 264, 43, 176, 297, 44, 45, + 273, 221, 312, 230, 306, 200, 211, 54, 4, 320, + 294, 294, 3, 248, 99, 5, 52, 242, 243, 244, + 1, 294, 97, 386, 53, 231, 6, 55, 36, 217, + 99, 150, 109, 252, 16, 386, 212, 256, 213, 149, + 219, 386, 21, 112, 437, 43, 302, 93, 44, 45, + 273, 221, 306, 277, 211, 200, 437, 54, 4, 112, + 294, 197, 39, 99, 140, 5, 52, 242, 243, 244, + 1, 136, 134, 262, 199, 28, 6, 55, 155, 217, + 252, 151, 109, 99, 94, 91, 212, 256, 213, 137, + 219, 251, 21, 57, 308, 43, 13, 7, 44, 45, + 273, 221, 294, 277, 263, 200, 54, 54, 4, 294, + 294, 181, 112, 298, 197, 5, 52, 242, 243, 244, + 1, 259, 134, 232, 191, 353, 6, 55, 26, 217, + 330, 353, 109, 104, 149, 437, 212, 256, 213, 174, + 219, 222, 21, 250, 51, 43, 141, 437, 44, 45, + 273, 221, 232, 277, 296, 200, 251, 54, 4, 233, + 294, 35, 104, 353, 285, 5, 52, 242, 243, 244, + 1, 259, 133, 138, 199, 353, 6, 55, 108, 217, + 173, 353, 109, 175, 297, 14, 212, 256, 213, 450, + 219, 15, 11, 264, 51, 43, 450, 139, 44, 45, + 273, 221, 144, 277, 152, 200, 181, 54, 4, 136, + 294, 226, 251, 154, 251, 5, 52, 242, 243, 244, + 1, 146, 134, 251, 186, 197, 6, 55, 170, 217, + 157, 251, 109, 17, 180, 294, 212, 256, 213, 329, + 208, 215, 21, 180, 54, 43, 252, 294, 44, 45, + 273, 221, 143, 277, 181, 200, 254, 54, 4, 19, + 294, 126, 104, 253, 227, 5, 52, 242, 243, 244, + 1, 98, 134, 259, 184, 161, 6, 55, 178, 217, + 240, 148, 109, 175, 297, 292, 212, 256, 213, 284, + 219, 251, 21, 197, 23, 43, 51, 127, 44, 45, + 273, 221, 164, 277, 168, 200, 252, 54, 4, 171, + 294, 304, 251, 197, 327, 5, 52, 242, 243, 244, + 1, 137, 134, 167, 199, 180, 6, 55, 13, 217, + 181, 255, 109, 251, 87, 181, 212, 256, 213, 25, + 185, 18, 21, 177, 297, 43, 88, 15, 44, 45, + 273, 221, 294, 277, 24, 200, 295, 54, 4, 258, + 294, 41, 42, 40, 12, 5, 52, 242, 243, 244, + 1, 163, 136, 437, 199, 39, 6, 55, 287, 288, + 289, 290, 109, 259, 303, 437, 212, 256, 213, 450, + 219, 214, 21, 209, 194, 47, 450, 438, 44, 45, + 273, 221, 9, 277, 309, 200, 51, 54, 4, 438, + 294, 41, 42, 40, 12, 5, 52, 242, 243, 244, + 1, 10, 136, 24, 199, 321, 6, 55, 287, 288, + 289, 290, 109, 113, 239, 240, 212, 256, 213, 220, + 219, 255, 21, 8, 24, 43, 322, 316, 44, 45, + 273, 221, 89, 277, 293, 200, 195, 54, 4, 95, + 294, 34, 169, 172, 238, 5, 52, 282, 210, 211, + 247, 232, 90, 106, 158, 188, 100, 86, 234, 196, + 254, 104, 98, 19, 153, 268, 269, 253, 92, 220, + 159, 276, 201, 278, 251, 283, 292, 245, 282, 210, + 211, 247, 466, 90, 106, 466, 187, 100, 63, 466, + 246, 179, 110, 98, 181, 165, 268, 269, 257, 223, + 118, 265, 276, 201, 278, 251, 283, 292, 46, 22, + 280, 282, 270, 211, 249, 272, 111, 106, 274, 188, + 100, 86, 220, 282, 275, 211, 98, 259, 111, 268, + 269, 198, 116, 75, 7, 276, 201, 278, 98, 283, + 292, 268, 269, 145, 291, 56, 160, 276, 201, 278, + 51, 283, 292, 41, 42, 40, 12, 315, 162, 282, + 229, 211, 204, 311, 111, 318, 197, 198, 116, 75, + 287, 288, 289, 290, 98, 319, 36, 268, 269, 197, + 328, 331, 301, 276, 201, 278, 301, 283, 292, 37, + 14, 357, 282, 301, 211, 225, 15, 105, 203, 311, + 198, 119, 49, 14, 117, 301, 301, 98, 301, 15, + 268, 269, 437, 301, 301, 301, 276, 201, 278, 301, + 283, 292, 301, 301, 437, 282, 301, 211, 301, 301, + 111, 301, 301, 198, 119, 70, 301, 301, 301, 301, + 98, 301, 142, 268, 269, 301, 301, 301, 301, 276, + 201, 278, 251, 283, 292, 46, 22, 280, 282, 301, + 211, 207, 301, 111, 301, 301, 198, 119, 70, 301, + 301, 301, 301, 98, 301, 166, 268, 269, 301, 301, + 301, 301, 276, 201, 278, 251, 283, 292, 46, 22, + 280, 282, 301, 211, 202, 301, 111, 301, 301, 198, + 116, 75, 301, 301, 301, 301, 98, 301, 301, 268, + 269, 197, 301, 301, 301, 276, 201, 278, 301, 283, + 292, 301, 301, 354, 282, 301, 211, 301, 301, 111, + 301, 310, 198, 119, 70, 354, 301, 301, 301, 98, + 301, 354, 268, 269, 197, 301, 301, 301, 276, 201, + 278, 301, 283, 292, 301, 301, 388, 282, 301, 211, + 206, 301, 105, 301, 301, 198, 119, 61, 388, 233, + 301, 301, 98, 301, 388, 268, 269, 197, 301, 301, + 301, 276, 201, 278, 301, 283, 292, 301, 301, 385, + 282, 301, 211, 301, 301, 111, 301, 301, 198, 115, + 67, 385, 301, 301, 301, 98, 301, 385, 268, 269, + 301, 301, 301, 301, 276, 201, 278, 254, 283, 292, + 19, 301, 301, 282, 253, 211, 301, 466, 111, 301, + 466, 193, 114, 62, 466, 282, 301, 211, 98, 301, + 111, 268, 269, 198, 101, 85, 301, 276, 201, 278, + 98, 283, 292, 268, 269, 254, 216, 301, 19, 276, + 201, 278, 253, 283, 292, 282, 466, 211, 301, 301, + 111, 14, 301, 198, 102, 84, 301, 15, 301, 301, + 98, 301, 301, 268, 269, 301, 301, 301, 301, 276, + 201, 278, 301, 283, 292, 301, 301, 282, 301, 211, + 301, 301, 111, 301, 301, 198, 119, 58, 301, 282, + 301, 211, 98, 301, 111, 268, 269, 198, 119, 69, + 301, 276, 201, 278, 98, 283, 292, 268, 269, 301, + 301, 301, 301, 276, 201, 278, 301, 283, 292, 282, + 301, 211, 301, 301, 111, 301, 301, 198, 101, 59, + 301, 301, 301, 301, 98, 301, 301, 268, 269, 301, + 301, 301, 301, 276, 201, 278, 301, 283, 292, 301, + 301, 282, 301, 211, 301, 301, 111, 301, 301, 198, + 119, 68, 301, 282, 301, 211, 98, 301, 111, 268, + 269, 198, 119, 60, 301, 276, 201, 278, 98, 283, + 292, 268, 269, 301, 301, 301, 301, 276, 201, 278, + 301, 283, 292, 282, 301, 211, 301, 301, 111, 301, + 301, 198, 119, 61, 301, 301, 301, 301, 98, 301, + 301, 268, 269, 301, 301, 301, 301, 276, 201, 278, + 301, 283, 292, 301, 301, 282, 301, 211, 301, 301, + 111, 301, 301, 198, 119, 71, 301, 282, 301, 211, + 98, 301, 111, 268, 269, 198, 119, 72, 301, 276, + 201, 278, 98, 283, 292, 268, 269, 301, 301, 301, + 301, 276, 201, 278, 301, 283, 292, 282, 301, 211, + 301, 301, 111, 301, 301, 198, 119, 73, 301, 301, + 301, 301, 98, 301, 301, 268, 269, 301, 301, 301, + 301, 276, 201, 278, 301, 283, 292, 301, 301, 282, + 301, 211, 301, 301, 111, 301, 301, 198, 119, 74, + 301, 282, 301, 211, 98, 301, 111, 268, 269, 198, + 119, 76, 301, 276, 201, 278, 98, 283, 292, 268, + 269, 301, 301, 301, 301, 276, 201, 278, 301, 283, + 292, 282, 301, 211, 301, 301, 111, 301, 301, 192, + 119, 64, 301, 301, 301, 301, 98, 301, 301, 268, + 269, 301, 301, 301, 301, 276, 201, 278, 301, 283, + 292, 301, 301, 282, 301, 211, 301, 301, 111, 301, + 301, 198, 119, 65, 301, 282, 301, 211, 98, 301, + 111, 268, 269, 198, 119, 66, 301, 276, 201, 278, + 98, 283, 292, 268, 269, 301, 301, 301, 301, 276, + 201, 278, 301, 283, 292, 282, 301, 211, 301, 301, + 111, 301, 301, 198, 119, 77, 301, 301, 301, 301, + 98, 301, 301, 268, 269, 301, 301, 301, 301, 276, + 201, 278, 301, 283, 292, 301, 301, 282, 301, 211, + 301, 301, 111, 301, 301, 198, 119, 78, 301, 282, + 301, 211, 98, 301, 111, 268, 269, 198, 119, 79, + 301, 276, 201, 278, 98, 283, 292, 268, 269, 301, + 301, 301, 301, 276, 201, 278, 301, 283, 292, 282, + 301, 211, 301, 301, 111, 301, 301, 198, 119, 80, + 301, 301, 301, 301, 98, 301, 301, 268, 269, 301, + 301, 301, 301, 276, 201, 278, 301, 283, 292, 301, + 301, 282, 301, 211, 301, 301, 111, 301, 301, 198, + 119, 81, 301, 282, 301, 211, 98, 301, 111, 268, + 269, 198, 119, 82, 301, 276, 201, 278, 98, 283, + 292, 268, 269, 301, 301, 301, 301, 276, 201, 278, + 301, 283, 292, 282, 301, 211, 301, 301, 111, 301, + 301, 198, 119, 83, 301, 301, 301, 301, 98, 301, + 301, 268, 269, 301, 301, 301, 301, 276, 201, 278, + 301, 283, 292, 301, 301, 282, 301, 211, 301, 301, + 111, 301, 301, 198, 119, 48, 301, 282, 301, 211, + 98, 301, 111, 268, 269, 198, 119, 50, 301, 276, + 201, 278, 98, 283, 292, 268, 269, 301, 301, 301, + 301, 276, 201, 278, 301, 283, 292, 307, 107, 301, + 301, 301, 301, 242, 243, 244, 2, 301, 305, 301, + 301, 301, 6, 55, 41, 42, 40, 12, 109, 301, + 301, 301, 212, 256, 213, 301, 301, 38, 301, 14, + 301, 287, 288, 289, 290, 15, 301, 301, 301, 301, + 41, 42, 40, 12, 301, 301, 301, 301, 301, 301, + 301, 301, 300, 27, 301, 301, 307, 287, 288, 289, + 290, 301, 242, 243, 244, 2, 301, 305, 301, 301, + 301, 6, 55, 301, 301, 301, 301, 109, 301, 14, + 301, 212, 256, 213, 301, 15, 301, 301, 301, 301, + 41, 42, 40, 12, 301, 301, 301, 301, 301, 301, + 301, 301, 301, 301, 301, 301, 301, 287, 288, 289, + 290, 301, 27, 301, 301, 235, 236, 237, 130, 301, + 301, 242, 243, 244, 1, 301, 301, 301, 301, 301, + 6, 55, 301, 301, 301, 301, 109, 301, 301, 301, + 212, 256, 213, 282, 301, 211, 301, 301, 111, 301, + 301, 198, 131, 301, 301, 301, 301, 301, 98, 301, + 301, 301, 301, 301, 301, 301, 325, 276, 201, 278, + 301, 283, 292, 301, 301, 301, 301, 301, 282, 301, + 211, 301, 301, 111, 301, 301, 198, 125, 301, 301, + 282, 301, 211, 98, 301, 111, 301, 301, 198, 129, + 301, 281, 276, 201, 278, 98, 283, 292, 301, 301, + 301, 301, 301, 301, 276, 201, 278, 301, 283, 292, + 301, 301, 301, 301, 282, 301, 211, 301, 301, 111, + 301, 301, 198, 120, 301, 301, 301, 301, 301, 98, + 301, 301, 301, 301, 301, 301, 301, 301, 276, 201, + 278, 301, 283, 292, 301, 301, 282, 301, 211, 301, + 301, 111, 301, 301, 198, 121, 301, 301, 282, 301, + 211, 98, 301, 111, 301, 301, 198, 122, 301, 301, + 276, 201, 278, 98, 283, 292, 301, 301, 301, 301, + 301, 301, 276, 201, 278, 301, 283, 292, 282, 301, + 211, 301, 301, 111, 301, 301, 198, 123, 301, 301, + 301, 301, 301, 98, 301, 301, 301, 301, 301, 301, + 301, 301, 276, 201, 278, 301, 283, 292, 301, 301, + 282, 301, 211, 301, 301, 111, 301, 301, 198, 124, + 301, 301, 282, 301, 211, 98, 301, 111, 301, 301, + 198, 128, 301, 301, 276, 201, 278, 98, 283, 292, + 301, 301, 218, 301, 301, 301, 276, 201, 278, 466, + 283, 292, 466, 218, 301, 3, 466, 450, 301, 301, + 466, 271, 301, 466, 301, 301, 218, 466, 450, 301, + 301, 254, 271, 466, 19, 301, 466, 301, 253, 35, + 466, 450, 301, 450, 401, 271, 450, 14, 466, 147, + 450, 301, 301, 15, 450, 301, 301, 450, 301, 466, + 301, 450, 286, 301, 301, 301, 301, 450, 301, 301, + 450, 301, 466, 301, 450, 218, 437, 301, 401, 401, + 401, 401, 466, 301, 301, 466, 301, 301, 437, 466, + 450, 301, 30, 301, 271, 401, 401, 401, 401, 466, + 301, 301, 466, 301, 324, 301, 466, 450, 301, 301, + 301, 271, 301, 301, 301, 301, 450, 301, 301, 450, + 301, 466, 301, 450, 301, 301, 301, 41, 42, 40, + 12, 301, 301, 450, 301, 299, 450, 301, 466, 301, + 450, 301, 301, 301, 287, 288, 289, 290, 41, 42, + 40, 12, 323, 41, 42, 40, 12, 301, 41, 42, + 40, 12, 182, 314, 31, 287, 288, 289, 290, 183, + 287, 288, 289, 290, 301, 287, 288, 289, 290, 301, + 301, 301, 301, 301, 301, 41, 42, 40, 12, 301, + 301, 301, 41, 42, 40, 12, 301, 301, 41, 42, + 40, 12, 287, 288, 289, 290, 326, 301, 301, 287, + 288, 289, 290, 301, 301, 287, 288, 289, 290, 466, + 301, 301, 466, 301, 301, 301, 466, 450, 301, 41, + 42, 40, 12, 301, 301, 301, 301, 301, 301, 301, + 301, 301, 301, 301, 301, 301, 287, 288, 289, 290, + 301, 301, 301, 450, 301, 301, 450, 301, 466, 301, + 450, ); public static $yy_lookahead = array( - 9, 10, 11, 12, 43, 14, 70, 16, 80, 18, - 19, 50, 21, 77, 78, 24, 80, 13, 15, 28, - 29, 30, 17, 32, 20, 34, 22, 99, 37, 25, - 14, 40, 41, 42, 43, 31, 45, 33, 47, 35, - 49, 50, 51, 52, 2, 15, 43, 43, 57, 58, - 34, 9, 10, 11, 12, 80, 14, 13, 16, 15, - 18, 19, 95, 21, 97, 98, 24, 72, 52, 25, - 28, 29, 30, 43, 32, 31, 34, 82, 34, 37, - 50, 17, 40, 41, 42, 43, 65, 45, 67, 47, - 46, 49, 50, 14, 52, 16, 101, 61, 62, 57, - 58, 9, 10, 11, 12, 72, 14, 43, 16, 1, - 18, 19, 1, 21, 50, 82, 24, 84, 85, 86, - 28, 29, 30, 69, 32, 17, 34, 106, 49, 37, - 72, 52, 40, 41, 42, 43, 65, 45, 67, 47, - 82, 49, 50, 94, 52, 84, 85, 86, 94, 57, - 58, 9, 10, 11, 12, 72, 14, 17, 16, 101, - 18, 19, 15, 21, 17, 82, 24, 84, 85, 86, - 28, 29, 30, 91, 32, 94, 34, 96, 15, 37, - 17, 99, 40, 41, 42, 43, 46, 45, 72, 47, - 1, 49, 50, 46, 52, 1, 2, 72, 82, 57, - 58, 9, 10, 11, 12, 72, 14, 82, 16, 46, - 18, 19, 96, 21, 96, 82, 24, 84, 85, 86, - 28, 29, 30, 94, 32, 96, 34, 97, 98, 37, - 91, 34, 40, 41, 42, 43, 72, 45, 99, 47, - 76, 49, 50, 46, 52, 70, 82, 34, 73, 57, - 58, 9, 10, 11, 12, 80, 14, 72, 16, 46, - 18, 19, 33, 21, 89, 101, 24, 82, 93, 69, - 28, 29, 30, 14, 32, 16, 34, 1, 2, 37, - 51, 96, 40, 41, 42, 43, 72, 45, 1, 47, - 76, 49, 50, 33, 52, 35, 82, 97, 98, 57, - 58, 9, 10, 11, 12, 12, 14, 14, 16, 16, - 18, 19, 25, 21, 1, 101, 24, 72, 31, 34, - 28, 29, 30, 76, 32, 32, 34, 82, 43, 37, - 72, 46, 40, 41, 42, 43, 51, 45, 43, 47, - 82, 49, 50, 76, 52, 52, 51, 13, 101, 57, - 58, 9, 10, 11, 12, 21, 14, 21, 16, 25, - 18, 19, 1, 21, 51, 31, 24, 70, 101, 102, - 28, 29, 30, 82, 32, 25, 34, 80, 44, 37, - 44, 31, 40, 41, 42, 43, 70, 45, 27, 47, - 79, 49, 50, 77, 52, 59, 80, 13, 76, 57, - 58, 9, 10, 11, 12, 21, 14, 70, 16, 25, - 18, 19, 27, 21, 77, 31, 24, 80, 12, 34, - 28, 29, 30, 101, 32, 6, 34, 8, 44, 37, - 25, 46, 40, 41, 42, 43, 31, 45, 80, 47, - 34, 49, 50, 14, 52, 36, 37, 38, 39, 57, - 58, 9, 10, 11, 12, 76, 14, 80, 16, 72, - 18, 19, 53, 54, 55, 56, 24, 15, 59, 82, - 28, 29, 30, 21, 32, 94, 34, 97, 98, 37, - 101, 52, 40, 41, 42, 43, 21, 45, 95, 47, - 94, 49, 50, 14, 52, 36, 37, 38, 39, 57, - 58, 9, 10, 11, 12, 65, 14, 67, 16, 44, - 18, 19, 53, 54, 55, 56, 24, 21, 63, 64, - 28, 29, 30, 12, 32, 14, 34, 16, 33, 37, - 35, 52, 40, 41, 42, 43, 43, 45, 16, 47, - 44, 49, 50, 50, 52, 105, 106, 51, 94, 57, - 58, 65, 66, 67, 68, 9, 70, 71, 12, 73, - 74, 75, 16, 52, 9, 9, 80, 12, 12, 83, - 48, 16, 16, 101, 88, 89, 90, 2, 92, 93, - 7, 8, 65, 66, 67, 68, 9, 70, 71, 12, - 73, 74, 75, 16, 14, 94, 16, 80, 34, 20, - 83, 34, 25, 48, 27, 88, 89, 90, 31, 92, - 93, 102, 33, 46, 33, 65, 35, 67, 68, 98, - 70, 71, 64, 73, 74, 75, 65, 47, 67, 49, - 80, 70, 52, 83, 73, 74, 75, 94, 88, 89, - 90, 80, 92, 93, 83, 1, 33, 1, 35, 88, - 89, 90, 81, 92, 93, 81, 94, 13, 65, 13, - 67, 7, 13, 70, 103, 104, 73, 74, 75, 25, - 81, 25, 13, 80, 16, 31, 83, 31, 16, 16, - 16, 88, 89, 90, 16, 92, 93, 14, 16, 32, - 65, 43, 67, 32, 34, 70, 103, 104, 73, 74, - 75, 65, 77, 67, 16, 80, 70, 16, 83, 73, - 74, 75, 15, 88, 89, 90, 80, 92, 93, 83, - 9, 16, 51, 12, 88, 89, 90, 16, 92, 93, - 65, 49, 67, 49, 9, 70, 100, 12, 73, 74, - 75, 16, 16, 51, 9, 80, 22, 12, 83, 35, - 25, 16, 107, 88, 89, 90, 31, 92, 93, 48, - 107, 65, 107, 67, 107, 100, 70, 107, 1, 73, - 74, 75, 70, 107, 107, 73, 80, 107, 107, 83, - 13, 1, 80, 48, 88, 89, 90, 107, 92, 93, - 107, 107, 25, 13, 65, 93, 67, 17, 31, 70, - 104, 107, 73, 74, 75, 25, 107, 107, 107, 80, - 107, 31, 83, 107, 34, 107, 107, 88, 89, 90, - 107, 92, 93, 65, 107, 67, 46, 107, 70, 100, - 107, 73, 74, 75, 107, 77, 107, 107, 80, 107, - 107, 83, 107, 107, 107, 107, 88, 89, 90, 107, - 92, 93, 3, 20, 107, 107, 107, 107, 9, 10, - 11, 12, 107, 14, 107, 107, 107, 18, 19, 36, - 37, 38, 39, 24, 107, 107, 107, 28, 29, 30, - 107, 107, 23, 107, 25, 107, 53, 54, 55, 56, - 31, 107, 107, 107, 107, 36, 37, 38, 39, 107, - 107, 107, 107, 107, 107, 107, 107, 58, 59, 107, - 107, 3, 53, 54, 55, 56, 107, 9, 10, 11, - 12, 107, 14, 107, 107, 107, 18, 19, 107, 107, - 107, 107, 24, 107, 25, 107, 28, 29, 30, 107, - 31, 107, 107, 107, 107, 36, 37, 38, 39, 107, - 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, - 107, 107, 53, 54, 55, 56, 58, 59, 107, 107, - 3, 4, 5, 6, 107, 107, 9, 10, 11, 12, - 107, 107, 107, 107, 107, 18, 19, 107, 107, 107, - 107, 24, 107, 107, 107, 28, 29, 30, 65, 107, - 67, 107, 107, 70, 107, 107, 73, 74, 75, 107, - 107, 107, 107, 80, 107, 107, 83, 107, 107, 107, - 107, 88, 89, 90, 107, 92, 93, 107, 107, 107, - 107, 107, 107, 65, 107, 67, 107, 107, 70, 107, - 107, 73, 74, 75, 65, 107, 67, 107, 80, 70, - 107, 83, 73, 74, 75, 107, 88, 89, 90, 80, - 92, 93, 83, 107, 107, 107, 107, 88, 89, 90, - 107, 92, 93, 65, 107, 67, 107, 107, 70, 107, - 107, 73, 74, 75, 107, 107, 107, 107, 80, 107, - 107, 83, 107, 107, 107, 107, 88, 89, 90, 107, - 92, 93, 107, 107, 65, 107, 67, 107, 107, 70, - 107, 107, 73, 74, 75, 65, 107, 67, 107, 80, - 70, 107, 83, 73, 74, 75, 107, 88, 89, 90, - 80, 92, 93, 83, 107, 107, 107, 107, 88, 89, - 90, 107, 92, 93, 65, 107, 67, 107, 107, 70, - 107, 107, 73, 74, 75, 107, 107, 107, 107, 80, - 107, 107, 83, 107, 107, 107, 107, 88, 89, 90, - 107, 92, 93, 107, 107, 65, 107, 67, 107, 107, - 70, 107, 107, 73, 74, 75, 65, 107, 67, 107, - 80, 70, 107, 83, 73, 74, 75, 107, 88, 89, - 90, 80, 92, 93, 83, 107, 107, 107, 107, 88, - 89, 90, 107, 92, 93, 65, 107, 67, 107, 107, - 70, 107, 107, 73, 74, 75, 107, 107, 107, 107, - 80, 107, 107, 83, 107, 107, 107, 107, 88, 89, - 90, 107, 92, 93, 107, 107, 65, 107, 67, 107, - 107, 70, 107, 107, 73, 74, 75, 65, 107, 67, - 107, 80, 70, 107, 83, 73, 74, 75, 107, 88, - 89, 90, 80, 92, 93, 83, 107, 107, 107, 107, - 88, 89, 90, 107, 92, 93, 65, 107, 67, 107, - 107, 70, 107, 107, 73, 74, 75, 107, 107, 107, - 107, 80, 107, 107, 83, 107, 107, 107, 107, 88, - 89, 90, 107, 92, 93, 107, 107, 65, 107, 67, - 107, 107, 70, 107, 107, 73, 74, 75, 65, 107, - 67, 107, 80, 70, 107, 83, 73, 74, 75, 107, - 88, 89, 90, 80, 92, 93, 83, 107, 107, 107, - 107, 88, 89, 90, 107, 92, 93, 65, 107, 67, - 107, 107, 70, 107, 107, 73, 74, 75, 107, 107, - 107, 107, 80, 107, 107, 83, 107, 107, 107, 107, - 88, 89, 90, 107, 92, 93, 107, 107, 65, 107, - 67, 107, 107, 70, 107, 107, 73, 74, 75, 65, - 107, 67, 107, 80, 70, 107, 83, 73, 74, 75, - 107, 88, 89, 90, 80, 92, 93, 83, 107, 107, - 107, 107, 88, 89, 90, 107, 92, 93, 65, 107, - 67, 107, 107, 70, 107, 107, 73, 74, 75, 107, - 107, 107, 107, 80, 107, 107, 83, 107, 107, 107, - 107, 88, 89, 90, 107, 92, 93, 107, 107, 65, - 107, 67, 107, 107, 70, 107, 107, 73, 74, 75, - 65, 107, 67, 107, 80, 70, 107, 83, 73, 74, - 75, 107, 88, 89, 90, 80, 92, 93, 83, 107, - 107, 107, 107, 88, 89, 90, 107, 92, 93, 65, - 107, 67, 107, 107, 70, 107, 107, 73, 74, 75, - 107, 107, 107, 107, 80, 107, 107, 83, 107, 107, - 107, 107, 88, 89, 90, 107, 92, 93, 107, 107, - 65, 107, 67, 107, 107, 70, 107, 107, 73, 74, - 75, 65, 107, 67, 107, 80, 70, 107, 83, 73, - 74, 75, 107, 88, 89, 90, 80, 92, 93, 83, - 107, 107, 107, 107, 88, 89, 90, 107, 92, 93, - 65, 107, 67, 107, 107, 70, 107, 107, 73, 74, - 75, 107, 107, 107, 107, 80, 107, 107, 83, 107, - 107, 107, 107, 88, 89, 90, 107, 92, 93, 107, - 107, 65, 107, 67, 107, 107, 70, 107, 107, 73, - 74, 75, 65, 107, 67, 107, 80, 70, 107, 83, - 73, 74, 107, 107, 88, 89, 90, 80, 92, 93, - 107, 107, 107, 107, 87, 88, 89, 90, 2, 92, - 93, 65, 107, 67, 107, 9, 70, 107, 12, 73, - 74, 15, 16, 17, 107, 107, 80, 21, 107, 107, - 107, 107, 107, 87, 88, 89, 90, 107, 92, 93, - 107, 107, 65, 107, 67, 107, 107, 70, 107, 43, - 73, 74, 46, 65, 48, 67, 50, 80, 70, 107, - 107, 73, 74, 107, 107, 88, 89, 90, 80, 92, - 93, 107, 107, 107, 107, 107, 88, 89, 90, 2, - 92, 93, 65, 107, 67, 107, 9, 70, 107, 12, - 73, 74, 15, 16, 17, 107, 107, 80, 21, 107, - 107, 107, 107, 107, 107, 88, 89, 90, 107, 92, - 93, 107, 107, 65, 107, 67, 107, 107, 70, 107, - 43, 73, 74, 46, 65, 48, 67, 50, 80, 70, - 107, 107, 73, 74, 107, 107, 88, 89, 90, 80, - 92, 93, 107, 107, 107, 107, 107, 88, 89, 90, - 2, 92, 93, 65, 107, 67, 2, 9, 70, 107, - 12, 73, 74, 9, 16, 17, 12, 107, 80, 21, - 16, 17, 107, 107, 107, 21, 88, 89, 90, 107, - 92, 93, 107, 2, 65, 107, 67, 107, 107, 70, - 107, 43, 73, 74, 46, 107, 48, 43, 50, 80, - 46, 107, 48, 107, 50, 51, 107, 88, 89, 90, - 107, 92, 93, 107, 2, 34, 107, 36, 37, 38, - 39, 9, 107, 107, 12, 107, 107, 46, 16, 17, - 107, 107, 107, 21, 53, 54, 55, 56, 107, 26, - 107, 107, 107, 107, 107, 107, 107, 13, 107, 36, - 37, 38, 39, 107, 107, 43, 107, 107, 46, 107, - 48, 107, 50, 107, 107, 107, 53, 54, 55, 56, - 36, 37, 38, 39, 107, 35, 36, 37, 38, 39, - 13, 107, 107, 107, 13, 107, 107, 53, 54, 55, - 56, 107, 107, 53, 54, 55, 56, 36, 37, 38, - 39, 107, 107, 36, 37, 38, 39, 36, 37, 38, - 39, 13, 51, 2, 53, 54, 55, 56, 13, 107, - 53, 54, 55, 56, 53, 54, 55, 56, 107, 107, - 107, 107, 107, 107, 36, 37, 38, 39, 107, 107, - 107, 36, 37, 38, 39, 107, 107, 36, 37, 38, - 39, 53, 54, 55, 56, 107, 107, 107, 53, 54, - 55, 56, 107, 107, 53, 54, 55, 56, 9, 107, - 107, 12, 107, 107, 107, 16, 17, 107, 107, 107, - 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, - 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, - 107, 107, 43, 107, 107, 46, 107, 48, 107, 50, + 2, 70, 61, 62, 73, 92, 34, 9, 10, 11, + 12, 80, 14, 100, 16, 43, 18, 19, 46, 21, + 1, 90, 24, 51, 13, 94, 28, 29, 30, 80, + 32, 20, 34, 22, 17, 37, 25, 39, 40, 41, + 42, 43, 31, 45, 33, 47, 35, 49, 50, 100, + 52, 85, 86, 87, 43, 57, 58, 9, 10, 11, + 12, 12, 14, 14, 16, 16, 18, 19, 65, 21, + 67, 12, 24, 14, 33, 16, 28, 29, 30, 1, + 32, 32, 34, 97, 96, 37, 98, 99, 40, 41, + 42, 43, 51, 45, 65, 47, 67, 49, 50, 51, + 52, 52, 15, 69, 17, 57, 58, 9, 10, 11, + 12, 52, 14, 13, 16, 15, 18, 19, 15, 21, + 17, 95, 24, 97, 20, 25, 28, 29, 30, 95, + 32, 31, 34, 46, 34, 37, 107, 33, 40, 41, + 42, 43, 65, 45, 67, 47, 46, 49, 50, 46, + 52, 1, 2, 17, 14, 57, 58, 9, 10, 11, + 12, 14, 14, 16, 16, 12, 18, 19, 95, 21, + 97, 72, 24, 17, 34, 76, 28, 29, 30, 43, + 32, 82, 34, 106, 107, 37, 50, 34, 40, 41, + 42, 43, 52, 45, 47, 47, 49, 49, 50, 52, + 52, 102, 46, 13, 1, 57, 58, 9, 10, 11, + 12, 21, 14, 70, 16, 25, 18, 19, 27, 21, + 77, 31, 24, 80, 95, 34, 28, 29, 30, 14, + 32, 16, 34, 82, 44, 37, 72, 46, 40, 41, + 42, 43, 70, 45, 69, 47, 82, 49, 50, 77, + 52, 15, 80, 13, 51, 57, 58, 9, 10, 11, + 12, 21, 14, 80, 16, 25, 18, 19, 79, 21, + 76, 31, 24, 98, 99, 25, 28, 29, 30, 43, + 32, 31, 34, 96, 44, 37, 50, 14, 40, 41, + 42, 43, 72, 45, 72, 47, 102, 49, 50, 14, + 52, 16, 82, 72, 82, 57, 58, 9, 10, 11, + 12, 72, 14, 82, 16, 1, 18, 19, 76, 21, + 95, 82, 24, 15, 102, 52, 28, 29, 30, 21, + 32, 17, 34, 102, 49, 37, 97, 52, 40, 41, + 42, 43, 70, 45, 102, 47, 9, 49, 50, 12, + 52, 70, 80, 16, 73, 57, 58, 9, 10, 11, + 12, 80, 14, 21, 16, 95, 18, 19, 6, 21, + 8, 72, 24, 98, 99, 94, 28, 29, 30, 92, + 32, 82, 34, 1, 2, 37, 44, 100, 40, 41, + 42, 43, 72, 45, 76, 47, 97, 49, 50, 76, + 52, 59, 82, 1, 14, 57, 58, 9, 10, 11, + 12, 43, 14, 72, 16, 102, 18, 19, 50, 21, + 102, 103, 24, 82, 80, 102, 28, 29, 30, 27, + 32, 25, 34, 98, 99, 37, 80, 31, 40, 41, + 42, 43, 52, 45, 33, 47, 35, 49, 50, 16, + 52, 36, 37, 38, 39, 57, 58, 9, 10, 11, + 12, 95, 14, 34, 16, 2, 18, 19, 53, 54, + 55, 56, 24, 21, 59, 46, 28, 29, 30, 43, + 32, 48, 34, 63, 64, 37, 50, 34, 40, 41, + 42, 43, 33, 45, 35, 47, 44, 49, 50, 46, + 52, 36, 37, 38, 39, 57, 58, 9, 10, 11, + 12, 34, 14, 33, 16, 35, 18, 19, 53, 54, + 55, 56, 24, 46, 7, 8, 28, 29, 30, 43, + 32, 103, 34, 34, 33, 37, 35, 51, 40, 41, + 42, 43, 95, 45, 99, 47, 64, 49, 50, 81, + 52, 15, 81, 81, 7, 57, 58, 65, 66, 67, + 68, 70, 70, 71, 95, 73, 74, 75, 77, 78, + 9, 80, 80, 12, 72, 83, 84, 16, 76, 43, + 95, 89, 90, 91, 82, 93, 94, 13, 65, 66, + 67, 68, 9, 70, 71, 12, 73, 74, 75, 16, + 13, 16, 16, 80, 102, 72, 83, 84, 16, 48, + 16, 16, 89, 90, 91, 82, 93, 94, 85, 86, + 87, 65, 14, 67, 68, 16, 70, 71, 32, 73, + 74, 75, 43, 65, 32, 67, 80, 21, 70, 83, + 84, 73, 74, 75, 34, 89, 90, 91, 80, 93, + 94, 83, 84, 26, 16, 16, 49, 89, 90, 91, + 44, 93, 94, 36, 37, 38, 39, 51, 49, 65, + 16, 67, 104, 105, 70, 51, 1, 73, 74, 75, + 53, 54, 55, 56, 80, 51, 15, 83, 84, 1, + 16, 35, 108, 89, 90, 91, 108, 93, 94, 22, + 25, 13, 65, 108, 67, 17, 31, 70, 104, 105, + 73, 74, 75, 25, 77, 108, 108, 80, 108, 31, + 83, 84, 34, 108, 108, 108, 89, 90, 91, 108, + 93, 94, 108, 108, 46, 65, 108, 67, 108, 108, + 70, 108, 108, 73, 74, 75, 108, 108, 108, 108, + 80, 108, 72, 83, 84, 108, 108, 108, 108, 89, + 90, 91, 82, 93, 94, 85, 86, 87, 65, 108, + 67, 101, 108, 70, 108, 108, 73, 74, 75, 108, + 108, 108, 108, 80, 108, 72, 83, 84, 108, 108, + 108, 108, 89, 90, 91, 82, 93, 94, 85, 86, + 87, 65, 108, 67, 101, 108, 70, 108, 108, 73, + 74, 75, 108, 108, 108, 108, 80, 108, 108, 83, + 84, 1, 108, 108, 108, 89, 90, 91, 108, 93, + 94, 108, 108, 13, 65, 108, 67, 108, 108, 70, + 108, 105, 73, 74, 75, 25, 108, 108, 108, 80, + 108, 31, 83, 84, 1, 108, 108, 108, 89, 90, + 91, 108, 93, 94, 108, 108, 13, 65, 108, 67, + 101, 108, 70, 108, 108, 73, 74, 75, 25, 77, + 108, 108, 80, 108, 31, 83, 84, 1, 108, 108, + 108, 89, 90, 91, 108, 93, 94, 108, 108, 13, + 65, 108, 67, 108, 108, 70, 108, 108, 73, 74, + 75, 25, 108, 108, 108, 80, 108, 31, 83, 84, + 108, 108, 108, 108, 89, 90, 91, 9, 93, 94, + 12, 108, 108, 65, 16, 67, 108, 9, 70, 108, + 12, 73, 74, 75, 16, 65, 108, 67, 80, 108, + 70, 83, 84, 73, 74, 75, 108, 89, 90, 91, + 80, 93, 94, 83, 84, 9, 48, 108, 12, 89, + 90, 91, 16, 93, 94, 65, 48, 67, 108, 108, + 70, 25, 108, 73, 74, 75, 108, 31, 108, 108, + 80, 108, 108, 83, 84, 108, 108, 108, 108, 89, + 90, 91, 108, 93, 94, 108, 108, 65, 108, 67, + 108, 108, 70, 108, 108, 73, 74, 75, 108, 65, + 108, 67, 80, 108, 70, 83, 84, 73, 74, 75, + 108, 89, 90, 91, 80, 93, 94, 83, 84, 108, + 108, 108, 108, 89, 90, 91, 108, 93, 94, 65, + 108, 67, 108, 108, 70, 108, 108, 73, 74, 75, + 108, 108, 108, 108, 80, 108, 108, 83, 84, 108, + 108, 108, 108, 89, 90, 91, 108, 93, 94, 108, + 108, 65, 108, 67, 108, 108, 70, 108, 108, 73, + 74, 75, 108, 65, 108, 67, 80, 108, 70, 83, + 84, 73, 74, 75, 108, 89, 90, 91, 80, 93, + 94, 83, 84, 108, 108, 108, 108, 89, 90, 91, + 108, 93, 94, 65, 108, 67, 108, 108, 70, 108, + 108, 73, 74, 75, 108, 108, 108, 108, 80, 108, + 108, 83, 84, 108, 108, 108, 108, 89, 90, 91, + 108, 93, 94, 108, 108, 65, 108, 67, 108, 108, + 70, 108, 108, 73, 74, 75, 108, 65, 108, 67, + 80, 108, 70, 83, 84, 73, 74, 75, 108, 89, + 90, 91, 80, 93, 94, 83, 84, 108, 108, 108, + 108, 89, 90, 91, 108, 93, 94, 65, 108, 67, + 108, 108, 70, 108, 108, 73, 74, 75, 108, 108, + 108, 108, 80, 108, 108, 83, 84, 108, 108, 108, + 108, 89, 90, 91, 108, 93, 94, 108, 108, 65, + 108, 67, 108, 108, 70, 108, 108, 73, 74, 75, + 108, 65, 108, 67, 80, 108, 70, 83, 84, 73, + 74, 75, 108, 89, 90, 91, 80, 93, 94, 83, + 84, 108, 108, 108, 108, 89, 90, 91, 108, 93, + 94, 65, 108, 67, 108, 108, 70, 108, 108, 73, + 74, 75, 108, 108, 108, 108, 80, 108, 108, 83, + 84, 108, 108, 108, 108, 89, 90, 91, 108, 93, + 94, 108, 108, 65, 108, 67, 108, 108, 70, 108, + 108, 73, 74, 75, 108, 65, 108, 67, 80, 108, + 70, 83, 84, 73, 74, 75, 108, 89, 90, 91, + 80, 93, 94, 83, 84, 108, 108, 108, 108, 89, + 90, 91, 108, 93, 94, 65, 108, 67, 108, 108, + 70, 108, 108, 73, 74, 75, 108, 108, 108, 108, + 80, 108, 108, 83, 84, 108, 108, 108, 108, 89, + 90, 91, 108, 93, 94, 108, 108, 65, 108, 67, + 108, 108, 70, 108, 108, 73, 74, 75, 108, 65, + 108, 67, 80, 108, 70, 83, 84, 73, 74, 75, + 108, 89, 90, 91, 80, 93, 94, 83, 84, 108, + 108, 108, 108, 89, 90, 91, 108, 93, 94, 65, + 108, 67, 108, 108, 70, 108, 108, 73, 74, 75, + 108, 108, 108, 108, 80, 108, 108, 83, 84, 108, + 108, 108, 108, 89, 90, 91, 108, 93, 94, 108, + 108, 65, 108, 67, 108, 108, 70, 108, 108, 73, + 74, 75, 108, 65, 108, 67, 80, 108, 70, 83, + 84, 73, 74, 75, 108, 89, 90, 91, 80, 93, + 94, 83, 84, 108, 108, 108, 108, 89, 90, 91, + 108, 93, 94, 65, 108, 67, 108, 108, 70, 108, + 108, 73, 74, 75, 108, 108, 108, 108, 80, 108, + 108, 83, 84, 108, 108, 108, 108, 89, 90, 91, + 108, 93, 94, 108, 108, 65, 108, 67, 108, 108, + 70, 108, 108, 73, 74, 75, 108, 65, 108, 67, + 80, 108, 70, 83, 84, 73, 74, 75, 108, 89, + 90, 91, 80, 93, 94, 83, 84, 108, 108, 108, + 108, 89, 90, 91, 108, 93, 94, 3, 20, 108, + 108, 108, 108, 9, 10, 11, 12, 108, 14, 108, + 108, 108, 18, 19, 36, 37, 38, 39, 24, 108, + 108, 108, 28, 29, 30, 108, 108, 23, 108, 25, + 108, 53, 54, 55, 56, 31, 108, 108, 108, 108, + 36, 37, 38, 39, 108, 108, 108, 108, 108, 108, + 108, 108, 58, 59, 108, 108, 3, 53, 54, 55, + 56, 108, 9, 10, 11, 12, 108, 14, 108, 108, + 108, 18, 19, 108, 108, 108, 108, 24, 108, 25, + 108, 28, 29, 30, 108, 31, 108, 108, 108, 108, + 36, 37, 38, 39, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 53, 54, 55, + 56, 58, 59, 108, 108, 3, 4, 5, 6, 108, + 108, 9, 10, 11, 12, 108, 108, 108, 108, 108, + 18, 19, 108, 108, 108, 108, 24, 108, 108, 108, + 28, 29, 30, 65, 108, 67, 108, 108, 70, 108, + 108, 73, 74, 108, 108, 108, 108, 108, 80, 108, + 108, 108, 108, 108, 108, 108, 88, 89, 90, 91, + 108, 93, 94, 108, 108, 108, 108, 108, 65, 108, + 67, 108, 108, 70, 108, 108, 73, 74, 108, 108, + 65, 108, 67, 80, 108, 70, 108, 108, 73, 74, + 108, 88, 89, 90, 91, 80, 93, 94, 108, 108, + 108, 108, 108, 108, 89, 90, 91, 108, 93, 94, + 108, 108, 108, 108, 65, 108, 67, 108, 108, 70, + 108, 108, 73, 74, 108, 108, 108, 108, 108, 80, + 108, 108, 108, 108, 108, 108, 108, 108, 89, 90, + 91, 108, 93, 94, 108, 108, 65, 108, 67, 108, + 108, 70, 108, 108, 73, 74, 108, 108, 65, 108, + 67, 80, 108, 70, 108, 108, 73, 74, 108, 108, + 89, 90, 91, 80, 93, 94, 108, 108, 108, 108, + 108, 108, 89, 90, 91, 108, 93, 94, 65, 108, + 67, 108, 108, 70, 108, 108, 73, 74, 108, 108, + 108, 108, 108, 80, 108, 108, 108, 108, 108, 108, + 108, 108, 89, 90, 91, 108, 93, 94, 108, 108, + 65, 108, 67, 108, 108, 70, 108, 108, 73, 74, + 108, 108, 65, 108, 67, 80, 108, 70, 108, 108, + 73, 74, 108, 108, 89, 90, 91, 80, 93, 94, + 108, 108, 2, 108, 108, 108, 89, 90, 91, 9, + 93, 94, 12, 2, 108, 15, 16, 17, 108, 108, + 9, 21, 108, 12, 108, 108, 2, 16, 17, 108, + 108, 9, 21, 9, 12, 108, 12, 108, 16, 15, + 16, 17, 108, 43, 2, 21, 46, 25, 48, 27, + 50, 108, 108, 31, 43, 108, 108, 46, 108, 48, + 108, 50, 51, 108, 108, 108, 108, 43, 108, 108, + 46, 108, 48, 108, 50, 2, 34, 108, 36, 37, + 38, 39, 9, 108, 108, 12, 108, 108, 46, 16, + 17, 108, 2, 108, 21, 53, 54, 55, 56, 9, + 108, 108, 12, 108, 13, 108, 16, 17, 108, 108, + 108, 21, 108, 108, 108, 108, 43, 108, 108, 46, + 108, 48, 108, 50, 108, 108, 108, 36, 37, 38, + 39, 108, 108, 43, 108, 13, 46, 108, 48, 108, + 50, 108, 108, 108, 53, 54, 55, 56, 36, 37, + 38, 39, 35, 36, 37, 38, 39, 108, 36, 37, + 38, 39, 13, 51, 2, 53, 54, 55, 56, 13, + 53, 54, 55, 56, 108, 53, 54, 55, 56, 108, + 108, 108, 108, 108, 108, 36, 37, 38, 39, 108, + 108, 108, 36, 37, 38, 39, 108, 108, 36, 37, + 38, 39, 53, 54, 55, 56, 13, 108, 108, 53, + 54, 55, 56, 108, 108, 53, 54, 55, 56, 9, + 108, 108, 12, 108, 108, 108, 16, 17, 108, 36, + 37, 38, 39, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 53, 54, 55, 56, + 108, 108, 108, 43, 108, 108, 46, 108, 48, 108, + 50, ); - const YY_SHIFT_USE_DFLT = -40; - const YY_SHIFT_MAX = 232; + const YY_SHIFT_USE_DFLT = -29; + const YY_SHIFT_MAX = 234; public static $yy_shift_ofst = array( - -40, 92, 92, 142, 192, 192, 242, 142, 142, 192, - 142, 242, -9, 42, 292, 142, 142, 142, 292, 142, - 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, - 342, 142, 142, 142, 392, 142, 142, 142, 442, 492, - 492, 492, 492, 492, 492, 492, 492, 859, 909, 909, - 580, 849, 780, 79, 16, 287, 908, 833, 1843, 1864, - 1870, 1891, 1897, 409, 1901, 1928, 1941, 1935, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 577, 725, 64, 147, 287, - 287, 16, 16, 194, 967, 1636, 555, 511, 644, 646, - 767, 546, 546, 163, 350, 429, 350, 405, 108, 140, - 259, 259, 313, 276, 361, 350, 111, 111, 111, 111, - 111, 111, 111, 111, 5, 5, 189, 111, -40, -40, - 1784, 1707, 1778, 1842, 1989, 293, 711, 556, 30, 350, - 350, 452, 350, 479, 350, 479, 350, -39, -39, 350, - 350, 350, 350, -39, 406, -39, -39, -39, 493, -39, - 493, -39, 350, 350, 350, 350, 111, 575, 111, 111, - 575, 111, 564, 5, 5, 5, -40, -40, -40, -40, - -40, -40, 1811, 4, 44, 334, 384, 735, 285, 385, - 336, 496, 419, 573, 579, 522, 465, 197, 213, 567, - 260, 495, 229, 295, 581, 613, 3, 654, 649, 659, - 658, 662, 663, 664, 668, 673, 672, 648, 657, 661, - 660, 688, 564, 691, 682, 684, 705, 671, 692, 726, - 697, 714, 724, + -29, 98, 98, 148, 198, 198, 248, 148, 148, 198, + 148, 248, -2, 48, 298, 148, 148, 148, 298, 148, + 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, + 348, 148, 148, 148, 148, 398, 148, 148, 148, 448, + 498, 498, 498, 498, 498, 498, 498, 498, 1574, 1624, + 1624, 147, 1564, 688, 285, 140, 675, 1623, 1548, 627, + 2021, 2047, 2042, 2052, 415, 2079, 2086, 2092, 2123, 465, + 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, + 465, 465, 465, 465, 465, 465, 465, 1952, 956, 136, + 87, 675, 675, 140, 140, 150, 1682, 1930, 561, 59, + 820, 853, 886, 337, 337, 103, 250, 273, 250, 406, + 314, 156, 215, 215, 203, 382, 402, 250, 19, 19, + 19, 19, 19, 19, 19, 19, 17, 17, 78, 19, + -29, -29, 1941, 1954, 2003, 2020, 2140, 49, 918, 583, + 236, 250, 250, 308, 250, 390, 250, 390, 250, 368, + 368, 250, 250, 250, 250, 368, 153, 368, 368, 368, + 436, 368, 436, 368, 250, 250, 250, 250, 19, 463, + 19, 19, 463, 19, 499, 17, 17, 17, -29, -29, + -29, -29, -29, -29, 1972, 11, 100, 190, 240, 928, + -28, 191, 342, 616, 362, 517, 104, 433, 452, 429, + 453, 477, 411, 459, 41, 486, 480, 501, 536, 547, + 574, 587, 585, 586, 592, 594, 595, 608, 609, 589, + 596, 602, 610, 638, 499, 639, 607, 619, 654, 624, + 634, 674, 671, 656, 677, ); - const YY_REDUCE_USE_DFLT = -73; - const YY_REDUCE_MAX = 181; + const YY_REDUCE_USE_DFLT = -88; + const YY_REDUCE_MAX = 183; public static $yy_reduce_ofst = array( - 36, 486, 517, 550, 561, 593, 625, 636, 665, 696, - 729, 758, 933, 968, 979, 1008, 1039, 1050, 1079, 1110, - 1121, 1150, 1181, 1192, 1221, 1252, 1263, 1292, 1323, 1334, - 1363, 1394, 1405, 1434, 1465, 1476, 1505, 1536, 1547, 1576, - 1607, 1618, 1647, 1678, 1689, 1718, 1749, 33, 83, 133, - 175, 440, 164, 702, -64, 214, 21, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 116, 185, -33, 200, -5, - 58, 316, 337, 267, 71, 54, 81, -72, 247, 247, - 247, 129, 81, 130, 125, 297, 245, 258, 322, 130, - 82, 139, 247, 247, 247, 387, 379, 247, 247, 247, - 247, 247, 247, 247, 130, 380, 247, 247, 455, 247, - 49, 49, 49, 49, 49, -25, 118, 49, 49, 291, - 291, 311, 291, 358, 291, 377, 291, 393, 393, 291, - 291, 291, 291, 393, 381, 393, 393, 393, 396, 393, - 454, 393, 291, 291, 291, 291, 472, 509, 472, 472, - 509, 472, 501, 521, 521, 521, 558, 571, 574, 589, - 543, 562, + -59, 492, 523, 556, 568, 604, 637, 670, 703, 736, + 769, 802, 835, 868, 880, 910, 942, 954, 984, 1016, + 1028, 1058, 1090, 1102, 1132, 1164, 1176, 1206, 1238, 1250, + 1280, 1312, 1324, 1354, 1386, 1398, 1428, 1460, 1472, 1648, + 1683, 1695, 1729, 1761, 1773, 1803, 1835, 1847, 533, 680, + 713, -69, 77, 99, 281, 491, 502, 29, -34, -34, + -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, + -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, + -34, -34, -34, -34, -34, -34, -34, 239, 299, -12, + 175, 222, 231, 143, 172, 318, 3, 34, 26, -51, + 194, 194, 194, 73, 26, 275, 164, 272, 220, 320, + 242, 275, -87, 287, 194, 194, 194, 341, 323, 194, + 194, 194, 194, 194, 194, 194, 275, 335, 194, 194, + 420, 194, 129, 129, 129, 129, 129, 183, -14, 129, + 129, 151, 151, 189, 151, 344, 151, 356, 151, 187, + 187, 151, 151, 151, 151, 187, 225, 187, 187, 187, + 270, 187, 366, 187, 151, 151, 151, 151, 313, 428, + 313, 313, 428, 313, 447, 445, 445, 445, 482, 468, + 471, 472, 469, 485, ); public static $yyExpectedTokens = array( array(), @@ -744,8 +776,9 @@ public static $yy_action = array( array(9, 10, 11, 12, 14, 16, 18, 19, 21, 24, 28, 29, 30, 32, 34, 37, 40, 41, 42, 43, 45, 47, 49, 50, 52, 57, 58, ), array(9, 10, 11, 12, 14, 16, 18, 19, 21, 24, 28, 29, 30, 32, 34, 37, 40, 41, 42, 43, 45, 47, 49, 50, 52, 57, 58, ), array(9, 10, 11, 12, 14, 16, 18, 19, 21, 24, 28, 29, 30, 32, 34, 37, 40, 41, 42, 43, 45, 47, 49, 50, 52, 57, 58, ), + array(2, 9, 10, 11, 12, 14, 16, 18, 19, 21, 24, 28, 29, 30, 32, 34, 37, 39, 40, 41, 42, 43, 45, 47, 49, 50, 52, 57, 58, ), array(9, 10, 11, 12, 14, 16, 18, 19, 21, 24, 28, 29, 30, 32, 34, 37, 40, 41, 42, 43, 45, 47, 49, 50, 51, 52, 57, 58, ), - array(2, 9, 10, 11, 12, 14, 16, 18, 19, 21, 24, 28, 29, 30, 32, 34, 37, 40, 41, 42, 43, 45, 47, 49, 50, 52, 57, 58, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 21, 24, 28, 29, 30, 32, 34, 37, 40, 41, 42, 43, 45, 47, 49, 50, 52, 57, 58, ), array(9, 10, 11, 12, 14, 16, 18, 19, 21, 24, 28, 29, 30, 32, 34, 37, 40, 41, 42, 43, 45, 47, 49, 50, 52, 57, 58, ), array(9, 10, 11, 12, 14, 16, 18, 19, 21, 24, 28, 29, 30, 32, 34, 37, 40, 41, 42, 43, 45, 47, 49, 50, 52, 57, 58, ), array(9, 10, 11, 12, 14, 16, 18, 19, 21, 24, 28, 29, 30, 32, 34, 37, 40, 41, 42, 43, 45, 47, 49, 50, 52, 57, 58, ), @@ -817,6 +850,7 @@ public static $yy_action = array( array(36, 37, 38, 39, 53, 54, 55, 56, ), array(36, 37, 38, 39, 53, 54, 55, 56, ), array(36, 37, 38, 39, 53, 54, 55, 56, ), + array(36, 37, 38, 39, 53, 54, 55, 56, ), array(9, 12, 16, 25, 27, 31, ), array(9, 12, 16, 25, 31, ), array(17, 43, 50, ), @@ -1061,46 +1095,48 @@ public static $yy_action = array( array(), array(), array(), + array(), ); public static $yy_default = array( - 339, 518, 518, 518, 503, 503, 518, 480, 480, 518, - 480, 518, 518, 518, 518, 518, 518, 518, 518, 518, - 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, - 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, - 518, 518, 518, 518, 518, 518, 518, 379, 358, 379, - 518, 518, 419, 518, 518, 379, 518, 518, 384, 518, - 518, 518, 352, 518, 518, 518, 518, 518, 363, 479, - 401, 406, 478, 504, 506, 505, 405, 407, 408, 386, - 390, 391, 381, 384, 352, 379, 379, 493, 435, 379, - 379, 518, 518, 370, 329, 434, 445, 518, 393, 393, - 393, 445, 445, 435, 379, 518, 379, 379, 373, 435, - 518, 518, 393, 393, 393, 360, 375, 393, 399, 410, - 411, 412, 400, 404, 435, 490, 410, 398, 337, 487, - 434, 434, 434, 434, 434, 518, 447, 445, 461, 349, - 359, 518, 362, 518, 367, 518, 368, 442, 443, 353, - 355, 356, 357, 471, 445, 470, 473, 472, 438, 439, - 440, 441, 369, 365, 366, 361, 371, 481, 374, 376, - 482, 428, 445, 467, 494, 491, 337, 486, 486, 486, - 445, 445, 419, 415, 419, 409, 409, 446, 419, 419, - 409, 409, 335, 518, 518, 518, 409, 419, 429, 518, - 518, 518, 518, 415, 518, 518, 415, 518, 518, 518, - 518, 518, 518, 518, 518, 518, 518, 415, 417, 518, - 492, 518, 461, 518, 518, 518, 518, 518, 424, 518, - 518, 518, 387, 330, 331, 332, 333, 334, 336, 338, - 340, 341, 342, 343, 344, 345, 346, 348, 377, 378, - 463, 464, 465, 485, 372, 483, 484, 413, 422, 423, - 432, 433, 444, 448, 449, 450, 394, 395, 396, 397, - 414, 416, 418, 420, 424, 425, 426, 402, 403, 427, - 430, 431, 458, 456, 495, 496, 497, 498, 436, 437, - 469, 462, 477, 347, 468, 514, 515, 507, 508, 509, - 512, 511, 513, 516, 517, 510, 500, 502, 501, 499, - 474, 459, 457, 455, 452, 453, 454, 460, 475, 476, - 421, 451, 489, 466, 461, 380, 364, 388, 392, + 342, 523, 523, 523, 508, 508, 523, 485, 485, 523, + 485, 523, 523, 523, 523, 523, 523, 523, 523, 523, + 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, + 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, + 523, 523, 523, 523, 523, 523, 523, 523, 382, 361, + 382, 523, 523, 424, 523, 523, 382, 523, 523, 387, + 523, 523, 523, 355, 523, 523, 523, 523, 523, 366, + 484, 405, 411, 483, 509, 511, 510, 410, 412, 409, + 413, 389, 393, 394, 384, 387, 355, 382, 382, 498, + 440, 382, 382, 523, 523, 373, 332, 439, 450, 523, + 396, 396, 396, 450, 450, 440, 382, 523, 382, 382, + 376, 440, 523, 523, 396, 396, 396, 363, 378, 396, + 403, 415, 416, 417, 404, 408, 440, 495, 415, 402, + 340, 492, 439, 439, 439, 439, 439, 523, 452, 450, + 466, 352, 362, 523, 365, 523, 370, 523, 371, 447, + 448, 356, 358, 359, 360, 476, 450, 475, 478, 477, + 443, 444, 445, 446, 372, 368, 369, 364, 374, 486, + 377, 379, 487, 433, 450, 472, 499, 496, 340, 491, + 491, 491, 450, 450, 424, 420, 424, 414, 414, 451, + 424, 424, 414, 414, 338, 523, 523, 523, 414, 424, + 434, 523, 523, 523, 523, 420, 523, 523, 420, 523, + 523, 523, 523, 523, 523, 523, 523, 523, 523, 420, + 422, 523, 497, 523, 466, 523, 523, 523, 523, 523, + 429, 523, 523, 523, 390, 333, 334, 335, 336, 337, + 339, 341, 343, 344, 345, 346, 347, 348, 349, 351, + 380, 381, 468, 469, 470, 490, 375, 488, 489, 418, + 427, 428, 437, 438, 449, 453, 454, 455, 397, 398, + 399, 400, 401, 419, 421, 423, 425, 429, 430, 431, + 406, 407, 432, 435, 436, 463, 461, 500, 501, 502, + 503, 441, 442, 474, 467, 482, 350, 473, 519, 520, + 512, 513, 514, 517, 516, 518, 521, 522, 515, 505, + 507, 506, 504, 479, 464, 462, 460, 457, 458, 459, + 465, 480, 481, 426, 456, 494, 471, 466, 383, 367, + 391, 395, ); - const YYNOCODE = 108; + const YYNOCODE = 109; const YYSTACKDEPTH = 500; - const YYNSTATE = 329; - const YYNRULE = 189; + const YYNSTATE = 332; + const YYNRULE = 191; const YYERRORSYMBOL = 60; const YYERRSYMDT = 'yy0'; const YYFALLBACK = 0; @@ -1150,13 +1186,13 @@ public static $yy_action = array( 'outattr', 'eqoutattr', 'varindexed', 'output', 'attributes', 'variable', 'value', 'expr', 'modifierlist', 'statement', 'statements', 'foraction', - 'varvar', 'modparameters', 'attribute', 'ternary', - 'tlop', 'lop', 'scond', 'array', - 'function', 'ns1', 'doublequoted_with_quotes', 'static_class_access', - 'arraydef', 'object', 'arrayindex', 'indexdef', - 'varvarele', 'objectchain', 'objectelement', 'method', - 'params', 'modifier', 'modparameter', 'arrayelements', - 'arrayelement', 'doublequoted', 'doublequotedcontent', + 'varvar', 'modparameters', 'attribute', 'nullcoalescing', + 'ternary', 'tlop', 'lop', 'scond', + 'array', 'function', 'ns1', 'doublequoted_with_quotes', + 'static_class_access', 'arraydef', 'object', 'arrayindex', + 'indexdef', 'varvarele', 'objectchain', 'objectelement', + 'method', 'params', 'modifier', 'modparameter', + 'arrayelements', 'arrayelement', 'doublequoted', 'doublequotedcontent', ); public static $yyRuleName = array( @@ -1225,6 +1261,7 @@ public static $yy_action = array( 'statement ::= varindexed EQUAL expr', 'statement ::= OPENP statement CLOSEP', 'expr ::= value', + 'expr ::= nullcoalescing', 'expr ::= ternary', 'expr ::= INCDEC DOLLARID', 'expr ::= DOLLARID INCDEC', @@ -1236,6 +1273,7 @@ public static $yy_action = array( 'expr ::= expr scond', 'expr ::= expr ISIN array', 'expr ::= expr ISIN value', + 'nullcoalescing ::= expr QMARK QMARK expr', 'ternary ::= expr QMARK DOLLARID COLON expr', 'ternary ::= expr QMARK value COLON expr', 'ternary ::= expr QMARK expr COLON expr', @@ -1730,6 +1768,7 @@ public static $yy_action = array( array( 0 => 77, 1 => 3 ), array( 0 => 75, 1 => 1 ), array( 0 => 75, 1 => 1 ), + array( 0 => 75, 1 => 1 ), array( 0 => 75, 1 => 2 ), array( 0 => 75, 1 => 2 ), array( 0 => 75, 1 => 3 ), @@ -1740,10 +1779,11 @@ public static $yy_action = array( array( 0 => 75, 1 => 2 ), array( 0 => 75, 1 => 3 ), array( 0 => 75, 1 => 3 ), - array( 0 => 83, 1 => 5 ), - array( 0 => 83, 1 => 5 ), - array( 0 => 83, 1 => 5 ), array( 0 => 83, 1 => 4 ), + array( 0 => 84, 1 => 5 ), + array( 0 => 84, 1 => 5 ), + array( 0 => 84, 1 => 5 ), + array( 0 => 84, 1 => 4 ), array( 0 => 74, 1 => 1 ), array( 0 => 74, 1 => 2 ), array( 0 => 74, 1 => 2 ), @@ -1767,8 +1807,8 @@ public static $yy_action = array( array( 0 => 74, 1 => 1 ), array( 0 => 74, 1 => 1 ), array( 0 => 74, 1 => 3 ), - array( 0 => 89, 1 => 1 ), - array( 0 => 89, 1 => 1 ), + array( 0 => 90, 1 => 1 ), + array( 0 => 90, 1 => 1 ), array( 0 => 73, 1 => 1 ), array( 0 => 73, 1 => 1 ), array( 0 => 73, 1 => 3 ), @@ -1779,80 +1819,80 @@ public static $yy_action = array( array( 0 => 73, 1 => 4 ), array( 0 => 70, 1 => 2 ), array( 0 => 70, 1 => 2 ), - array( 0 => 94, 1 => 2 ), - array( 0 => 94, 1 => 0 ), - array( 0 => 95, 1 => 2 ), - array( 0 => 95, 1 => 2 ), - array( 0 => 95, 1 => 4 ), - array( 0 => 95, 1 => 2 ), - array( 0 => 95, 1 => 2 ), - array( 0 => 95, 1 => 4 ), - array( 0 => 95, 1 => 3 ), - array( 0 => 95, 1 => 5 ), - array( 0 => 95, 1 => 3 ), - array( 0 => 95, 1 => 3 ), - array( 0 => 95, 1 => 3 ), - array( 0 => 95, 1 => 3 ), - array( 0 => 95, 1 => 3 ), - array( 0 => 95, 1 => 3 ), array( 0 => 95, 1 => 2 ), + array( 0 => 95, 1 => 0 ), + array( 0 => 96, 1 => 2 ), + array( 0 => 96, 1 => 2 ), + array( 0 => 96, 1 => 4 ), + array( 0 => 96, 1 => 2 ), + array( 0 => 96, 1 => 2 ), + array( 0 => 96, 1 => 4 ), + array( 0 => 96, 1 => 3 ), + array( 0 => 96, 1 => 5 ), + array( 0 => 96, 1 => 3 ), + array( 0 => 96, 1 => 3 ), + array( 0 => 96, 1 => 3 ), + array( 0 => 96, 1 => 3 ), + array( 0 => 96, 1 => 3 ), + array( 0 => 96, 1 => 3 ), + array( 0 => 96, 1 => 2 ), array( 0 => 80, 1 => 1 ), array( 0 => 80, 1 => 1 ), array( 0 => 80, 1 => 2 ), - array( 0 => 96, 1 => 1 ), - array( 0 => 96, 1 => 1 ), - array( 0 => 96, 1 => 3 ), - array( 0 => 93, 1 => 2 ), array( 0 => 97, 1 => 1 ), - array( 0 => 97, 1 => 2 ), - array( 0 => 98, 1 => 3 ), - array( 0 => 98, 1 => 3 ), - array( 0 => 98, 1 => 5 ), - array( 0 => 98, 1 => 6 ), + array( 0 => 97, 1 => 1 ), + array( 0 => 97, 1 => 3 ), + array( 0 => 94, 1 => 2 ), + array( 0 => 98, 1 => 1 ), array( 0 => 98, 1 => 2 ), - array( 0 => 88, 1 => 4 ), - array( 0 => 99, 1 => 4 ), - array( 0 => 99, 1 => 4 ), - array( 0 => 100, 1 => 3 ), - array( 0 => 100, 1 => 1 ), - array( 0 => 100, 1 => 0 ), + array( 0 => 99, 1 => 3 ), + array( 0 => 99, 1 => 3 ), + array( 0 => 99, 1 => 5 ), + array( 0 => 99, 1 => 6 ), + array( 0 => 99, 1 => 2 ), + array( 0 => 89, 1 => 4 ), + array( 0 => 100, 1 => 4 ), + array( 0 => 100, 1 => 4 ), + array( 0 => 101, 1 => 3 ), + array( 0 => 101, 1 => 1 ), + array( 0 => 101, 1 => 0 ), array( 0 => 76, 1 => 3 ), array( 0 => 76, 1 => 2 ), - array( 0 => 101, 1 => 3 ), - array( 0 => 101, 1 => 2 ), - array( 0 => 81, 1 => 2 ), - array( 0 => 81, 1 => 0 ), - array( 0 => 102, 1 => 2 ), array( 0 => 102, 1 => 3 ), array( 0 => 102, 1 => 2 ), - array( 0 => 91, 1 => 1 ), - array( 0 => 91, 1 => 2 ), - array( 0 => 91, 1 => 1 ), + array( 0 => 81, 1 => 2 ), + array( 0 => 81, 1 => 0 ), + array( 0 => 103, 1 => 2 ), + array( 0 => 103, 1 => 3 ), + array( 0 => 103, 1 => 2 ), + array( 0 => 92, 1 => 1 ), + array( 0 => 92, 1 => 2 ), + array( 0 => 92, 1 => 1 ), + array( 0 => 92, 1 => 2 ), + array( 0 => 92, 1 => 3 ), + array( 0 => 86, 1 => 1 ), + array( 0 => 86, 1 => 1 ), + array( 0 => 85, 1 => 1 ), + array( 0 => 87, 1 => 1 ), + array( 0 => 93, 1 => 3 ), + array( 0 => 93, 1 => 3 ), + array( 0 => 104, 1 => 1 ), + array( 0 => 104, 1 => 3 ), + array( 0 => 104, 1 => 0 ), + array( 0 => 105, 1 => 3 ), + array( 0 => 105, 1 => 3 ), + array( 0 => 105, 1 => 1 ), array( 0 => 91, 1 => 2 ), array( 0 => 91, 1 => 3 ), - array( 0 => 85, 1 => 1 ), - array( 0 => 85, 1 => 1 ), - array( 0 => 84, 1 => 1 ), - array( 0 => 86, 1 => 1 ), - array( 0 => 92, 1 => 3 ), - array( 0 => 92, 1 => 3 ), - array( 0 => 103, 1 => 1 ), - array( 0 => 103, 1 => 3 ), - array( 0 => 103, 1 => 0 ), - array( 0 => 104, 1 => 3 ), - array( 0 => 104, 1 => 3 ), - array( 0 => 104, 1 => 1 ), - array( 0 => 90, 1 => 2 ), - array( 0 => 90, 1 => 3 ), - array( 0 => 105, 1 => 2 ), - array( 0 => 105, 1 => 1 ), - array( 0 => 106, 1 => 3 ), - array( 0 => 106, 1 => 3 ), - array( 0 => 106, 1 => 1 ), - array( 0 => 106, 1 => 3 ), - array( 0 => 106, 1 => 3 ), - array( 0 => 106, 1 => 1 ), + array( 0 => 106, 1 => 2 ), array( 0 => 106, 1 => 1 ), + array( 0 => 107, 1 => 3 ), + array( 0 => 107, 1 => 3 ), + array( 0 => 107, 1 => 1 ), + array( 0 => 107, 1 => 3 ), + array( 0 => 107, 1 => 3 ), + array( 0 => 107, 1 => 1 ), + array( 0 => 107, 1 => 1 ), ); public static $yyReduceMap = array( @@ -1871,18 +1911,19 @@ public static $yy_action = array( 56 => 6, 64 => 6, 65 => 6, - 80 => 6, - 85 => 6, - 86 => 6, - 91 => 6, - 95 => 6, - 96 => 6, - 100 => 6, - 101 => 6, + 66 => 6, + 82 => 6, + 87 => 6, + 88 => 6, + 93 => 6, + 97 => 6, + 98 => 6, + 102 => 6, 103 => 6, - 108 => 6, - 172 => 6, - 177 => 6, + 105 => 6, + 110 => 6, + 174 => 6, + 179 => 6, 7 => 7, 8 => 8, 9 => 9, @@ -1922,87 +1963,86 @@ public static $yy_action = array( 48 => 48, 49 => 49, 58 => 49, - 150 => 49, - 154 => 49, - 158 => 49, + 152 => 49, + 156 => 49, 160 => 49, + 162 => 49, 50 => 50, - 151 => 50, - 157 => 50, + 153 => 50, + 159 => 50, 51 => 51, 52 => 52, 53 => 52, 54 => 54, - 135 => 54, + 137 => 54, 57 => 57, 59 => 59, 60 => 60, 61 => 60, 62 => 62, 63 => 63, - 66 => 66, 67 => 67, 68 => 68, 69 => 69, - 70 => 69, - 71 => 71, + 70 => 70, + 71 => 70, 72 => 72, 73 => 73, 74 => 74, 75 => 75, 76 => 76, 77 => 77, - 78 => 77, + 78 => 78, 79 => 79, + 80 => 79, 81 => 81, - 83 => 81, - 84 => 81, - 115 => 81, - 82 => 82, - 87 => 87, - 88 => 88, + 83 => 83, + 85 => 83, + 86 => 83, + 117 => 83, + 84 => 84, 89 => 89, 90 => 90, + 91 => 91, 92 => 92, - 93 => 93, - 94 => 93, - 97 => 97, - 98 => 98, + 94 => 94, + 95 => 95, + 96 => 95, 99 => 99, - 102 => 102, + 100 => 100, + 101 => 101, 104 => 104, - 105 => 105, 106 => 106, 107 => 107, + 108 => 108, 109 => 109, - 110 => 110, 111 => 111, 112 => 112, 113 => 113, 114 => 114, + 115 => 115, 116 => 116, - 174 => 116, - 117 => 117, 118 => 118, + 176 => 118, 119 => 119, 120 => 120, 121 => 121, 122 => 122, - 130 => 122, 123 => 123, 124 => 124, + 132 => 124, 125 => 125, - 126 => 125, - 128 => 125, - 129 => 125, + 126 => 126, 127 => 127, - 131 => 131, - 132 => 132, + 128 => 127, + 130 => 127, + 131 => 127, + 129 => 129, 133 => 133, - 178 => 133, 134 => 134, + 135 => 135, + 180 => 135, 136 => 136, - 137 => 137, 138 => 138, 139 => 139, 140 => 140, @@ -2015,13 +2055,13 @@ public static $yy_action = array( 147 => 147, 148 => 148, 149 => 149, - 152 => 152, - 153 => 153, + 150 => 150, + 151 => 151, + 154 => 154, 155 => 155, - 156 => 156, - 159 => 159, + 157 => 157, + 158 => 158, 161 => 161, - 162 => 162, 163 => 163, 164 => 164, 165 => 165, @@ -2030,20 +2070,22 @@ public static $yy_action = array( 168 => 168, 169 => 169, 170 => 170, - 171 => 170, - 173 => 173, + 171 => 171, + 172 => 172, + 173 => 172, 175 => 175, - 176 => 176, - 179 => 179, - 180 => 180, + 177 => 177, + 178 => 178, 181 => 181, 182 => 182, - 185 => 182, 183 => 183, - 186 => 183, 184 => 184, - 187 => 187, - 188 => 188, + 187 => 184, + 185 => 185, + 188 => 185, + 186 => 186, + 189 => 189, + 190 => 190, ); // line 245 "src/Parser/TemplateParser.y" public function yy_r0(){ @@ -2339,76 +2381,80 @@ public static $yy_action = array( public function yy_r63(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; } -// line 626 "src/Parser/TemplateParser.y" - public function yy_r66(){ - $this->_retvalue = '$_smarty_tpl->getVariable(\''. substr($this->yystack[$this->yyidx + 0]->minor,1) .'\')->preIncDec(\'' . $this->yystack[$this->yyidx + -1]->minor . '\')'; - } // line 631 "src/Parser/TemplateParser.y" public function yy_r67(){ - $this->_retvalue = '$_smarty_tpl->getVariable(\''. substr($this->yystack[$this->yyidx + -1]->minor,1) .'\')->postIncDec(\'' . $this->yystack[$this->yyidx + 0]->minor . '\')'; + $this->_retvalue = '$_smarty_tpl->getVariable(\''. substr($this->yystack[$this->yyidx + 0]->minor,1) .'\')->preIncDec(\'' . $this->yystack[$this->yyidx + -1]->minor . '\')'; } // line 636 "src/Parser/TemplateParser.y" public function yy_r68(){ - $this->_retvalue = '$_smarty_tpl->getStreamVariable(\''.substr($this->yystack[$this->yyidx + -2]->minor,1).'://' . $this->yystack[$this->yyidx + 0]->minor . '\')'; + $this->_retvalue = '$_smarty_tpl->getVariable(\''. substr($this->yystack[$this->yyidx + -1]->minor,1) .'\')->postIncDec(\'' . $this->yystack[$this->yyidx + 0]->minor . '\')'; } // line 641 "src/Parser/TemplateParser.y" public function yy_r69(){ + $this->_retvalue = '$_smarty_tpl->getStreamVariable(\''.substr($this->yystack[$this->yyidx + -2]->minor,1).'://' . $this->yystack[$this->yyidx + 0]->minor . '\')'; + } +// line 646 "src/Parser/TemplateParser.y" + public function yy_r70(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor . trim($this->yystack[$this->yyidx + -1]->minor) . $this->yystack[$this->yyidx + 0]->minor; } -// line 651 "src/Parser/TemplateParser.y" - public function yy_r71(){ +// line 656 "src/Parser/TemplateParser.y" + public function yy_r72(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor['pre']. $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor['op'].$this->yystack[$this->yyidx + 0]->minor .')'; } -// line 655 "src/Parser/TemplateParser.y" - public function yy_r72(){ +// line 660 "src/Parser/TemplateParser.y" + public function yy_r73(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } -// line 659 "src/Parser/TemplateParser.y" - public function yy_r73(){ +// line 664 "src/Parser/TemplateParser.y" + public function yy_r74(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor . $this->yystack[$this->yyidx + -1]->minor . ')'; } -// line 663 "src/Parser/TemplateParser.y" - public function yy_r74(){ +// line 668 "src/Parser/TemplateParser.y" + public function yy_r75(){ $this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor.')'; } -// line 667 "src/Parser/TemplateParser.y" - public function yy_r75(){ +// line 672 "src/Parser/TemplateParser.y" + public function yy_r76(){ $this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.',(array)'.$this->yystack[$this->yyidx + 0]->minor.')'; } -// line 675 "src/Parser/TemplateParser.y" - public function yy_r76(){ - $this->_retvalue = $this->yystack[$this->yyidx + -4]->minor.' ? '. $this->compiler->compileVariable('\''.substr($this->yystack[$this->yyidx + -2]->minor,1).'\'') . ' : '.$this->yystack[$this->yyidx + 0]->minor; - } -// line 679 "src/Parser/TemplateParser.y" +// line 677 "src/Parser/TemplateParser.y" public function yy_r77(){ - $this->_retvalue = $this->yystack[$this->yyidx + -4]->minor.' ? '.$this->yystack[$this->yyidx + -2]->minor.' : '.$this->yystack[$this->yyidx + 0]->minor; + $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor.' ?? '.$this->yystack[$this->yyidx + 0]->minor; + } +// line 684 "src/Parser/TemplateParser.y" + public function yy_r78(){ + $this->_retvalue = $this->yystack[$this->yyidx + -4]->minor.' ? '. $this->compiler->compileVariable('\''.substr($this->yystack[$this->yyidx + -2]->minor,1).'\'') . ' : '.$this->yystack[$this->yyidx + 0]->minor; } // line 688 "src/Parser/TemplateParser.y" public function yy_r79(){ + $this->_retvalue = $this->yystack[$this->yyidx + -4]->minor.' ? '.$this->yystack[$this->yyidx + -2]->minor.' : '.$this->yystack[$this->yyidx + 0]->minor; + } +// line 697 "src/Parser/TemplateParser.y" + public function yy_r81(){ $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor.' ?: '.$this->yystack[$this->yyidx + 0]->minor; } -// line 698 "src/Parser/TemplateParser.y" - public function yy_r81(){ +// line 707 "src/Parser/TemplateParser.y" + public function yy_r83(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } -// line 703 "src/Parser/TemplateParser.y" - public function yy_r82(){ +// line 712 "src/Parser/TemplateParser.y" + public function yy_r84(){ $this->_retvalue = '!'.$this->yystack[$this->yyidx + 0]->minor; } -// line 724 "src/Parser/TemplateParser.y" - public function yy_r87(){ - $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor; - } -// line 728 "src/Parser/TemplateParser.y" - public function yy_r88(){ - $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'; - } -// line 732 "src/Parser/TemplateParser.y" +// line 733 "src/Parser/TemplateParser.y" public function yy_r89(){ - $this->_retvalue = '.'.$this->yystack[$this->yyidx + 0]->minor; + $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor; } // line 737 "src/Parser/TemplateParser.y" public function yy_r90(){ + $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'; + } +// line 741 "src/Parser/TemplateParser.y" + public function yy_r91(){ + $this->_retvalue = '.'.$this->yystack[$this->yyidx + 0]->minor; + } +// line 746 "src/Parser/TemplateParser.y" + public function yy_r92(){ if (defined($this->yystack[$this->yyidx + 0]->minor)) { if ($this->security) { $this->security->isTrustedConstant($this->yystack[$this->yyidx + 0]->minor, $this->compiler); @@ -2418,16 +2464,16 @@ public static $yy_action = array( $this->_retvalue = '\''.$this->yystack[$this->yyidx + 0]->minor.'\''; } } -// line 754 "src/Parser/TemplateParser.y" - public function yy_r92(){ +// line 763 "src/Parser/TemplateParser.y" + public function yy_r94(){ $this->_retvalue = '('. $this->yystack[$this->yyidx + -1]->minor .')'; } -// line 758 "src/Parser/TemplateParser.y" - public function yy_r93(){ +// line 767 "src/Parser/TemplateParser.y" + public function yy_r95(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } -// line 776 "src/Parser/TemplateParser.y" - public function yy_r97(){ +// line 785 "src/Parser/TemplateParser.y" + public function yy_r99(){ if ($this->security && $this->security->static_classes !== array()) { $this->compiler->trigger_template_error('dynamic static class not allowed by security setting'); } @@ -2439,19 +2485,19 @@ public static $yy_action = array( } $this->_retvalue = $prefixVar .'::'.$this->yystack[$this->yyidx + 0]->minor[0].$this->yystack[$this->yyidx + 0]->minor[1]; } -// line 790 "src/Parser/TemplateParser.y" - public function yy_r98(){ +// line 799 "src/Parser/TemplateParser.y" + public function yy_r100(){ $prefixVar = $this->compiler->getNewPrefixVariable(); $tmp = $this->compiler->appendCode('', $this->yystack[$this->yyidx + 0]->minor); $this->compiler->appendPrefixCode($this->compiler->appendCode($tmp, "")); $this->_retvalue = $prefixVar; } -// line 797 "src/Parser/TemplateParser.y" - public function yy_r99(){ +// line 806 "src/Parser/TemplateParser.y" + public function yy_r101(){ $this->_retvalue = $this->compiler->compileModifier($this->yystack[$this->yyidx + 0]->minor, $this->yystack[$this->yyidx + -1]->minor); } -// line 810 "src/Parser/TemplateParser.y" - public function yy_r102(){ +// line 819 "src/Parser/TemplateParser.y" + public function yy_r104(){ if (!in_array(strtolower($this->yystack[$this->yyidx + -2]->minor), array('self', 'parent')) && (!$this->security || $this->security->isTrustedStaticClassAccess($this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + 0]->minor, $this->compiler))) { if (isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor])) { $this->_retvalue = $this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor].'::'.$this->yystack[$this->yyidx + 0]->minor[0].$this->yystack[$this->yyidx + 0]->minor[1]; @@ -2462,16 +2508,16 @@ public static $yy_action = array( $this->compiler->trigger_template_error ('static class \''.$this->yystack[$this->yyidx + -2]->minor.'\' is undefined or not allowed by security setting'); } } -// line 829 "src/Parser/TemplateParser.y" - public function yy_r104(){ +// line 838 "src/Parser/TemplateParser.y" + public function yy_r106(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } -// line 840 "src/Parser/TemplateParser.y" - public function yy_r105(){ +// line 849 "src/Parser/TemplateParser.y" + public function yy_r107(){ $this->_retvalue = $this->compiler->compileVariable('\''.substr($this->yystack[$this->yyidx + 0]->minor,1).'\''); } -// line 843 "src/Parser/TemplateParser.y" - public function yy_r106(){ +// line 852 "src/Parser/TemplateParser.y" + public function yy_r108(){ if ($this->yystack[$this->yyidx + 0]->minor['var'] === '\'smarty\'') { $smarty_var = (new \Smarty\Compile\SpecialVariableCompiler())->compile(array(),$this->compiler,$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']); $this->_retvalue = $smarty_var; @@ -2482,164 +2528,164 @@ public static $yy_action = array( $this->_retvalue = $this->compiler->compileVariable($this->yystack[$this->yyidx + 0]->minor['var']).$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']; } } -// line 856 "src/Parser/TemplateParser.y" - public function yy_r107(){ +// line 865 "src/Parser/TemplateParser.y" + public function yy_r109(){ $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -2]->minor .')->'.$this->yystack[$this->yyidx + 0]->minor; } -// line 866 "src/Parser/TemplateParser.y" - public function yy_r109(){ +// line 875 "src/Parser/TemplateParser.y" + public function yy_r111(){ $this->_retvalue = $this->compiler->compileConfigVariable('\'' . $this->yystack[$this->yyidx + -1]->minor . '\''); } -// line 870 "src/Parser/TemplateParser.y" - public function yy_r110(){ +// line 879 "src/Parser/TemplateParser.y" + public function yy_r112(){ $this->_retvalue = '(is_array($tmp = ' . $this->compiler->compileConfigVariable('\'' . $this->yystack[$this->yyidx + -2]->minor . '\'') . ') ? $tmp'.$this->yystack[$this->yyidx + 0]->minor.' :null)'; } -// line 874 "src/Parser/TemplateParser.y" - public function yy_r111(){ +// line 883 "src/Parser/TemplateParser.y" + public function yy_r113(){ $this->_retvalue = $this->compiler->compileConfigVariable($this->yystack[$this->yyidx + -1]->minor); } -// line 878 "src/Parser/TemplateParser.y" - public function yy_r112(){ +// line 887 "src/Parser/TemplateParser.y" + public function yy_r114(){ $this->_retvalue = '(is_array($tmp = ' . $this->compiler->compileConfigVariable($this->yystack[$this->yyidx + -2]->minor) . ') ? $tmp'.$this->yystack[$this->yyidx + 0]->minor.' : null)'; } -// line 882 "src/Parser/TemplateParser.y" - public function yy_r113(){ +// line 891 "src/Parser/TemplateParser.y" + public function yy_r115(){ $this->_retvalue = array('var'=>'\''.substr($this->yystack[$this->yyidx + -1]->minor,1).'\'', 'smarty_internal_index'=>$this->yystack[$this->yyidx + 0]->minor); } -// line 885 "src/Parser/TemplateParser.y" - public function yy_r114(){ - $this->_retvalue = array('var'=>$this->yystack[$this->yyidx + -1]->minor, 'smarty_internal_index'=>$this->yystack[$this->yyidx + 0]->minor); - } -// line 898 "src/Parser/TemplateParser.y" +// line 894 "src/Parser/TemplateParser.y" public function yy_r116(){ - return; - } -// line 904 "src/Parser/TemplateParser.y" - public function yy_r117(){ - $this->_retvalue = '['.$this->compiler->compileVariable('\''.substr($this->yystack[$this->yyidx + 0]->minor,1).'\'').']'; + $this->_retvalue = array('var'=>$this->yystack[$this->yyidx + -1]->minor, 'smarty_internal_index'=>$this->yystack[$this->yyidx + 0]->minor); } // line 907 "src/Parser/TemplateParser.y" public function yy_r118(){ + return; + } +// line 913 "src/Parser/TemplateParser.y" + public function yy_r119(){ + $this->_retvalue = '['.$this->compiler->compileVariable('\''.substr($this->yystack[$this->yyidx + 0]->minor,1).'\'').']'; + } +// line 916 "src/Parser/TemplateParser.y" + public function yy_r120(){ $this->_retvalue = '['.$this->compiler->compileVariable($this->yystack[$this->yyidx + 0]->minor).']'; } -// line 911 "src/Parser/TemplateParser.y" - public function yy_r119(){ - $this->_retvalue = '['.$this->compiler->compileVariable($this->yystack[$this->yyidx + -2]->minor).'->'.$this->yystack[$this->yyidx + 0]->minor.']'; - } -// line 915 "src/Parser/TemplateParser.y" - public function yy_r120(){ - $this->_retvalue = '[\''. $this->yystack[$this->yyidx + 0]->minor .'\']'; - } -// line 919 "src/Parser/TemplateParser.y" +// line 920 "src/Parser/TemplateParser.y" public function yy_r121(){ - $this->_retvalue = '['. $this->yystack[$this->yyidx + 0]->minor .']'; + $this->_retvalue = '['.$this->compiler->compileVariable($this->yystack[$this->yyidx + -2]->minor).'->'.$this->yystack[$this->yyidx + 0]->minor.']'; } // line 924 "src/Parser/TemplateParser.y" public function yy_r122(){ - $this->_retvalue = '['. $this->yystack[$this->yyidx + -1]->minor .']'; + $this->_retvalue = '[\''. $this->yystack[$this->yyidx + 0]->minor .'\']'; } -// line 929 "src/Parser/TemplateParser.y" +// line 928 "src/Parser/TemplateParser.y" public function yy_r123(){ - $this->_retvalue = '['.(new \Smarty\Compile\SpecialVariableCompiler())->compile(array(),$this->compiler,'[\'section\'][\''.$this->yystack[$this->yyidx + -1]->minor.'\'][\'index\']').']'; + $this->_retvalue = '['. $this->yystack[$this->yyidx + 0]->minor .']'; } // line 933 "src/Parser/TemplateParser.y" public function yy_r124(){ - $this->_retvalue = '['.(new \Smarty\Compile\SpecialVariableCompiler())->compile(array(),$this->compiler,'[\'section\'][\''.$this->yystack[$this->yyidx + -3]->minor.'\'][\''.$this->yystack[$this->yyidx + -1]->minor.'\']').']'; + $this->_retvalue = '['. $this->yystack[$this->yyidx + -1]->minor .']'; } -// line 936 "src/Parser/TemplateParser.y" +// line 938 "src/Parser/TemplateParser.y" public function yy_r125(){ - $this->_retvalue = '['.$this->yystack[$this->yyidx + -1]->minor.']'; + $this->_retvalue = '['.(new \Smarty\Compile\SpecialVariableCompiler())->compile(array(),$this->compiler,'[\'section\'][\''.$this->yystack[$this->yyidx + -1]->minor.'\'][\'index\']').']'; } // line 942 "src/Parser/TemplateParser.y" + public function yy_r126(){ + $this->_retvalue = '['.(new \Smarty\Compile\SpecialVariableCompiler())->compile(array(),$this->compiler,'[\'section\'][\''.$this->yystack[$this->yyidx + -3]->minor.'\'][\''.$this->yystack[$this->yyidx + -1]->minor.'\']').']'; + } +// line 945 "src/Parser/TemplateParser.y" public function yy_r127(){ + $this->_retvalue = '['.$this->yystack[$this->yyidx + -1]->minor.']'; + } +// line 951 "src/Parser/TemplateParser.y" + public function yy_r129(){ $this->_retvalue = '['.$this->compiler->compileVariable('\''.substr($this->yystack[$this->yyidx + -1]->minor,1).'\'').']'; } -// line 958 "src/Parser/TemplateParser.y" - public function yy_r131(){ - $this->_retvalue = '[]'; - } -// line 968 "src/Parser/TemplateParser.y" - public function yy_r132(){ - $this->_retvalue = '\''.substr($this->yystack[$this->yyidx + 0]->minor,1).'\''; - } -// line 972 "src/Parser/TemplateParser.y" +// line 967 "src/Parser/TemplateParser.y" public function yy_r133(){ - $this->_retvalue = '\'\''; + $this->_retvalue = '[]'; } // line 977 "src/Parser/TemplateParser.y" public function yy_r134(){ + $this->_retvalue = '\''.substr($this->yystack[$this->yyidx + 0]->minor,1).'\''; + } +// line 981 "src/Parser/TemplateParser.y" + public function yy_r135(){ + $this->_retvalue = '\'\''; + } +// line 986 "src/Parser/TemplateParser.y" + public function yy_r136(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor; } -// line 985 "src/Parser/TemplateParser.y" - public function yy_r136(){ +// line 994 "src/Parser/TemplateParser.y" + public function yy_r138(){ $var = trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->compiler->getLdelLength(), -$this->compiler->getRdelLength()), ' $'); $this->_retvalue = $this->compiler->compileVariable('\''.$var.'\''); } -// line 991 "src/Parser/TemplateParser.y" - public function yy_r137(){ +// line 1000 "src/Parser/TemplateParser.y" + public function yy_r139(){ $this->_retvalue = '('.$this->yystack[$this->yyidx + -1]->minor.')'; } -// line 998 "src/Parser/TemplateParser.y" - public function yy_r138(){ +// line 1007 "src/Parser/TemplateParser.y" + public function yy_r140(){ if ($this->yystack[$this->yyidx + -1]->minor['var'] === '\'smarty\'') { $this->_retvalue = (new \Smarty\Compile\SpecialVariableCompiler())->compile(array(),$this->compiler,$this->yystack[$this->yyidx + -1]->minor['smarty_internal_index']).$this->yystack[$this->yyidx + 0]->minor; } else { $this->_retvalue = $this->compiler->compileVariable($this->yystack[$this->yyidx + -1]->minor['var']).$this->yystack[$this->yyidx + -1]->minor['smarty_internal_index'].$this->yystack[$this->yyidx + 0]->minor; } } -// line 1007 "src/Parser/TemplateParser.y" - public function yy_r139(){ +// line 1016 "src/Parser/TemplateParser.y" + public function yy_r141(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } -// line 1012 "src/Parser/TemplateParser.y" - public function yy_r140(){ +// line 1021 "src/Parser/TemplateParser.y" + public function yy_r142(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } -// line 1017 "src/Parser/TemplateParser.y" - public function yy_r141(){ +// line 1026 "src/Parser/TemplateParser.y" + public function yy_r143(){ if ($this->security && substr($this->yystack[$this->yyidx + -1]->minor,0,1) === '_') { $this->compiler->trigger_template_error (self::ERR1); } $this->_retvalue = '->'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } -// line 1024 "src/Parser/TemplateParser.y" - public function yy_r142(){ +// line 1033 "src/Parser/TemplateParser.y" + public function yy_r144(){ if ($this->security) { $this->compiler->trigger_template_error (self::ERR2); } $this->_retvalue = '->{'.$this->compiler->compileVariable($this->yystack[$this->yyidx + -1]->minor).$this->yystack[$this->yyidx + 0]->minor.'}'; } -// line 1031 "src/Parser/TemplateParser.y" - public function yy_r143(){ +// line 1040 "src/Parser/TemplateParser.y" + public function yy_r145(){ if ($this->security) { $this->compiler->trigger_template_error (self::ERR2); } $this->_retvalue = '->{'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}'; } -// line 1038 "src/Parser/TemplateParser.y" - public function yy_r144(){ +// line 1047 "src/Parser/TemplateParser.y" + public function yy_r146(){ if ($this->security) { $this->compiler->trigger_template_error (self::ERR2); } $this->_retvalue = '->{\''.$this->yystack[$this->yyidx + -4]->minor.'\'.'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}'; } -// line 1046 "src/Parser/TemplateParser.y" - public function yy_r145(){ +// line 1055 "src/Parser/TemplateParser.y" + public function yy_r147(){ $this->_retvalue = '->'.$this->yystack[$this->yyidx + 0]->minor; } -// line 1054 "src/Parser/TemplateParser.y" - public function yy_r146(){ +// line 1063 "src/Parser/TemplateParser.y" + public function yy_r148(){ $this->_retvalue = $this->compiler->compileFunctionCall($this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + -1]->minor); } -// line 1062 "src/Parser/TemplateParser.y" - public function yy_r147(){ +// line 1071 "src/Parser/TemplateParser.y" + public function yy_r149(){ if ($this->security && substr($this->yystack[$this->yyidx + -3]->minor,0,1) === '_') { $this->compiler->trigger_template_error (self::ERR1); } $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . '('. implode(',',$this->yystack[$this->yyidx + -1]->minor) .')'; } -// line 1069 "src/Parser/TemplateParser.y" - public function yy_r148(){ +// line 1078 "src/Parser/TemplateParser.y" + public function yy_r150(){ if ($this->security) { $this->compiler->trigger_template_error (self::ERR2); } @@ -2647,56 +2693,56 @@ public static $yy_action = array( $this->compiler->appendPrefixCode("compiler->compileVariable('\''.substr($this->yystack[$this->yyidx + -3]->minor,1).'\'').';?>'); $this->_retvalue = $prefixVar .'('. implode(',',$this->yystack[$this->yyidx + -1]->minor) .')'; } -// line 1080 "src/Parser/TemplateParser.y" - public function yy_r149(){ +// line 1089 "src/Parser/TemplateParser.y" + public function yy_r151(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -2]->minor,array($this->yystack[$this->yyidx + 0]->minor)); } -// line 1097 "src/Parser/TemplateParser.y" - public function yy_r152(){ +// line 1106 "src/Parser/TemplateParser.y" + public function yy_r154(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -2]->minor,array(array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor))); } -// line 1101 "src/Parser/TemplateParser.y" - public function yy_r153(){ +// line 1110 "src/Parser/TemplateParser.y" + public function yy_r155(){ $this->_retvalue = array(array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor)); } -// line 1109 "src/Parser/TemplateParser.y" - public function yy_r155(){ +// line 1118 "src/Parser/TemplateParser.y" + public function yy_r157(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); } -// line 1117 "src/Parser/TemplateParser.y" - public function yy_r156(){ +// line 1126 "src/Parser/TemplateParser.y" + public function yy_r158(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor); } -// line 1130 "src/Parser/TemplateParser.y" - public function yy_r159(){ - $this->_retvalue = array(trim($this->yystack[$this->yyidx + -1]->minor).$this->yystack[$this->yyidx + 0]->minor); - } // line 1139 "src/Parser/TemplateParser.y" public function yy_r161(){ + $this->_retvalue = array(trim($this->yystack[$this->yyidx + -1]->minor).$this->yystack[$this->yyidx + 0]->minor); + } +// line 1148 "src/Parser/TemplateParser.y" + public function yy_r163(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor, '', 'method'); } -// line 1144 "src/Parser/TemplateParser.y" - public function yy_r162(){ +// line 1153 "src/Parser/TemplateParser.y" + public function yy_r164(){ $this->_retvalue = array($this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + 0]->minor, 'method'); } -// line 1149 "src/Parser/TemplateParser.y" - public function yy_r163(){ +// line 1158 "src/Parser/TemplateParser.y" + public function yy_r165(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor, ''); } -// line 1154 "src/Parser/TemplateParser.y" - public function yy_r164(){ +// line 1163 "src/Parser/TemplateParser.y" + public function yy_r166(){ $this->_retvalue = array($this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + 0]->minor, 'property'); } -// line 1159 "src/Parser/TemplateParser.y" - public function yy_r165(){ +// line 1168 "src/Parser/TemplateParser.y" + public function yy_r167(){ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor, 'property'); } -// line 1165 "src/Parser/TemplateParser.y" - public function yy_r166(){ +// line 1174 "src/Parser/TemplateParser.y" + public function yy_r168(){ $this->_retvalue = ' '. trim($this->yystack[$this->yyidx + 0]->minor) . ' '; } -// line 1169 "src/Parser/TemplateParser.y" - public function yy_r167(){ +// line 1178 "src/Parser/TemplateParser.y" + public function yy_r169(){ static $lops = array( 'eq' => ' == ', 'ne' => ' != ', @@ -2715,8 +2761,8 @@ public static $yy_action = array( $op = strtolower(preg_replace('/\s*/', '', $this->yystack[$this->yyidx + 0]->minor)); $this->_retvalue = $lops[$op]; } -// line 1188 "src/Parser/TemplateParser.y" - public function yy_r168(){ +// line 1197 "src/Parser/TemplateParser.y" + public function yy_r170(){ static $tlops = array( 'isdivby' => array('op' => ' % ', 'pre' => '!('), 'isnotdivby' => array('op' => ' % ', 'pre' => '('), @@ -2728,8 +2774,8 @@ public static $yy_action = array( $op = strtolower(preg_replace('/\s*/', '', $this->yystack[$this->yyidx + 0]->minor)); $this->_retvalue = $tlops[$op]; } -// line 1201 "src/Parser/TemplateParser.y" - public function yy_r169(){ +// line 1210 "src/Parser/TemplateParser.y" + public function yy_r171(){ static $scond = array ( 'iseven' => '!(1 & ', 'isnoteven' => '(1 & ', @@ -2739,54 +2785,54 @@ public static $yy_action = array( $op = strtolower(str_replace(' ', '', $this->yystack[$this->yyidx + 0]->minor)); $this->_retvalue = $scond[$op]; } -// line 1215 "src/Parser/TemplateParser.y" - public function yy_r170(){ +// line 1224 "src/Parser/TemplateParser.y" + public function yy_r172(){ $this->_retvalue = 'array('.$this->yystack[$this->yyidx + -1]->minor.')'; } -// line 1226 "src/Parser/TemplateParser.y" - public function yy_r173(){ +// line 1235 "src/Parser/TemplateParser.y" + public function yy_r175(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor; } -// line 1234 "src/Parser/TemplateParser.y" - public function yy_r175(){ +// line 1243 "src/Parser/TemplateParser.y" + public function yy_r177(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'=>'.$this->yystack[$this->yyidx + 0]->minor; } -// line 1238 "src/Parser/TemplateParser.y" - public function yy_r176(){ +// line 1247 "src/Parser/TemplateParser.y" + public function yy_r178(){ $this->_retvalue = '\''.$this->yystack[$this->yyidx + -2]->minor.'\'=>'.$this->yystack[$this->yyidx + 0]->minor; } -// line 1254 "src/Parser/TemplateParser.y" - public function yy_r179(){ +// line 1263 "src/Parser/TemplateParser.y" + public function yy_r181(){ $this->compiler->leaveDoubleQuote(); $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor->to_smarty_php($this); } -// line 1260 "src/Parser/TemplateParser.y" - public function yy_r180(){ +// line 1269 "src/Parser/TemplateParser.y" + public function yy_r182(){ $this->yystack[$this->yyidx + -1]->minor->append_subtree($this, $this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; } -// line 1265 "src/Parser/TemplateParser.y" - public function yy_r181(){ +// line 1274 "src/Parser/TemplateParser.y" + public function yy_r183(){ $this->_retvalue = new Dq($this, $this->yystack[$this->yyidx + 0]->minor); } -// line 1269 "src/Parser/TemplateParser.y" - public function yy_r182(){ +// line 1278 "src/Parser/TemplateParser.y" + public function yy_r184(){ $this->_retvalue = new Code('(string)'.$this->yystack[$this->yyidx + -1]->minor); } -// line 1273 "src/Parser/TemplateParser.y" - public function yy_r183(){ +// line 1282 "src/Parser/TemplateParser.y" + public function yy_r185(){ $this->_retvalue = new Code('(string)('.$this->yystack[$this->yyidx + -1]->minor.')'); } -// line 1277 "src/Parser/TemplateParser.y" - public function yy_r184(){ +// line 1286 "src/Parser/TemplateParser.y" + public function yy_r186(){ $this->_retvalue = new Code('(string)$_smarty_tpl->getValue(\''. substr($this->yystack[$this->yyidx + 0]->minor,1) .'\')'); } -// line 1289 "src/Parser/TemplateParser.y" - public function yy_r187(){ +// line 1298 "src/Parser/TemplateParser.y" + public function yy_r189(){ $this->_retvalue = new Tag($this, $this->yystack[$this->yyidx + 0]->minor); } -// line 1293 "src/Parser/TemplateParser.y" - public function yy_r188(){ +// line 1302 "src/Parser/TemplateParser.y" + public function yy_r190(){ $this->_retvalue = new DqContent($this->yystack[$this->yyidx + 0]->minor); } diff --git a/src/Parser/TemplateParser.y b/src/Parser/TemplateParser.y index e69f6367..b081f4b1 100644 --- a/src/Parser/TemplateParser.y +++ b/src/Parser/TemplateParser.y @@ -617,6 +617,11 @@ expr(res) ::= value(v). { res = v; } + // nullcoalescing +expr(res) ::= nullcoalescing(v). { + res = v; +} + // ternary expr(res) ::= ternary(v). { res = v; @@ -668,6 +673,10 @@ expr(res) ::= expr(e1) ISIN value(v). { res = 'in_array('.e1.',(array)'.v.')'; } +// null coalescing +nullcoalescing(res) ::= expr(v) QMARK QMARK expr(e2). { + res = v.' ?? '.e2; +} // // ternary diff --git a/tests/UnitTests/TemplateSource/NullCoalescingTest.php b/tests/UnitTests/TemplateSource/NullCoalescingTest.php new file mode 100644 index 00000000..513547b8 --- /dev/null +++ b/tests/UnitTests/TemplateSource/NullCoalescingTest.php @@ -0,0 +1,34 @@ +setUpSmarty('/tmp'); + $this->cleanDirs(); + } + + public function testUndefined() { + $tpl = $this->smarty->createTemplate('string:{$myvar ?? "undefined"}'); + $this->assertEquals('undefined', $this->smarty->fetch($tpl)); + } + + /** + * @dataProvider dataForOther + */ + public function testOther($value, $expected) { + $tpl = $this->smarty->createTemplate('string:{$myvar ?? "undefined"}'); + $tpl->assign('myvar', $value); + $this->assertEquals($expected, $this->smarty->fetch($tpl)); + } + + public function dataForOther() { + return [ + [null, 'undefined'], + ['blah', ''], + ['', ''], + [false, false], + ]; + } + +}