From b90290f3285698126ef36027adfc7d1779a339ab Mon Sep 17 00:00:00 2001 From: ydah Date: Sun, 9 Jun 2024 14:18:32 +0900 Subject: [PATCH] Change %if directives to be available only at the end of rhs --- lib/lrama/parser.rb | 702 ++++++++++++++++++++++---------------------- parser.y | 13 +- 2 files changed, 364 insertions(+), 351 deletions(-) diff --git a/lib/lrama/parser.rb b/lib/lrama/parser.rb index 77ac9798..e4abed4b 100644 --- a/lib/lrama/parser.rb +++ b/lib/lrama/parser.rb @@ -654,7 +654,7 @@ def token_to_str(t) module Lrama class Parser < Racc::Parser -module_eval(<<'...end parser.y/module_eval...', 'parser.y', 553) +module_eval(<<'...end parser.y/module_eval...', 'parser.y', 554) include Lrama::Report::Duration @@ -728,53 +728,53 @@ def raise_parse_error(error_message, location) ##### State transition tables begin ### racc_action_table = [ - 98, 88, 99, 51, 165, 214, 51, 79, 226, 51, - 79, 214, 51, 79, 50, 51, 79, 214, 51, 79, - 50, 158, 79, 3, 159, 51, 164, 183, 51, 79, - 183, 51, 79, 166, 51, 79, 166, 8, 79, 89, - 51, 184, 50, 187, 184, 70, 159, 168, 47, 122, - 168, 100, 219, 220, 233, 219, 220, 234, 219, 220, - 47, 219, 220, 253, 219, 220, 234, 219, 220, 185, - 186, 41, 185, 186, 51, 169, 50, 48, 169, 82, + 98, 88, 99, 51, 165, 216, 51, 79, 229, 51, + 79, 216, 51, 79, 50, 51, 79, 216, 51, 79, + 50, 158, 79, 3, 159, 51, 164, 185, 51, 79, + 185, 51, 79, 166, 51, 79, 166, 8, 79, 89, + 51, 186, 50, 189, 186, 70, 159, 168, 47, 122, + 168, 100, 221, 222, 236, 221, 222, 237, 221, 222, + 47, 221, 222, 256, 221, 222, 237, 221, 222, 187, + 188, 41, 187, 188, 51, 169, 50, 48, 169, 82, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 47, -128, 6, 54, 7, - 93, 192, 193, 194, 51, 51, 50, 50, 79, 75, - 82, 256, 54, 54, 234, 23, 25, 26, 27, 28, + 34, 35, 36, 37, 38, 47, -130, 6, 54, 7, + 93, 194, 195, 196, 51, 51, 50, 50, 79, 75, + 82, 259, 54, 54, 237, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 9, 51, 57, 50, 14, 15, 16, 17, 18, 19, 58, 59, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 51, 51, 50, 50, 60, 82, 82, 192, 193, - 194, 61, 51, 96, 50, 62, 79, 202, 51, 51, - 50, 50, 79, 202, 51, 51, 50, 50, 79, 202, - 192, 193, 194, 63, 51, 96, 50, 64, 79, 202, - 51, 51, 50, 50, 79, 202, 51, 51, 50, 50, - 79, 202, 51, 51, 50, 50, 79, 79, 51, 51, + 39, 51, 51, 50, 50, 60, 82, 82, 194, 195, + 196, 61, 51, 96, 50, 62, 79, 204, 51, 51, + 50, 50, 79, 204, 51, 51, 50, 50, 79, 204, + 194, 195, 196, 63, 51, 96, 50, 64, 79, 204, + 51, 51, 50, 50, 79, 204, 51, 51, 50, 50, + 79, 204, 51, 51, 50, 50, 79, 79, 51, 51, 50, 50, 79, 79, 51, 51, 50, 50, 79, 79, 51, 51, 50, 50, 79, 51, 51, 50, 50, 51, - 51, 50, 50, 51, 65, 50, 192, 193, 194, 66, + 51, 50, 50, 51, 65, 50, 194, 195, 196, 66, 67, 90, 94, 96, 101, 101, 101, 103, 109, 112, 114, 117, 117, 117, 117, 120, 125, 126, 128, 130, 131, 132, 133, 134, 79, 141, 142, 143, 144, 145, 148, 149, 150, 152, 162, 141, 171, 173, 174, 175, - 176, 177, 178, 180, 181, 148, 189, 197, 198, 205, - 162, 209, 212, 213, 96, 222, 162, 229, 230, 162, - 232, 178, 181, 238, 239, 241, 243, 181, 96, 248, - 178, -126, 252, 178, 96, -128, 96, 178, -127 ] + 176, 177, 178, 180, 181, 148, 191, 199, 200, 207, + 162, 211, 214, 215, 96, 224, 162, 232, 233, 162, + 235, 178, 181, 241, 242, 244, 246, 181, 96, 251, + 178, -128, 255, 178, 96, -130, 96, 178, -129 ] racc_action_check = [ - 49, 39, 49, 189, 146, 189, 209, 189, 209, 232, - 209, 232, 234, 232, 234, 239, 234, 239, 241, 239, - 241, 140, 241, 1, 140, 161, 146, 161, 206, 161, - 206, 147, 206, 147, 188, 147, 188, 3, 188, 39, - 33, 161, 33, 163, 206, 33, 163, 147, 89, 89, - 188, 49, 189, 189, 215, 209, 209, 215, 232, 232, - 9, 234, 234, 244, 239, 239, 244, 241, 241, 161, - 161, 7, 206, 206, 35, 147, 35, 14, 188, 35, + 49, 39, 49, 191, 146, 191, 211, 191, 211, 235, + 211, 235, 237, 235, 237, 242, 237, 242, 244, 242, + 244, 140, 244, 1, 140, 161, 146, 161, 208, 161, + 208, 147, 208, 147, 190, 147, 190, 3, 190, 39, + 33, 161, 33, 163, 208, 33, 163, 147, 89, 89, + 190, 49, 191, 191, 217, 211, 211, 217, 235, 235, + 9, 237, 237, 247, 242, 242, 247, 244, 244, 161, + 161, 7, 208, 208, 35, 147, 35, 14, 190, 35, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 42, 227, 2, 16, 2, - 42, 227, 227, 227, 34, 36, 34, 36, 34, 34, - 36, 250, 17, 18, 250, 42, 42, 42, 42, 42, + 9, 9, 9, 9, 9, 42, 230, 2, 16, 2, + 42, 230, 230, 230, 34, 36, 34, 36, 34, 34, + 36, 253, 17, 18, 253, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 4, 15, 19, 15, 4, 4, 4, 4, 4, 4, 20, 23, 4, 4, 4, 4, 4, 4, 4, 4, @@ -782,20 +782,20 @@ def raise_parse_error(error_message, location) 4, 37, 38, 37, 38, 25, 37, 38, 167, 167, 167, 26, 175, 167, 175, 27, 175, 175, 176, 69, 176, 69, 176, 176, 177, 70, 177, 70, 177, 177, - 182, 182, 182, 28, 199, 182, 199, 29, 199, 199, - 203, 81, 203, 81, 203, 203, 204, 82, 204, 82, - 204, 204, 74, 75, 74, 75, 74, 75, 114, 116, + 184, 184, 184, 28, 201, 184, 201, 29, 201, 201, + 205, 81, 205, 81, 205, 205, 206, 82, 206, 82, + 206, 206, 74, 75, 74, 75, 74, 75, 114, 116, 114, 116, 114, 116, 138, 169, 138, 169, 138, 169, - 185, 109, 185, 109, 185, 111, 117, 111, 117, 119, - 135, 119, 135, 139, 30, 139, 217, 217, 217, 31, + 187, 109, 187, 109, 187, 111, 117, 111, 117, 119, + 135, 119, 135, 139, 30, 139, 219, 219, 219, 31, 32, 40, 45, 46, 53, 55, 56, 57, 68, 72, 73, 80, 85, 86, 87, 88, 95, 96, 102, 104, 105, 106, 107, 108, 113, 120, 121, 122, 123, 124, 125, 126, 127, 129, 142, 143, 151, 153, 154, 155, 156, 157, 158, 159, 160, 164, 166, 170, 172, 179, - 181, 183, 186, 187, 191, 195, 205, 210, 212, 213, - 214, 221, 224, 225, 226, 228, 230, 231, 233, 237, - 238, 240, 242, 245, 248, 251, 252, 255, 256 ] + 181, 185, 188, 189, 193, 197, 207, 212, 214, 215, + 216, 223, 226, 228, 229, 231, 233, 234, 236, 240, + 241, 243, 245, 248, 251, 254, 255, 258, 259 ] racc_action_pointer = [ nil, 23, 87, 37, 121, nil, nil, 64, nil, 56, @@ -816,106 +816,110 @@ def raise_parse_error(error_message, location) nil, 266, nil, 267, 268, 269, 270, 271, 284, 288, 249, 22, nil, 2, 249, nil, 256, 119, nil, 222, 277, nil, 278, nil, nil, 169, 175, 181, nil, 257, - nil, 254, 141, 261, nil, 227, 262, 261, 31, 0, - nil, 250, nil, nil, nil, 303, nil, nil, nil, 191, - nil, nil, nil, 197, 203, 260, 25, nil, nil, 3, - 305, nil, 303, 263, 270, 13, nil, 197, nil, nil, - nil, 303, nil, nil, 267, 272, 274, 52, 271, nil, - 275, 272, 6, 264, 9, nil, nil, 299, 312, 12, - 277, 15, 302, nil, 22, 315, nil, nil, 270, nil, - 70, 281, 272, nil, nil, 319, 284, nil, nil ] + nil, 254, nil, nil, 141, 261, nil, 227, 262, 261, + 31, 0, nil, 250, nil, nil, nil, 303, nil, nil, + nil, 191, nil, nil, nil, 197, 203, 260, 25, nil, + nil, 3, 305, nil, 303, 263, 270, 13, nil, 197, + nil, nil, nil, 303, nil, nil, 267, nil, 272, 274, + 52, 271, nil, 275, 272, 6, 264, 9, nil, nil, + 299, 312, 12, 277, 15, 302, nil, 22, 315, nil, + nil, 270, nil, 70, 281, 272, nil, nil, 319, 284, + nil, nil ] racc_action_default = [ - -2, -148, -8, -148, -148, -3, -4, -148, 259, -148, - -9, -10, -11, -12, -148, -148, -148, -148, -148, -148, - -148, -24, -25, -148, -29, -148, -148, -148, -148, -148, - -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, - -148, -7, -135, -100, -102, -148, -132, -134, -13, -139, - -98, -99, -138, -15, -89, -16, -17, -148, -21, -26, + -2, -150, -8, -150, -150, -3, -4, -150, 262, -150, + -9, -10, -11, -12, -150, -150, -150, -150, -150, -150, + -150, -24, -25, -150, -29, -150, -150, -150, -150, -150, + -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, + -150, -7, -137, -102, -104, -150, -134, -136, -13, -141, + -100, -101, -140, -15, -91, -16, -17, -150, -21, -26, -30, -33, -36, -39, -40, -41, -42, -43, -44, -50, - -148, -53, -55, -45, -79, -148, -82, -84, -85, -147, - -46, -92, -148, -95, -97, -47, -48, -49, -148, -148, - -5, -1, -101, -136, -103, -148, -148, -14, -140, -141, - -142, -86, -148, -18, -148, -148, -148, -148, -148, -148, - -54, -51, -56, -77, -148, -83, -80, -148, -96, -93, - -148, -148, -148, -148, -148, -108, -148, -148, -90, -148, - -22, -27, -31, -34, -37, -52, -57, -78, -81, -94, - -148, -63, -67, -148, -6, -137, -104, -105, -109, -133, - -87, -148, -19, -148, -148, -148, -148, -148, -58, -148, - -61, -65, -68, -148, -108, -107, -98, -132, -113, -148, - -148, -91, -148, -23, -28, -148, -148, -148, -59, -148, - -64, -67, -132, -98, -72, -148, -148, -148, -106, -148, - -110, -132, -117, -118, -119, -148, -116, -88, -20, -32, - -143, -145, -146, -35, -38, -67, -66, -69, -70, -148, - -148, -75, -148, -67, -98, -148, -124, -128, -129, -130, - -131, -58, -114, -144, -60, -148, -98, -120, -148, -73, - -148, -62, -148, -132, -148, -126, -111, -148, -58, -148, - -122, -148, -148, -76, -148, -58, -125, -128, -132, -71, - -148, -121, -132, -127, -112, -58, -123, -74, -115 ] + -150, -53, -55, -45, -81, -150, -84, -86, -87, -149, + -46, -94, -150, -97, -99, -47, -48, -49, -150, -150, + -5, -1, -103, -138, -105, -150, -150, -14, -142, -143, + -144, -88, -150, -18, -150, -150, -150, -150, -150, -150, + -54, -51, -56, -79, -150, -85, -82, -150, -98, -95, + -150, -150, -150, -150, -150, -110, -150, -150, -92, -150, + -22, -27, -31, -34, -37, -52, -57, -80, -83, -96, + -150, -63, -69, -150, -6, -139, -106, -107, -111, -135, + -89, -150, -19, -150, -150, -150, -150, -150, -58, -150, + -61, -65, -70, -150, -110, -109, -100, -134, -115, -150, + -150, -93, -150, -23, -28, -150, -150, -150, -59, -150, + -64, -69, -66, -67, -134, -100, -74, -150, -150, -150, + -108, -150, -112, -134, -119, -120, -121, -150, -118, -90, + -20, -32, -145, -147, -148, -35, -38, -69, -65, -71, + -72, -150, -150, -77, -150, -69, -100, -150, -126, -130, + -131, -132, -133, -58, -116, -146, -60, -68, -150, -100, + -122, -150, -75, -150, -62, -150, -134, -150, -128, -113, + -150, -58, -150, -124, -150, -150, -78, -150, -58, -127, + -130, -134, -73, -150, -123, -134, -129, -114, -58, -125, + -76, -117 ] racc_goto_table = [ - 76, 52, 95, 179, 74, 69, 160, 110, 147, 215, - 191, 119, 140, 118, 1, 43, 53, 55, 56, 72, - 246, 84, 84, 84, 84, 208, 223, 246, 2, 228, - 223, 223, 199, 203, 204, 163, 80, 85, 86, 87, - 115, 76, 111, 4, 42, 116, 139, 188, 92, 110, - 91, 118, 244, 5, 40, 72, 72, 123, 10, 250, - 235, 11, 12, 13, 49, 97, 236, 84, 84, 224, - 240, 118, 129, 110, 172, 104, 153, 231, 105, 154, - 76, 135, 115, 249, 138, 106, 155, 107, 156, 108, - 254, 157, 68, 73, 136, 72, 113, 72, 121, 206, - 258, 225, 210, 84, 115, 84, 242, 137, 127, 170, - 102, 151, 146, 167, 195, 237, 124, nil, nil, nil, - nil, 72, nil, 190, nil, 84, nil, 182, nil, nil, - nil, nil, nil, nil, nil, 196, nil, nil, 207, nil, - nil, nil, nil, nil, nil, nil, nil, 221, nil, nil, - nil, 211, nil, nil, 167, 217, nil, nil, nil, nil, + 76, 52, 95, 74, 160, 69, 179, 110, 118, 193, + 119, 183, 147, 217, 43, 140, 1, 2, 249, 72, + 4, 84, 84, 84, 84, 249, 210, 225, 53, 55, + 56, 225, 225, 231, 80, 85, 86, 87, 163, 42, + 115, 76, 111, 91, 116, 139, 118, 92, 5, 110, + 40, 190, 201, 205, 206, 72, 72, 247, 227, 123, + 10, 238, 11, 12, 253, 13, 118, 84, 84, 226, + 49, 239, 243, 110, 97, 129, 172, 234, 104, 153, + 76, 135, 115, 138, 105, 154, 106, 155, 107, 252, + 156, 108, 157, 68, 73, 72, 257, 72, 136, 113, + 121, 208, 228, 84, 115, 84, 261, 212, 245, 137, + 127, 170, 102, 167, 151, 146, 197, 240, 124, nil, + nil, 72, nil, 192, nil, 84, nil, 184, nil, nil, + nil, nil, nil, nil, nil, 198, nil, nil, nil, nil, + 209, nil, nil, nil, nil, nil, nil, nil, nil, 223, + nil, nil, nil, 213, nil, nil, 167, 219, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, 182, nil, nil, 227, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, 245, - nil, nil, nil, nil, nil, nil, nil, nil, 217, nil, - 247, nil, nil, nil, 255, 217, nil, 251, 257 ] + nil, nil, nil, nil, 184, nil, nil, 230, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 248, nil, nil, nil, nil, nil, nil, nil, + nil, 219, nil, 250, nil, nil, nil, 258, 219, nil, + 254, 260 ] racc_goto_check = [ - 43, 35, 44, 40, 50, 33, 39, 34, 60, 61, - 45, 55, 38, 56, 1, 57, 15, 15, 15, 35, - 64, 35, 35, 35, 35, 45, 67, 64, 2, 61, - 67, 67, 21, 21, 21, 38, 32, 32, 32, 32, - 43, 43, 33, 3, 4, 50, 55, 60, 57, 34, - 5, 56, 61, 6, 7, 35, 35, 8, 9, 61, - 45, 10, 11, 12, 13, 14, 40, 35, 35, 39, - 45, 56, 16, 34, 17, 18, 19, 39, 22, 23, - 43, 33, 43, 40, 50, 24, 25, 26, 27, 28, - 40, 29, 30, 31, 36, 35, 37, 35, 41, 42, - 40, 46, 47, 35, 43, 35, 48, 49, 51, 52, - 53, 54, 59, 43, 62, 63, 66, nil, nil, nil, - nil, 35, nil, 44, nil, 35, nil, 43, nil, nil, - nil, nil, nil, nil, nil, 43, nil, nil, 44, nil, - nil, nil, nil, nil, nil, nil, nil, 44, nil, nil, - nil, 43, nil, nil, 43, 43, nil, nil, nil, nil, + 45, 35, 46, 52, 39, 33, 40, 34, 58, 47, + 57, 44, 62, 63, 59, 38, 1, 2, 66, 35, + 3, 35, 35, 35, 35, 66, 47, 69, 15, 15, + 15, 69, 69, 63, 32, 32, 32, 32, 38, 4, + 45, 45, 33, 5, 52, 57, 58, 59, 6, 34, + 7, 62, 21, 21, 21, 35, 35, 63, 44, 8, + 9, 47, 10, 11, 63, 12, 58, 35, 35, 39, + 13, 40, 47, 34, 14, 16, 17, 39, 18, 19, + 45, 33, 45, 52, 22, 23, 24, 25, 26, 40, + 27, 28, 29, 30, 31, 35, 40, 35, 36, 37, + 41, 42, 48, 35, 45, 35, 40, 49, 50, 51, + 53, 54, 55, 45, 56, 61, 64, 65, 68, nil, + nil, 35, nil, 46, nil, 35, nil, 45, nil, nil, + nil, nil, nil, nil, nil, 45, nil, nil, nil, nil, + 46, nil, nil, nil, nil, nil, nil, nil, nil, 46, + nil, nil, nil, 45, nil, nil, 45, 45, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, 45, nil, nil, 45, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, 43, nil, nil, 43, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, 44, - nil, nil, nil, nil, nil, nil, nil, nil, 43, nil, - 43, nil, nil, nil, 44, 43, nil, 43, 44 ] + nil, nil, 46, nil, nil, nil, nil, nil, nil, nil, + nil, 45, nil, 45, nil, nil, nil, 46, 45, nil, + 45, 46 ] racc_goto_pointer = [ - nil, 14, 28, 41, 35, 8, 51, 48, -33, 54, - 57, 58, 59, 49, 16, 0, -31, -78, 17, -54, - nil, -143, 19, -52, 25, -46, 26, -45, 27, -43, - 59, 59, 1, -28, -62, -14, -19, 24, -108, -136, - -155, 9, -82, -34, -44, -157, -108, -82, -123, -6, - -30, 7, -41, 56, -17, -71, -68, 6, nil, -13, - -117, -180, -54, -107, -214, nil, 23, -173 ] + nil, 16, 17, 18, 30, 1, 46, 44, -31, 56, + 58, 59, 61, 55, 25, 12, -28, -76, 20, -51, + nil, -123, 25, -46, 26, -45, 27, -43, 29, -42, + 60, 60, -1, -28, -62, -14, -15, 27, -105, -138, + -152, 11, -80, nil, -150, -34, -44, -158, -109, -79, + -124, -4, -31, 9, -39, 58, -14, -72, -73, 5, + nil, -10, -113, -178, -52, -107, -219, nil, 25, -174 ] racc_goto_default = [ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 45, nil, nil, nil, nil, nil, nil, nil, nil, nil, 24, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 71, 77, nil, nil, nil, nil, - nil, 46, 161, 201, nil, nil, nil, nil, nil, 78, - nil, nil, nil, nil, nil, 81, 83, nil, 44, nil, - nil, nil, nil, nil, 216, 218, nil, 200 ] + nil, 46, 161, 182, nil, 203, nil, nil, nil, nil, + nil, 78, nil, nil, nil, nil, nil, 81, 83, nil, + 44, nil, nil, nil, nil, nil, 218, 220, nil, 202 ] racc_reduce_table = [ 0, 0, :racc_error, @@ -983,93 +987,95 @@ def raise_parse_error(error_message, location) 8, 69, :_reduce_62, 1, 95, :_reduce_63, 3, 95, :_reduce_64, - 1, 96, :_reduce_65, - 3, 96, :_reduce_66, - 0, 99, :_reduce_67, - 1, 99, :_reduce_68, - 3, 99, :_reduce_69, - 3, 99, :_reduce_70, - 6, 99, :_reduce_71, - 0, 104, :_reduce_72, - 0, 105, :_reduce_73, - 7, 99, :_reduce_74, - 3, 99, :_reduce_75, - 5, 99, :_reduce_76, + 0, 101, :_reduce_none, + 1, 101, :_reduce_none, + 2, 96, :_reduce_67, + 4, 96, :_reduce_68, + 0, 99, :_reduce_69, + 1, 99, :_reduce_70, + 3, 99, :_reduce_71, + 3, 99, :_reduce_72, + 6, 99, :_reduce_73, + 0, 106, :_reduce_74, + 0, 107, :_reduce_75, + 7, 99, :_reduce_76, + 3, 99, :_reduce_77, + 4, 100, :_reduce_78, 0, 93, :_reduce_none, - 1, 93, :_reduce_78, - 1, 88, :_reduce_79, - 2, 88, :_reduce_80, - 3, 88, :_reduce_81, - 1, 107, :_reduce_82, - 2, 107, :_reduce_83, - 1, 100, :_reduce_none, - 1, 100, :_reduce_none, - 0, 108, :_reduce_86, - 0, 109, :_reduce_87, - 6, 72, :_reduce_88, - 0, 110, :_reduce_89, - 0, 111, :_reduce_90, - 5, 72, :_reduce_91, - 1, 89, :_reduce_92, - 2, 89, :_reduce_93, - 3, 89, :_reduce_94, - 1, 112, :_reduce_95, - 2, 112, :_reduce_96, - 1, 113, :_reduce_none, - 1, 92, :_reduce_98, - 1, 92, :_reduce_99, + 1, 93, :_reduce_80, + 1, 88, :_reduce_81, + 2, 88, :_reduce_82, + 3, 88, :_reduce_83, + 1, 109, :_reduce_84, + 2, 109, :_reduce_85, + 1, 102, :_reduce_none, + 1, 102, :_reduce_none, + 0, 110, :_reduce_88, + 0, 111, :_reduce_89, + 6, 72, :_reduce_90, + 0, 112, :_reduce_91, + 0, 113, :_reduce_92, + 5, 72, :_reduce_93, + 1, 89, :_reduce_94, + 2, 89, :_reduce_95, + 3, 89, :_reduce_96, + 1, 114, :_reduce_97, + 2, 114, :_reduce_98, + 1, 115, :_reduce_none, + 1, 92, :_reduce_100, + 1, 92, :_reduce_101, 1, 61, :_reduce_none, 2, 61, :_reduce_none, - 1, 114, :_reduce_none, - 2, 114, :_reduce_none, - 4, 115, :_reduce_104, - 1, 116, :_reduce_105, - 3, 116, :_reduce_106, + 1, 116, :_reduce_none, 2, 116, :_reduce_none, - 0, 117, :_reduce_108, - 1, 117, :_reduce_109, - 3, 117, :_reduce_110, - 5, 117, :_reduce_111, - 7, 117, :_reduce_112, - 0, 119, :_reduce_113, - 0, 120, :_reduce_114, - 8, 117, :_reduce_115, - 3, 117, :_reduce_116, - 1, 102, :_reduce_117, - 1, 102, :_reduce_118, - 1, 102, :_reduce_119, - 1, 103, :_reduce_120, - 3, 103, :_reduce_121, - 2, 103, :_reduce_122, - 4, 103, :_reduce_123, - 1, 118, :_reduce_124, - 3, 118, :_reduce_125, - 2, 118, :_reduce_126, - 4, 118, :_reduce_127, - 1, 121, :_reduce_none, - 1, 121, :_reduce_none, - 1, 122, :_reduce_130, - 1, 122, :_reduce_131, - 0, 101, :_reduce_none, - 3, 101, :_reduce_133, + 4, 117, :_reduce_106, + 1, 118, :_reduce_107, + 3, 118, :_reduce_108, + 2, 118, :_reduce_none, + 0, 119, :_reduce_110, + 1, 119, :_reduce_111, + 3, 119, :_reduce_112, + 5, 119, :_reduce_113, + 7, 119, :_reduce_114, + 0, 121, :_reduce_115, + 0, 122, :_reduce_116, + 8, 119, :_reduce_117, + 3, 119, :_reduce_118, + 1, 104, :_reduce_119, + 1, 104, :_reduce_120, + 1, 104, :_reduce_121, + 1, 105, :_reduce_122, + 3, 105, :_reduce_123, + 2, 105, :_reduce_124, + 4, 105, :_reduce_125, + 1, 120, :_reduce_126, + 3, 120, :_reduce_127, + 2, 120, :_reduce_128, + 4, 120, :_reduce_129, + 1, 123, :_reduce_none, + 1, 123, :_reduce_none, + 1, 124, :_reduce_132, + 1, 124, :_reduce_133, + 0, 103, :_reduce_none, + 3, 103, :_reduce_135, 1, 98, :_reduce_none, 0, 62, :_reduce_none, - 0, 123, :_reduce_136, - 3, 62, :_reduce_137, + 0, 125, :_reduce_138, + 3, 62, :_reduce_139, 1, 70, :_reduce_none, 0, 71, :_reduce_none, 1, 71, :_reduce_none, 1, 71, :_reduce_none, 1, 71, :_reduce_none, - 1, 78, :_reduce_143, - 2, 78, :_reduce_144, - 1, 124, :_reduce_none, - 1, 124, :_reduce_none, - 1, 106, :_reduce_147 ] + 1, 78, :_reduce_145, + 2, 78, :_reduce_146, + 1, 126, :_reduce_none, + 1, 126, :_reduce_none, + 1, 108, :_reduce_149 ] -racc_reduce_n = 148 +racc_reduce_n = 150 -racc_shift_n = 259 +racc_shift_n = 262 racc_token_table = { false => 0, @@ -1252,6 +1258,8 @@ def raise_parse_error(error_message, location) "\"-option@TAG\"", "id_colon", "rule_rhs", + "if_clause", + "\"-option@if_clause\"", "symbol", "named_ref_opt", "parameterizing_suffix", @@ -1744,26 +1752,32 @@ def _reduce_64(val, _values, result) end .,., +# reduce 65 omitted + +# reduce 66 omitted + module_eval(<<'.,.,', 'parser.y', 257) - def _reduce_65(val, _values, result) + def _reduce_67(val, _values, result) builder = val[0] + builder.symbols << val[1] if val[1] result = [builder] result end .,., -module_eval(<<'.,.,', 'parser.y', 262) - def _reduce_66(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 263) + def _reduce_68(val, _values, result) builder = val[2] + builder.symbols << val[3] if val[3] result = val[0].append(builder) result end .,., -module_eval(<<'.,.,', 'parser.y', 268) - def _reduce_67(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 270) + def _reduce_69(val, _values, result) reset_precs result = Grammar::ParameterizingRule::Rhs.new @@ -1771,8 +1785,8 @@ def _reduce_67(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 273) - def _reduce_68(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 275) + def _reduce_70(val, _values, result) reset_precs result = Grammar::ParameterizingRule::Rhs.new @@ -1780,8 +1794,8 @@ def _reduce_68(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 278) - def _reduce_69(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 280) + def _reduce_71(val, _values, result) token = val[1] token.alias_name = val[2] builder = val[0] @@ -1792,8 +1806,8 @@ def _reduce_69(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 286) - def _reduce_70(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 288) + def _reduce_72(val, _values, result) builder = val[0] builder.symbols << Lrama::Lexer::Token::InstantiateRule.new(s_value: val[2], location: @lexer.location, args: [val[1]]) result = builder @@ -1802,8 +1816,8 @@ def _reduce_70(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 292) - def _reduce_71(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 294) + def _reduce_73(val, _values, result) builder = val[0] builder.symbols << Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, location: @lexer.location, args: val[3], lhs_tag: val[5]) result = builder @@ -1812,8 +1826,8 @@ def _reduce_71(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 298) - def _reduce_72(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 300) + def _reduce_74(val, _values, result) if @prec_seen on_action_error("multiple User_code after %prec", val[0]) if @code_after_prec @code_after_prec = true @@ -1824,16 +1838,16 @@ def _reduce_72(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 306) - def _reduce_73(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 308) + def _reduce_75(val, _values, result) end_c_declaration result end .,., -module_eval(<<'.,.,', 'parser.y', 310) - def _reduce_74(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 312) + def _reduce_76(val, _values, result) user_code = val[3] user_code.alias_name = val[6] builder = val[0] @@ -1844,8 +1858,8 @@ def _reduce_74(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 318) - def _reduce_75(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 320) + def _reduce_77(val, _values, result) sym = @grammar.find_symbol_by_id!(val[2]) @prec_seen = true builder = val[0] @@ -1856,179 +1870,177 @@ def _reduce_75(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 326) - def _reduce_76(val, _values, result) - builder = val[0] - builder.symbols << Lrama::Lexer::Token::ControlSyntax.new(s_value: val[1], location: @lexer.location, condition: val[3]) - result = builder +module_eval(<<'.,.,', 'parser.y', 329) + def _reduce_78(val, _values, result) + result = Lrama::Lexer::Token::ControlSyntax.new(s_value: val[0], location: @lexer.location, condition: val[2]) result end .,., -# reduce 77 omitted +# reduce 79 omitted -module_eval(<<'.,.,', 'parser.y', 332) - def _reduce_78(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 333) + def _reduce_80(val, _values, result) result = val[0].s_value result end .,., -module_eval(<<'.,.,', 'parser.y', 336) - def _reduce_79(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 337) + def _reduce_81(val, _values, result) result = [{tag: nil, tokens: val[0]}] result end .,., -module_eval(<<'.,.,', 'parser.y', 340) - def _reduce_80(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 341) + def _reduce_82(val, _values, result) result = [{tag: val[0], tokens: val[1]}] result end .,., -module_eval(<<'.,.,', 'parser.y', 344) - def _reduce_81(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 345) + def _reduce_83(val, _values, result) result = val[0].append({tag: val[1], tokens: val[2]}) result end .,., -module_eval(<<'.,.,', 'parser.y', 347) - def _reduce_82(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 348) + def _reduce_84(val, _values, result) result = [val[0]] result end .,., -module_eval(<<'.,.,', 'parser.y', 348) - def _reduce_83(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 349) + def _reduce_85(val, _values, result) result = val[0].append(val[1]) result end .,., -# reduce 84 omitted +# reduce 86 omitted -# reduce 85 omitted +# reduce 87 omitted -module_eval(<<'.,.,', 'parser.y', 355) - def _reduce_86(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 356) + def _reduce_88(val, _values, result) begin_c_declaration("}") result end .,., -module_eval(<<'.,.,', 'parser.y', 359) - def _reduce_87(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 360) + def _reduce_89(val, _values, result) end_c_declaration result end .,., -module_eval(<<'.,.,', 'parser.y', 363) - def _reduce_88(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 364) + def _reduce_90(val, _values, result) result = val[0].append(val[3]) result end .,., -module_eval(<<'.,.,', 'parser.y', 367) - def _reduce_89(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 368) + def _reduce_91(val, _values, result) begin_c_declaration("}") result end .,., -module_eval(<<'.,.,', 'parser.y', 371) - def _reduce_90(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 372) + def _reduce_92(val, _values, result) end_c_declaration result end .,., -module_eval(<<'.,.,', 'parser.y', 375) - def _reduce_91(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 376) + def _reduce_93(val, _values, result) result = [val[2]] result end .,., -module_eval(<<'.,.,', 'parser.y', 380) - def _reduce_92(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 381) + def _reduce_94(val, _values, result) result = [{tag: nil, tokens: val[0]}] result end .,., -module_eval(<<'.,.,', 'parser.y', 384) - def _reduce_93(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 385) + def _reduce_95(val, _values, result) result = [{tag: val[0], tokens: val[1]}] result end .,., -module_eval(<<'.,.,', 'parser.y', 388) - def _reduce_94(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 389) + def _reduce_96(val, _values, result) result = val[0].append({tag: val[1], tokens: val[2]}) result end .,., -module_eval(<<'.,.,', 'parser.y', 391) - def _reduce_95(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 392) + def _reduce_97(val, _values, result) result = [val[0]] result end .,., -module_eval(<<'.,.,', 'parser.y', 392) - def _reduce_96(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 393) + def _reduce_98(val, _values, result) result = val[0].append(val[1]) result end .,., -# reduce 97 omitted +# reduce 99 omitted -module_eval(<<'.,.,', 'parser.y', 396) - def _reduce_98(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 397) + def _reduce_100(val, _values, result) on_action_error("ident after %prec", val[0]) if @prec_seen result end .,., -module_eval(<<'.,.,', 'parser.y', 397) - def _reduce_99(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 398) + def _reduce_101(val, _values, result) on_action_error("char after %prec", val[0]) if @prec_seen result end .,., -# reduce 100 omitted - -# reduce 101 omitted - # reduce 102 omitted # reduce 103 omitted -module_eval(<<'.,.,', 'parser.y', 407) - def _reduce_104(val, _values, result) +# reduce 104 omitted + +# reduce 105 omitted + +module_eval(<<'.,.,', 'parser.y', 408) + def _reduce_106(val, _values, result) lhs = val[0] lhs.alias_name = val[1] val[3].each do |builder| @@ -2041,8 +2053,8 @@ def _reduce_104(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 418) - def _reduce_105(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 419) + def _reduce_107(val, _values, result) builder = val[0] if !builder.line builder.line = @lexer.line - 1 @@ -2053,8 +2065,8 @@ def _reduce_105(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 426) - def _reduce_106(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 427) + def _reduce_108(val, _values, result) builder = val[2] if !builder.line builder.line = @lexer.line - 1 @@ -2065,10 +2077,10 @@ def _reduce_106(val, _values, result) end .,., -# reduce 107 omitted +# reduce 109 omitted -module_eval(<<'.,.,', 'parser.y', 436) - def _reduce_108(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 437) + def _reduce_110(val, _values, result) reset_precs result = @grammar.create_rule_builder(@rule_counter, @midrule_action_counter) @@ -2076,8 +2088,8 @@ def _reduce_108(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 441) - def _reduce_109(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 442) + def _reduce_111(val, _values, result) reset_precs result = @grammar.create_rule_builder(@rule_counter, @midrule_action_counter) @@ -2085,8 +2097,8 @@ def _reduce_109(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 446) - def _reduce_110(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 447) + def _reduce_112(val, _values, result) token = val[1] token.alias_name = val[2] builder = val[0] @@ -2097,8 +2109,8 @@ def _reduce_110(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 454) - def _reduce_111(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 455) + def _reduce_113(val, _values, result) token = Lrama::Lexer::Token::InstantiateRule.new(s_value: val[2], alias_name: val[3], location: @lexer.location, args: [val[1]], lhs_tag: val[4]) builder = val[0] builder.add_rhs(token) @@ -2109,8 +2121,8 @@ def _reduce_111(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 462) - def _reduce_112(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 463) + def _reduce_114(val, _values, result) token = Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, alias_name: val[5], location: @lexer.location, args: val[3], lhs_tag: val[6]) builder = val[0] builder.add_rhs(token) @@ -2121,8 +2133,8 @@ def _reduce_112(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 470) - def _reduce_113(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 471) + def _reduce_115(val, _values, result) if @prec_seen on_action_error("multiple User_code after %prec", val[0]) if @code_after_prec @code_after_prec = true @@ -2133,16 +2145,16 @@ def _reduce_113(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 478) - def _reduce_114(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 479) + def _reduce_116(val, _values, result) end_c_declaration result end .,., -module_eval(<<'.,.,', 'parser.y', 482) - def _reduce_115(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 483) + def _reduce_117(val, _values, result) user_code = val[3] user_code.alias_name = val[6] user_code.tag = val[7] @@ -2154,8 +2166,8 @@ def _reduce_115(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 491) - def _reduce_116(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 492) + def _reduce_118(val, _values, result) sym = @grammar.find_symbol_by_id!(val[2]) @prec_seen = true builder = val[0] @@ -2166,116 +2178,116 @@ def _reduce_116(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 498) - def _reduce_117(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 499) + def _reduce_119(val, _values, result) result = "option" result end .,., -module_eval(<<'.,.,', 'parser.y', 499) - def _reduce_118(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 500) + def _reduce_120(val, _values, result) result = "nonempty_list" result end .,., -module_eval(<<'.,.,', 'parser.y', 500) - def _reduce_119(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 501) + def _reduce_121(val, _values, result) result = "list" result end .,., -module_eval(<<'.,.,', 'parser.y', 502) - def _reduce_120(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 503) + def _reduce_122(val, _values, result) result = [val[0]] result end .,., -module_eval(<<'.,.,', 'parser.y', 503) - def _reduce_121(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 504) + def _reduce_123(val, _values, result) result = val[0].append(val[2]) result end .,., -module_eval(<<'.,.,', 'parser.y', 504) - def _reduce_122(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 505) + def _reduce_124(val, _values, result) result = [Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, location: @lexer.location, args: val[0])] result end .,., -module_eval(<<'.,.,', 'parser.y', 505) - def _reduce_123(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 506) + def _reduce_125(val, _values, result) result = [Lrama::Lexer::Token::InstantiateRule.new(s_value: val[0].s_value, location: @lexer.location, args: val[2])] result end .,., -module_eval(<<'.,.,', 'parser.y', 507) - def _reduce_124(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 508) + def _reduce_126(val, _values, result) result = [val[0]] result end .,., -module_eval(<<'.,.,', 'parser.y', 508) - def _reduce_125(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 509) + def _reduce_127(val, _values, result) result = val[0].append(val[2]) result end .,., -module_eval(<<'.,.,', 'parser.y', 509) - def _reduce_126(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 510) + def _reduce_128(val, _values, result) result = [Lrama::Lexer::Token::InstantiateRule.new(s_value: val[1].s_value, location: @lexer.location, args: val[0])] result end .,., -module_eval(<<'.,.,', 'parser.y', 510) - def _reduce_127(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 511) + def _reduce_129(val, _values, result) result = [Lrama::Lexer::Token::InstantiateRule.new(s_value: val[0].s_value, location: @lexer.location, args: val[2])] result end .,., -# reduce 128 omitted +# reduce 130 omitted -# reduce 129 omitted +# reduce 131 omitted -module_eval(<<'.,.,', 'parser.y', 515) - def _reduce_130(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 516) + def _reduce_132(val, _values, result) result = Lrama::Lexer::Token::Ident.new(s_value: true) result end .,., -module_eval(<<'.,.,', 'parser.y', 516) - def _reduce_131(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 517) + def _reduce_133(val, _values, result) result = Lrama::Lexer::Token::Ident.new(s_value: false) result end .,., -# reduce 132 omitted +# reduce 134 omitted -module_eval(<<'.,.,', 'parser.y', 519) - def _reduce_133(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 520) + def _reduce_135(val, _values, result) result = val[1].s_value result end .,., -# reduce 134 omitted +# reduce 136 omitted -# reduce 135 omitted +# reduce 137 omitted -module_eval(<<'.,.,', 'parser.y', 526) - def _reduce_136(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 527) + def _reduce_138(val, _values, result) begin_c_declaration('\Z') @grammar.epilogue_first_lineno = @lexer.line + 1 @@ -2283,8 +2295,8 @@ def _reduce_136(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 531) - def _reduce_137(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 532) + def _reduce_139(val, _values, result) end_c_declaration @grammar.epilogue = val[2].s_value @@ -2292,36 +2304,36 @@ def _reduce_137(val, _values, result) end .,., -# reduce 138 omitted - -# reduce 139 omitted - # reduce 140 omitted # reduce 141 omitted # reduce 142 omitted -module_eval(<<'.,.,', 'parser.y', 542) - def _reduce_143(val, _values, result) +# reduce 143 omitted + +# reduce 144 omitted + +module_eval(<<'.,.,', 'parser.y', 543) + def _reduce_145(val, _values, result) result = [val[0]] result end .,., -module_eval(<<'.,.,', 'parser.y', 543) - def _reduce_144(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 544) + def _reduce_146(val, _values, result) result = val[0].append(val[1]) result end .,., -# reduce 145 omitted +# reduce 147 omitted -# reduce 146 omitted +# reduce 148 omitted -module_eval(<<'.,.,', 'parser.y', 548) - def _reduce_147(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 549) + def _reduce_149(val, _values, result) result = Lrama::Lexer::Token::Ident.new(s_value: val[0]) result end diff --git a/parser.y b/parser.y index 5719034b..51b6d4d0 100644 --- a/parser.y +++ b/parser.y @@ -253,14 +253,16 @@ rule rule_args: IDENTIFIER { result = [val[0]] } | rule_args "," IDENTIFIER { result = val[0].append(val[2]) } - rule_rhs_list: rule_rhs + rule_rhs_list: rule_rhs if_clause? { builder = val[0] + builder.symbols << val[1] if val[1] result = [builder] } - | rule_rhs_list "|" rule_rhs + | rule_rhs_list "|" rule_rhs if_clause? { builder = val[2] + builder.symbols << val[3] if val[3] result = val[0].append(builder) } @@ -322,11 +324,10 @@ rule builder.precedence_sym = sym result = builder } - | rule_rhs "%if" "(" IDENTIFIER ")" + + if_clause: "%if" "(" IDENTIFIER ")" { - builder = val[0] - builder.symbols << Lrama::Lexer::Token::ControlSyntax.new(s_value: val[1], location: @lexer.location, condition: val[3]) - result = builder + result = Lrama::Lexer::Token::ControlSyntax.new(s_value: val[0], location: @lexer.location, condition: val[2]) } alias: # empty