From 02ea4c4af7501fc0f6ba88621a2b66bc10b1dbd9 Mon Sep 17 00:00:00 2001 From: dkostic <25055813+dkostic@users.noreply.github.com> Date: Fri, 13 Dec 2024 08:43:18 -0800 Subject: [PATCH] [EC] P-256/384/521 s2n-bignum scalar multiplication (#2036) For curves P-256/384/521 we use s2n-bignum implementation of scalar multiplication of an arbitrary point. This gives the following performance improvements (measurements in ops/s): ``` __Apple M1__| before | after | speedup | P-256 MUL | 27871 | 31607 | 1.13x | P-256 ECDH | 20804 | 22778 | 1.11x | P-384 MUL | 7245 | 8618 | 1.19x | P-384 ECDH | 5367 | 5986 | 1.11x | P-521 MUL | 5040 | 5806 | 1.15x | P-521 ECDH | 3696 | 4053 | 1.10x | ____Intel___| before | after | speedup | P-256 MUL | 21913 | 25650 | 1.17x | P-256 ECDH | 17188 | 19453 | 1.13x | P-384 MUL | 6554 | 7691 | 1.17x | P-384 ECDH | 4731 | 5321 | 1.12x | P-521 MUL | 4400 | 5151 | 1.17x | P-521 ECDH | 3192 | 3514 | 1.10x | ``` where Apple M1 is a M1 based macbook laptop, and Intel is Intel(R) Xeon(R) Platinum 8488C. --- crypto/fipsmodule/CMakeLists.txt | 7 + crypto/fipsmodule/ec/p256-nistz.c | 13 + crypto/fipsmodule/ec/p384.c | 37 +- crypto/fipsmodule/ec/p521.c | 35 +- .../s2n-bignum/include/s2n-bignum_aws-lc.h | 24 +- util/fipstools/delocate/delocate.peg | 10 +- util/fipstools/delocate/delocate.peg.go | 1095 +++++++++-------- 7 files changed, 621 insertions(+), 600 deletions(-) diff --git a/crypto/fipsmodule/CMakeLists.txt b/crypto/fipsmodule/CMakeLists.txt index 946411cd54..a91d29f495 100644 --- a/crypto/fipsmodule/CMakeLists.txt +++ b/crypto/fipsmodule/CMakeLists.txt @@ -205,6 +205,9 @@ if((((ARCH STREQUAL "x86_64") AND NOT MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX) OR set( S2N_BIGNUM_ASM_SOURCES + p256/p256_montjscalarmul.S + p256/p256_montjscalarmul_alt.S + p384/bignum_add_p384.S p384/bignum_sub_p384.S p384/bignum_neg_p384.S @@ -218,6 +221,8 @@ if((((ARCH STREQUAL "x86_64") AND NOT MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX) OR p384/bignum_littleendian_6.S p384/p384_montjdouble.S p384/p384_montjdouble_alt.S + p384/p384_montjscalarmul.S + p384/p384_montjscalarmul_alt.S p521/bignum_add_p521.S p521/bignum_sub_p521.S @@ -230,6 +235,8 @@ if((((ARCH STREQUAL "x86_64") AND NOT MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX) OR p521/bignum_fromlebytes_p521.S p521/p521_jdouble.S p521/p521_jdouble_alt.S + p521/p521_jscalarmul.S + p521/p521_jscalarmul_alt.S curve25519/bignum_mod_n25519.S curve25519/bignum_neg_p25519.S diff --git a/crypto/fipsmodule/ec/p256-nistz.c b/crypto/fipsmodule/ec/p256-nistz.c index 23003e1e42..9ba5a74e2d 100644 --- a/crypto/fipsmodule/ec/p256-nistz.c +++ b/crypto/fipsmodule/ec/p256-nistz.c @@ -31,6 +31,11 @@ #include "../../internal.h" #include "internal.h" #include "p256-nistz.h" +#include "ec_nistp.h" + +#if defined(EC_NISTP_USE_S2N_BIGNUM) +#include "../../../third_party/s2n-bignum/include/s2n-bignum_aws-lc.h" +#endif #if !defined(OPENSSL_NO_ASM) && \ (defined(OPENSSL_X86_64) || defined(OPENSSL_AARCH64)) && \ @@ -304,6 +309,13 @@ static crypto_word_t calc_wvalue(size_t *index, const uint8_t p_str[33]) { static void ecp_nistz256_point_mul(const EC_GROUP *group, EC_JACOBIAN *r, const EC_JACOBIAN *p, const EC_SCALAR *scalar) { +#if defined(EC_NISTP_USE_S2N_BIGNUM) + ec_nistp_felem_limb in[P256_LIMBS * 3]; + ec_nistp_felem_limb out[P256_LIMBS * 3]; + ec_nistp_coordinates_to_point(in, p->X.words, p->Y.words, p->Z.words, P256_LIMBS); + p256_montjscalarmul_selector(out, scalar->words, in); + ec_nistp_point_to_coordinates(r->X.words, r->Y.words, r->Z.words, out, P256_LIMBS); +#else stack_align_type buffer_out[32 + sizeof(P256_POINT)]; P256_POINT *aligned_out = (P256_POINT *) align_pointer(buffer_out, 32); ecp_nistz256_windowed_mul(group, aligned_out, p, scalar); @@ -312,6 +324,7 @@ static void ecp_nistz256_point_mul(const EC_GROUP *group, EC_JACOBIAN *r, OPENSSL_memcpy(r->X.words, aligned_out->X, P256_LIMBS * sizeof(BN_ULONG)); OPENSSL_memcpy(r->Y.words, aligned_out->Y, P256_LIMBS * sizeof(BN_ULONG)); OPENSSL_memcpy(r->Z.words, aligned_out->Z, P256_LIMBS * sizeof(BN_ULONG)); +#endif } static void ecp_nistz256_point_mul_base(const EC_GROUP *group, EC_JACOBIAN *r, diff --git a/crypto/fipsmodule/ec/p384.c b/crypto/fipsmodule/ec/p384.c index 4383f2e8a9..15558b6b08 100644 --- a/crypto/fipsmodule/ec/p384.c +++ b/crypto/fipsmodule/ec/p384.c @@ -438,39 +438,6 @@ static int ec_GFp_nistp384_cmp_x_coordinate(const EC_GROUP *group, return 0; } -// ---------------------------------------------------------------------------- -// SCALAR MULTIPLICATION OPERATIONS -// ---------------------------------------------------------------------------- -// -// The method for computing scalar products in functions: -// - |ec_GFp_nistp384_point_mul|, -// - |ec_GFp_nistp384_point_mul_base|, -// - |ec_GFp_nistp384_point_mul_public|, -// is adapted from ECCKiila project (https://arxiv.org/abs/2007.11481). -// -// One difference from the processing in the ECCKiila project is the order of -// the digit processing in |ec_GFp_nistp384_point_mul_base|, where we end the -// processing with the least significant digit to be able to apply the -// analysis results detailed at the bottom of this file. In -// |ec_GFp_nistp384_point_mul_base| and |ec_GFp_nistp384_point_mul|, we -// considered using window size 7 based on that same analysis. However, the -// table size and performance measurements were more preferable for window -// size 5. The potential issue with different window sizes is that for some -// sizes, a scalar can be found such that a case of point doubling instead of -// point addition happens in the scalar multiplication. This would make -// the multiplication non constant-time. To the best of our knowledge this -// timing leak is not an exploitable issue because the only scalar for which -// the leak can happen is already known by the attacker. This is also provided -// that this recoding and window size are only used with ECDH and ECDSA -// protocols. Any other use would need to be analyzed to determine whether it is -// secure and the user should be aware of this side channel of a particular -// scalar value. -// -// OpenSSL has a similar analysis for P-521 implementation: -// https://github.com/openssl/openssl/blob/e9492d1cecf459261f1f5ac0eb03e9c631600537/crypto/ec/ecp_nistp521.c#L1318 -// -// For detailed analysis of different window sizes see the bottom of this file. - // Multiplication of an arbitrary point by a scalar, r = [scalar]P. static void ec_GFp_nistp384_point_mul(const EC_GROUP *group, EC_JACOBIAN *r, const EC_JACOBIAN *p, @@ -482,7 +449,11 @@ static void ec_GFp_nistp384_point_mul(const EC_GROUP *group, EC_JACOBIAN *r, p384_from_generic(tmp[1], &p->Y); p384_from_generic(tmp[2], &p->Z); +#if defined(EC_NISTP_USE_S2N_BIGNUM) + p384_montjscalarmul_selector((uint64_t*)res, scalar->words, (uint64_t*)tmp); +#else ec_nistp_scalar_mul(p384_methods(), res[0], res[1], res[2], tmp[0], tmp[1], tmp[2], scalar); +#endif p384_to_generic(&r->X, res[0]); p384_to_generic(&r->Y, res[1]); diff --git a/crypto/fipsmodule/ec/p521.c b/crypto/fipsmodule/ec/p521.c index 9728c8161f..0f42eebecd 100644 --- a/crypto/fipsmodule/ec/p521.c +++ b/crypto/fipsmodule/ec/p521.c @@ -377,37 +377,6 @@ static void ec_GFp_nistp521_dbl(const EC_GROUP *group, EC_JACOBIAN *r, p521_to_generic(&r->Z, z); } -// ---------------------------------------------------------------------------- -// SCALAR MULTIPLICATION OPERATIONS -// ---------------------------------------------------------------------------- -// -// The method for computing scalar products in functions: -// - |ec_GFp_nistp521_point_mul|, -// - |ec_GFp_nistp521_point_mul_base|, -// - |ec_GFp_nistp521_point_mul_public|, -// is adapted from ECCKiila project (https://arxiv.org/abs/2007.11481). -// The main difference is that we use a window of size 7 instead of 5 for the -// first two functions. The potential issue with window sizes is that for some -// sizes a scalar can be found such that a case of point doubling instead of -// point addition happens in the scalar multiplication. This would make the -// multiplication non constant-time. Therefore, such window sizes have to be -// avoided. The windows size of 7 is chosen based on analysis analogous to -// the one in |ec_GFp_nistp_recode_scalar_bits| function in |util.c| file. -// See the analysis at the bottom of this file. -// -// Moreover, the order in which the digits of the scalar are processed in -// |ec_GFp_nistp521_point_mul_base| is different from the ECCKiila project, to -// ensure that the least significant digit is processed last which together -// with the window size 7 guarantees constant-time execution of the function. -// -// Another difference is that in |ec_GFp_nistp521_point_mul_public| function we -// use window size 5 for the public point and 7 for the base point. Here it is -// ok to use window of size 5 since the scalar is public and therefore the -// function doesn't have to be constant-time. -// -// The precomputed table of base point multiples is generated by the code in -// |make_tables.go| script. - // Multiplication of an arbitrary point by a scalar, r = [scalar]P. static void ec_GFp_nistp521_point_mul(const EC_GROUP *group, EC_JACOBIAN *r, const EC_JACOBIAN *p, @@ -419,7 +388,11 @@ static void ec_GFp_nistp521_point_mul(const EC_GROUP *group, EC_JACOBIAN *r, p521_from_generic(tmp[1], &p->Y); p521_from_generic(tmp[2], &p->Z); +#if defined(EC_NISTP_USE_S2N_BIGNUM) + p521_jscalarmul_selector((uint64_t*)res, scalar->words, (uint64_t*)tmp); +#else ec_nistp_scalar_mul(p521_methods(), res[0], res[1], res[2], tmp[0], tmp[1], tmp[2], scalar); +#endif p521_to_generic(&r->X, res[0]); p521_to_generic(&r->Y, res[1]); diff --git a/third_party/s2n-bignum/include/s2n-bignum_aws-lc.h b/third_party/s2n-bignum/include/s2n-bignum_aws-lc.h index 693d113a16..7338e4140b 100644 --- a/third_party/s2n-bignum/include/s2n-bignum_aws-lc.h +++ b/third_party/s2n-bignum/include/s2n-bignum_aws-lc.h @@ -56,6 +56,13 @@ static inline uint8_t use_s2n_bignum_alt(void) { } #endif +extern void p256_montjscalarmul(uint64_t res[S2N_BIGNUM_STATIC 12], const uint64_t scalar[S2N_BIGNUM_STATIC 4], uint64_t point[S2N_BIGNUM_STATIC 12]); +extern void p256_montjscalarmul_alt(uint64_t res[S2N_BIGNUM_STATIC 12], const uint64_t scalar[S2N_BIGNUM_STATIC 4], uint64_t point[S2N_BIGNUM_STATIC 12]); +static inline void p256_montjscalarmul_selector(uint64_t res[S2N_BIGNUM_STATIC 12], const uint64_t scalar[S2N_BIGNUM_STATIC 4], uint64_t point[S2N_BIGNUM_STATIC 12]) { + if (use_s2n_bignum_alt()) { p256_montjscalarmul_alt(res, scalar, point); } + else { p256_montjscalarmul(res, scalar, point); } +} + // Add modulo p_384, z := (x + y) mod p_384, assuming x and y reduced // Inputs x[6], y[6]; output z[6] extern void bignum_add_p384(uint64_t z[S2N_BIGNUM_STATIC 6], const uint64_t x[S2N_BIGNUM_STATIC 6], const uint64_t y[S2N_BIGNUM_STATIC 6]); @@ -110,6 +117,13 @@ static inline void p384_montjdouble_selector(uint64_t p3[S2N_BIGNUM_STATIC 18],u else { p384_montjdouble(p3, p1); } } +extern void p384_montjscalarmul(uint64_t res[S2N_BIGNUM_STATIC 18], const uint64_t scalar[S2N_BIGNUM_STATIC 6], uint64_t point[S2N_BIGNUM_STATIC 18]); +extern void p384_montjscalarmul_alt(uint64_t res[S2N_BIGNUM_STATIC 18], const uint64_t scalar[S2N_BIGNUM_STATIC 6], uint64_t point[S2N_BIGNUM_STATIC 18]); +static inline void p384_montjscalarmul_selector(uint64_t res[S2N_BIGNUM_STATIC 18], const uint64_t scalar[S2N_BIGNUM_STATIC 6], uint64_t point[S2N_BIGNUM_STATIC 18]) { + if (use_s2n_bignum_alt()) { p384_montjscalarmul_alt(res, scalar, point); } + else { p384_montjscalarmul(res, scalar, point); } +} + // Convert 6-digit (384-bit) bignum from little-endian form // Input x[6]; output z[6] extern void bignum_fromlebytes_6(uint64_t z[S2N_BIGNUM_STATIC 6], const uint8_t x[S2N_BIGNUM_STATIC 48]); @@ -158,12 +172,18 @@ extern void bignum_fromlebytes_p521(uint64_t z[S2N_BIGNUM_STATIC 9], const uint8 // Convert 9-digit 528-bit bignum to little-endian bytes extern void bignum_tolebytes_p521(uint8_t z[S2N_BIGNUM_STATIC 66], const uint64_t x[S2N_BIGNUM_STATIC 9]); -extern void p521_jdouble(uint64_t p3[static 27],uint64_t p1[static 27]); -extern void p521_jdouble_alt(uint64_t p3[static 27],uint64_t p1[static 27]); +extern void p521_jdouble(uint64_t p3[S2N_BIGNUM_STATIC 27],uint64_t p1[S2N_BIGNUM_STATIC 27]); +extern void p521_jdouble_alt(uint64_t p3[S2N_BIGNUM_STATIC 27],uint64_t p1[S2N_BIGNUM_STATIC 27]); static inline void p521_jdouble_selector(uint64_t p3[S2N_BIGNUM_STATIC 27],uint64_t p1[S2N_BIGNUM_STATIC 27]) { if (use_s2n_bignum_alt()) { p521_jdouble_alt(p3, p1); } else { p521_jdouble(p3, p1); } } +extern void p521_jscalarmul(uint64_t res[S2N_BIGNUM_STATIC 27], const uint64_t scalar[S2N_BIGNUM_STATIC 9], const uint64_t point[S2N_BIGNUM_STATIC 27]); +extern void p521_jscalarmul_alt(uint64_t res[S2N_BIGNUM_STATIC 27], const uint64_t scalar[S2N_BIGNUM_STATIC 9], const uint64_t point[S2N_BIGNUM_STATIC 27]); +static inline void p521_jscalarmul_selector(uint64_t res[S2N_BIGNUM_STATIC 27], const uint64_t scalar[S2N_BIGNUM_STATIC 9], const uint64_t point[S2N_BIGNUM_STATIC 27]) { + if (use_s2n_bignum_alt()) { p521_jscalarmul_alt(res, scalar, point); } + else { p521_jscalarmul(res, scalar, point); } +} // curve25519_x25519_byte and curve25519_x25519_byte_alt computes the x25519 // function specified in https://www.rfc-editor.org/rfc/rfc7748. |scalar| is the diff --git a/util/fipstools/delocate/delocate.peg b/util/fipstools/delocate/delocate.peg index a1a2b997a4..8ab9caae0b 100644 --- a/util/fipstools/delocate/delocate.peg +++ b/util/fipstools/delocate/delocate.peg @@ -114,15 +114,19 @@ ARMPostincrement <- '!' BaseIndexScale <- '(' RegisterOrConstant? WS? (',' WS? RegisterOrConstant WS? (',' [0-9]+)? )? ')' Operator <- [+\-] OffsetOperator <- '+' / '-' / '*' +# s2n-bignum code has a lot of different and complex ways to compute an offset. +# For example, (7*72)+(3*72)*(5-1)+8+0*72. We define S2nBignumHelper in an attempt +# to simplofy the expressions for Offset. +S2nBignumHelper <- '(' [0-9]+ WS? OffsetOperator WS? [0-9]+ ')' WS? OffsetOperator? WS? Offset <- '+'? '-'? (("0b" [01]+) / ("0x" [[0-9A-F]]+) / ([0-9]+ WS OffsetOperator [0-9]+ / [0-9]+ ( OffsetOperator '(' [0-9]+ OffsetOperator [0-9]+ ')' )? / [0-9]+ ( OffsetOperator [0-9]+ OffsetOperator [0-9]+ )? / [0-9]+ ( OffsetOperator [0-9]+ )? / - '(' [0-9]+ WS? OffsetOperator WS? [0-9]+ ')' OffsetOperator [0-9]+ OffsetOperator [0-9]+ / - '(' [0-9]+ WS? OffsetOperator WS? [0-9]+ ')' OffsetOperator [0-9]+ !'x' / - '(' [0-9]+ WS? OffsetOperator WS? [0-9]+ ')' / + S2nBignumHelper S2nBignumHelper (S2nBignumHelper ([0-9]+ OffsetOperator)? [0-9]+ OffsetOperator)? [0-9]+ / + S2nBignumHelper [0-9]+ ((WS? OffsetOperator [0-9]+ (WS? OffsetOperator [0-9]+)?) / (!'x')) / + S2nBignumHelper / '(' [0-9]+ WS? OffsetOperator WS? [0-9]+ WS? OffsetOperator WS? [0-9]+')')![[A-Z]] ) Section <- [[A-Z@]]+ diff --git a/util/fipstools/delocate/delocate.peg.go b/util/fipstools/delocate/delocate.peg.go index fe2024612a..b0c30f8679 100644 --- a/util/fipstools/delocate/delocate.peg.go +++ b/util/fipstools/delocate/delocate.peg.go @@ -75,6 +75,7 @@ const ( ruleBaseIndexScale ruleOperator ruleOffsetOperator + ruleS2nBignumHelper ruleOffset ruleSection ruleSegmentRegister @@ -139,6 +140,7 @@ var rul3s = [...]string{ "BaseIndexScale", "Operator", "OffsetOperator", + "S2nBignumHelper", "Offset", "Section", "SegmentRegister", @@ -256,7 +258,7 @@ func (t *tokens32) Tokens() []token32 { type Asm struct { Buffer string buffer []rune - rules [61]func() bool + rules [62]func() bool parse func(rule ...int) error reset func() Pretty bool @@ -6956,890 +6958,921 @@ func (p *Asm) Init(options ...func(*Asm) error) error { position, tokenIndex = position898, tokenIndex898 return false }, - /* 57 Offset <- <('+'? '-'? (('0' ('b' / 'B') ('0' / '1')+) / ('0' ('x' / 'X') ([0-9] / [0-9] / ([a-f] / [A-F]))+) / ((([0-9]+ WS OffsetOperator [0-9]+) / ([0-9]+ (OffsetOperator '(' [0-9]+ OffsetOperator [0-9]+ ')')?) / ([0-9]+ (OffsetOperator [0-9]+ OffsetOperator [0-9]+)?) / ([0-9]+ (OffsetOperator [0-9]+)?) / ('(' [0-9]+ WS? OffsetOperator WS? [0-9]+ ')' OffsetOperator [0-9]+ OffsetOperator [0-9]+) / ('(' [0-9]+ WS? OffsetOperator WS? [0-9]+ ')' OffsetOperator [0-9]+ !'x') / ('(' [0-9]+ WS? OffsetOperator WS? [0-9]+ ')') / ('(' [0-9]+ WS? OffsetOperator WS? [0-9]+ WS? OffsetOperator WS? [0-9]+ ')')) !([a-z] / [A-Z]))))> */ + /* 57 S2nBignumHelper <- <('(' [0-9]+ WS? OffsetOperator WS? [0-9]+ ')' WS? OffsetOperator? WS?)> */ func() bool { position903, tokenIndex903 := position, tokenIndex { position904 := position + if buffer[position] != rune('(') { + goto l903 + } + position++ + if c := buffer[position]; c < rune('0') || c > rune('9') { + goto l903 + } + position++ + l905: { - position905, tokenIndex905 := position, tokenIndex - if buffer[position] != rune('+') { - goto l905 + position906, tokenIndex906 := position, tokenIndex + if c := buffer[position]; c < rune('0') || c > rune('9') { + goto l906 } position++ - goto l906 - l905: - position, tokenIndex = position905, tokenIndex905 + goto l905 + l906: + position, tokenIndex = position906, tokenIndex906 } - l906: { position907, tokenIndex907 := position, tokenIndex - if buffer[position] != rune('-') { + if !_rules[ruleWS]() { goto l907 } - position++ goto l908 l907: position, tokenIndex = position907, tokenIndex907 } l908: + if !_rules[ruleOffsetOperator]() { + goto l903 + } { position909, tokenIndex909 := position, tokenIndex + if !_rules[ruleWS]() { + goto l909 + } + goto l910 + l909: + position, tokenIndex = position909, tokenIndex909 + } + l910: + if c := buffer[position]; c < rune('0') || c > rune('9') { + goto l903 + } + position++ + l911: + { + position912, tokenIndex912 := position, tokenIndex + if c := buffer[position]; c < rune('0') || c > rune('9') { + goto l912 + } + position++ + goto l911 + l912: + position, tokenIndex = position912, tokenIndex912 + } + if buffer[position] != rune(')') { + goto l903 + } + position++ + { + position913, tokenIndex913 := position, tokenIndex + if !_rules[ruleWS]() { + goto l913 + } + goto l914 + l913: + position, tokenIndex = position913, tokenIndex913 + } + l914: + { + position915, tokenIndex915 := position, tokenIndex + if !_rules[ruleOffsetOperator]() { + goto l915 + } + goto l916 + l915: + position, tokenIndex = position915, tokenIndex915 + } + l916: + { + position917, tokenIndex917 := position, tokenIndex + if !_rules[ruleWS]() { + goto l917 + } + goto l918 + l917: + position, tokenIndex = position917, tokenIndex917 + } + l918: + add(ruleS2nBignumHelper, position904) + } + return true + l903: + position, tokenIndex = position903, tokenIndex903 + return false + }, + /* 58 Offset <- <('+'? '-'? (('0' ('b' / 'B') ('0' / '1')+) / ('0' ('x' / 'X') ([0-9] / [0-9] / ([a-f] / [A-F]))+) / ((([0-9]+ WS OffsetOperator [0-9]+) / ([0-9]+ (OffsetOperator '(' [0-9]+ OffsetOperator [0-9]+ ')')?) / ([0-9]+ (OffsetOperator [0-9]+ OffsetOperator [0-9]+)?) / ([0-9]+ (OffsetOperator [0-9]+)?) / (S2nBignumHelper S2nBignumHelper (S2nBignumHelper ([0-9]+ OffsetOperator)? [0-9]+ OffsetOperator)? [0-9]+) / (S2nBignumHelper [0-9]+ ((WS? OffsetOperator [0-9]+ (WS? OffsetOperator [0-9]+)?) / !'x')) / S2nBignumHelper / ('(' [0-9]+ WS? OffsetOperator WS? [0-9]+ WS? OffsetOperator WS? [0-9]+ ')')) !([a-z] / [A-Z]))))> */ + func() bool { + position919, tokenIndex919 := position, tokenIndex + { + position920 := position + { + position921, tokenIndex921 := position, tokenIndex + if buffer[position] != rune('+') { + goto l921 + } + position++ + goto l922 + l921: + position, tokenIndex = position921, tokenIndex921 + } + l922: + { + position923, tokenIndex923 := position, tokenIndex + if buffer[position] != rune('-') { + goto l923 + } + position++ + goto l924 + l923: + position, tokenIndex = position923, tokenIndex923 + } + l924: + { + position925, tokenIndex925 := position, tokenIndex if buffer[position] != rune('0') { - goto l910 + goto l926 } position++ { - position911, tokenIndex911 := position, tokenIndex + position927, tokenIndex927 := position, tokenIndex if buffer[position] != rune('b') { - goto l912 + goto l928 } position++ - goto l911 - l912: - position, tokenIndex = position911, tokenIndex911 + goto l927 + l928: + position, tokenIndex = position927, tokenIndex927 if buffer[position] != rune('B') { - goto l910 + goto l926 } position++ } - l911: + l927: { - position915, tokenIndex915 := position, tokenIndex + position931, tokenIndex931 := position, tokenIndex if buffer[position] != rune('0') { - goto l916 + goto l932 } position++ - goto l915 - l916: - position, tokenIndex = position915, tokenIndex915 + goto l931 + l932: + position, tokenIndex = position931, tokenIndex931 if buffer[position] != rune('1') { - goto l910 + goto l926 } position++ } - l915: - l913: + l931: + l929: { - position914, tokenIndex914 := position, tokenIndex + position930, tokenIndex930 := position, tokenIndex { - position917, tokenIndex917 := position, tokenIndex + position933, tokenIndex933 := position, tokenIndex if buffer[position] != rune('0') { - goto l918 + goto l934 } position++ - goto l917 - l918: - position, tokenIndex = position917, tokenIndex917 + goto l933 + l934: + position, tokenIndex = position933, tokenIndex933 if buffer[position] != rune('1') { - goto l914 + goto l930 } position++ } - l917: - goto l913 - l914: - position, tokenIndex = position914, tokenIndex914 + l933: + goto l929 + l930: + position, tokenIndex = position930, tokenIndex930 } - goto l909 - l910: - position, tokenIndex = position909, tokenIndex909 + goto l925 + l926: + position, tokenIndex = position925, tokenIndex925 if buffer[position] != rune('0') { - goto l919 + goto l935 } position++ { - position920, tokenIndex920 := position, tokenIndex + position936, tokenIndex936 := position, tokenIndex if buffer[position] != rune('x') { - goto l921 + goto l937 } position++ - goto l920 - l921: - position, tokenIndex = position920, tokenIndex920 + goto l936 + l937: + position, tokenIndex = position936, tokenIndex936 if buffer[position] != rune('X') { - goto l919 + goto l935 } position++ } - l920: + l936: { - position924, tokenIndex924 := position, tokenIndex + position940, tokenIndex940 := position, tokenIndex if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l925 + goto l941 } position++ - goto l924 - l925: - position, tokenIndex = position924, tokenIndex924 + goto l940 + l941: + position, tokenIndex = position940, tokenIndex940 if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l926 + goto l942 } position++ - goto l924 - l926: - position, tokenIndex = position924, tokenIndex924 + goto l940 + l942: + position, tokenIndex = position940, tokenIndex940 { - position927, tokenIndex927 := position, tokenIndex + position943, tokenIndex943 := position, tokenIndex if c := buffer[position]; c < rune('a') || c > rune('f') { - goto l928 + goto l944 } position++ - goto l927 - l928: - position, tokenIndex = position927, tokenIndex927 + goto l943 + l944: + position, tokenIndex = position943, tokenIndex943 if c := buffer[position]; c < rune('A') || c > rune('F') { - goto l919 + goto l935 } position++ } - l927: + l943: } - l924: - l922: + l940: + l938: { - position923, tokenIndex923 := position, tokenIndex + position939, tokenIndex939 := position, tokenIndex { - position929, tokenIndex929 := position, tokenIndex + position945, tokenIndex945 := position, tokenIndex if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l930 + goto l946 } position++ - goto l929 - l930: - position, tokenIndex = position929, tokenIndex929 + goto l945 + l946: + position, tokenIndex = position945, tokenIndex945 if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l931 + goto l947 } position++ - goto l929 - l931: - position, tokenIndex = position929, tokenIndex929 + goto l945 + l947: + position, tokenIndex = position945, tokenIndex945 { - position932, tokenIndex932 := position, tokenIndex + position948, tokenIndex948 := position, tokenIndex if c := buffer[position]; c < rune('a') || c > rune('f') { - goto l933 + goto l949 } position++ - goto l932 - l933: - position, tokenIndex = position932, tokenIndex932 + goto l948 + l949: + position, tokenIndex = position948, tokenIndex948 if c := buffer[position]; c < rune('A') || c > rune('F') { - goto l923 + goto l939 } position++ } - l932: + l948: } - l929: - goto l922 - l923: - position, tokenIndex = position923, tokenIndex923 + l945: + goto l938 + l939: + position, tokenIndex = position939, tokenIndex939 } - goto l909 - l919: - position, tokenIndex = position909, tokenIndex909 + goto l925 + l935: + position, tokenIndex = position925, tokenIndex925 { - position934, tokenIndex934 := position, tokenIndex + position950, tokenIndex950 := position, tokenIndex if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l935 + goto l951 } position++ - l936: + l952: { - position937, tokenIndex937 := position, tokenIndex + position953, tokenIndex953 := position, tokenIndex if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l937 + goto l953 } position++ - goto l936 - l937: - position, tokenIndex = position937, tokenIndex937 + goto l952 + l953: + position, tokenIndex = position953, tokenIndex953 } if !_rules[ruleWS]() { - goto l935 + goto l951 } if !_rules[ruleOffsetOperator]() { - goto l935 + goto l951 } if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l935 + goto l951 } position++ - l938: + l954: { - position939, tokenIndex939 := position, tokenIndex + position955, tokenIndex955 := position, tokenIndex if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l939 + goto l955 } position++ - goto l938 - l939: - position, tokenIndex = position939, tokenIndex939 + goto l954 + l955: + position, tokenIndex = position955, tokenIndex955 } - goto l934 - l935: - position, tokenIndex = position934, tokenIndex934 + goto l950 + l951: + position, tokenIndex = position950, tokenIndex950 if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l940 + goto l956 } position++ - l941: + l957: { - position942, tokenIndex942 := position, tokenIndex + position958, tokenIndex958 := position, tokenIndex if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l942 + goto l958 } position++ - goto l941 - l942: - position, tokenIndex = position942, tokenIndex942 + goto l957 + l958: + position, tokenIndex = position958, tokenIndex958 } { - position943, tokenIndex943 := position, tokenIndex + position959, tokenIndex959 := position, tokenIndex if !_rules[ruleOffsetOperator]() { - goto l943 + goto l959 } if buffer[position] != rune('(') { - goto l943 + goto l959 } position++ if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l943 + goto l959 } position++ - l945: + l961: { - position946, tokenIndex946 := position, tokenIndex + position962, tokenIndex962 := position, tokenIndex if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l946 + goto l962 } position++ - goto l945 - l946: - position, tokenIndex = position946, tokenIndex946 + goto l961 + l962: + position, tokenIndex = position962, tokenIndex962 } if !_rules[ruleOffsetOperator]() { - goto l943 + goto l959 } if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l943 + goto l959 } position++ - l947: + l963: { - position948, tokenIndex948 := position, tokenIndex + position964, tokenIndex964 := position, tokenIndex if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l948 + goto l964 } position++ - goto l947 - l948: - position, tokenIndex = position948, tokenIndex948 + goto l963 + l964: + position, tokenIndex = position964, tokenIndex964 } if buffer[position] != rune(')') { - goto l943 + goto l959 } position++ - goto l944 - l943: - position, tokenIndex = position943, tokenIndex943 - } - l944: - goto l934 - l940: - position, tokenIndex = position934, tokenIndex934 + goto l960 + l959: + position, tokenIndex = position959, tokenIndex959 + } + l960: + goto l950 + l956: + position, tokenIndex = position950, tokenIndex950 if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l949 + goto l965 } position++ - l950: + l966: { - position951, tokenIndex951 := position, tokenIndex + position967, tokenIndex967 := position, tokenIndex if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l951 + goto l967 } position++ - goto l950 - l951: - position, tokenIndex = position951, tokenIndex951 + goto l966 + l967: + position, tokenIndex = position967, tokenIndex967 } { - position952, tokenIndex952 := position, tokenIndex - if !_rules[ruleOffsetOperator]() { - goto l952 - } - if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l952 - } - position++ - l954: - { - position955, tokenIndex955 := position, tokenIndex - if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l955 - } - position++ - goto l954 - l955: - position, tokenIndex = position955, tokenIndex955 - } + position968, tokenIndex968 := position, tokenIndex if !_rules[ruleOffsetOperator]() { - goto l952 + goto l968 } if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l952 + goto l968 } position++ - l956: + l970: { - position957, tokenIndex957 := position, tokenIndex + position971, tokenIndex971 := position, tokenIndex if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l957 + goto l971 } position++ - goto l956 - l957: - position, tokenIndex = position957, tokenIndex957 - } - goto l953 - l952: - position, tokenIndex = position952, tokenIndex952 - } - l953: - goto l934 - l949: - position, tokenIndex = position934, tokenIndex934 - if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l958 - } - position++ - l959: - { - position960, tokenIndex960 := position, tokenIndex - if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l960 + goto l970 + l971: + position, tokenIndex = position971, tokenIndex971 } - position++ - goto l959 - l960: - position, tokenIndex = position960, tokenIndex960 - } - { - position961, tokenIndex961 := position, tokenIndex if !_rules[ruleOffsetOperator]() { - goto l961 + goto l968 } if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l961 + goto l968 } position++ - l963: + l972: { - position964, tokenIndex964 := position, tokenIndex + position973, tokenIndex973 := position, tokenIndex if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l964 + goto l973 } position++ - goto l963 - l964: - position, tokenIndex = position964, tokenIndex964 - } - goto l962 - l961: - position, tokenIndex = position961, tokenIndex961 - } - l962: - goto l934 - l958: - position, tokenIndex = position934, tokenIndex934 - if buffer[position] != rune('(') { - goto l965 - } - position++ - if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l965 - } - position++ - l966: - { - position967, tokenIndex967 := position, tokenIndex - if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l967 - } - position++ - goto l966 - l967: - position, tokenIndex = position967, tokenIndex967 - } - { - position968, tokenIndex968 := position, tokenIndex - if !_rules[ruleWS]() { - goto l968 + goto l972 + l973: + position, tokenIndex = position973, tokenIndex973 } goto l969 l968: position, tokenIndex = position968, tokenIndex968 } l969: - if !_rules[ruleOffsetOperator]() { - goto l965 - } - { - position970, tokenIndex970 := position, tokenIndex - if !_rules[ruleWS]() { - goto l970 - } - goto l971 - l970: - position, tokenIndex = position970, tokenIndex970 - } - l971: - if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l965 - } - position++ - l972: - { - position973, tokenIndex973 := position, tokenIndex - if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l973 - } - position++ - goto l972 - l973: - position, tokenIndex = position973, tokenIndex973 - } - if buffer[position] != rune(')') { - goto l965 - } - position++ - if !_rules[ruleOffsetOperator]() { - goto l965 - } + goto l950 + l965: + position, tokenIndex = position950, tokenIndex950 if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l965 + goto l974 } position++ - l974: + l975: { - position975, tokenIndex975 := position, tokenIndex + position976, tokenIndex976 := position, tokenIndex if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l975 + goto l976 } position++ - goto l974 - l975: - position, tokenIndex = position975, tokenIndex975 - } - if !_rules[ruleOffsetOperator]() { - goto l965 - } - if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l965 + goto l975 + l976: + position, tokenIndex = position976, tokenIndex976 } - position++ - l976: { position977, tokenIndex977 := position, tokenIndex + if !_rules[ruleOffsetOperator]() { + goto l977 + } if c := buffer[position]; c < rune('0') || c > rune('9') { goto l977 } position++ - goto l976 + l979: + { + position980, tokenIndex980 := position, tokenIndex + if c := buffer[position]; c < rune('0') || c > rune('9') { + goto l980 + } + position++ + goto l979 + l980: + position, tokenIndex = position980, tokenIndex980 + } + goto l978 l977: position, tokenIndex = position977, tokenIndex977 } - goto l934 - l965: - position, tokenIndex = position934, tokenIndex934 - if buffer[position] != rune('(') { - goto l978 + l978: + goto l950 + l974: + position, tokenIndex = position950, tokenIndex950 + if !_rules[ruleS2nBignumHelper]() { + goto l981 } - position++ - if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l978 + if !_rules[ruleS2nBignumHelper]() { + goto l981 } - position++ - l979: { - position980, tokenIndex980 := position, tokenIndex + position982, tokenIndex982 := position, tokenIndex + if !_rules[ruleS2nBignumHelper]() { + goto l982 + } + { + position984, tokenIndex984 := position, tokenIndex + if c := buffer[position]; c < rune('0') || c > rune('9') { + goto l984 + } + position++ + l986: + { + position987, tokenIndex987 := position, tokenIndex + if c := buffer[position]; c < rune('0') || c > rune('9') { + goto l987 + } + position++ + goto l986 + l987: + position, tokenIndex = position987, tokenIndex987 + } + if !_rules[ruleOffsetOperator]() { + goto l984 + } + goto l985 + l984: + position, tokenIndex = position984, tokenIndex984 + } + l985: if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l980 + goto l982 } position++ - goto l979 - l980: - position, tokenIndex = position980, tokenIndex980 - } - { - position981, tokenIndex981 := position, tokenIndex - if !_rules[ruleWS]() { - goto l981 + l988: + { + position989, tokenIndex989 := position, tokenIndex + if c := buffer[position]; c < rune('0') || c > rune('9') { + goto l989 + } + position++ + goto l988 + l989: + position, tokenIndex = position989, tokenIndex989 } - goto l982 - l981: - position, tokenIndex = position981, tokenIndex981 - } - l982: - if !_rules[ruleOffsetOperator]() { - goto l978 - } - { - position983, tokenIndex983 := position, tokenIndex - if !_rules[ruleWS]() { - goto l983 + if !_rules[ruleOffsetOperator]() { + goto l982 } - goto l984 - l983: - position, tokenIndex = position983, tokenIndex983 + goto l983 + l982: + position, tokenIndex = position982, tokenIndex982 } - l984: + l983: if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l978 + goto l981 } position++ - l985: + l990: { - position986, tokenIndex986 := position, tokenIndex + position991, tokenIndex991 := position, tokenIndex if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l986 + goto l991 } position++ - goto l985 - l986: - position, tokenIndex = position986, tokenIndex986 + goto l990 + l991: + position, tokenIndex = position991, tokenIndex991 } - if buffer[position] != rune(')') { - goto l978 - } - position++ - if !_rules[ruleOffsetOperator]() { - goto l978 + goto l950 + l981: + position, tokenIndex = position950, tokenIndex950 + if !_rules[ruleS2nBignumHelper]() { + goto l992 } if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l978 + goto l992 } position++ - l987: + l993: { - position988, tokenIndex988 := position, tokenIndex + position994, tokenIndex994 := position, tokenIndex if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l988 + goto l994 } position++ - goto l987 - l988: - position, tokenIndex = position988, tokenIndex988 + goto l993 + l994: + position, tokenIndex = position994, tokenIndex994 } { - position989, tokenIndex989 := position, tokenIndex - if buffer[position] != rune('x') { - goto l989 + position995, tokenIndex995 := position, tokenIndex + { + position997, tokenIndex997 := position, tokenIndex + if !_rules[ruleWS]() { + goto l997 + } + goto l998 + l997: + position, tokenIndex = position997, tokenIndex997 + } + l998: + if !_rules[ruleOffsetOperator]() { + goto l996 } - position++ - goto l978 - l989: - position, tokenIndex = position989, tokenIndex989 - } - goto l934 - l978: - position, tokenIndex = position934, tokenIndex934 - if buffer[position] != rune('(') { - goto l990 - } - position++ - if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l990 - } - position++ - l991: - { - position992, tokenIndex992 := position, tokenIndex if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l992 + goto l996 } position++ - goto l991 - l992: - position, tokenIndex = position992, tokenIndex992 - } - { - position993, tokenIndex993 := position, tokenIndex - if !_rules[ruleWS]() { - goto l993 + l999: + { + position1000, tokenIndex1000 := position, tokenIndex + if c := buffer[position]; c < rune('0') || c > rune('9') { + goto l1000 + } + position++ + goto l999 + l1000: + position, tokenIndex = position1000, tokenIndex1000 } - goto l994 - l993: - position, tokenIndex = position993, tokenIndex993 - } - l994: - if !_rules[ruleOffsetOperator]() { - goto l990 - } - { - position995, tokenIndex995 := position, tokenIndex - if !_rules[ruleWS]() { - goto l995 + { + position1001, tokenIndex1001 := position, tokenIndex + { + position1003, tokenIndex1003 := position, tokenIndex + if !_rules[ruleWS]() { + goto l1003 + } + goto l1004 + l1003: + position, tokenIndex = position1003, tokenIndex1003 + } + l1004: + if !_rules[ruleOffsetOperator]() { + goto l1001 + } + if c := buffer[position]; c < rune('0') || c > rune('9') { + goto l1001 + } + position++ + l1005: + { + position1006, tokenIndex1006 := position, tokenIndex + if c := buffer[position]; c < rune('0') || c > rune('9') { + goto l1006 + } + position++ + goto l1005 + l1006: + position, tokenIndex = position1006, tokenIndex1006 + } + goto l1002 + l1001: + position, tokenIndex = position1001, tokenIndex1001 } - goto l996 - l995: + l1002: + goto l995 + l996: position, tokenIndex = position995, tokenIndex995 - } - l996: - if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l990 - } - position++ - l997: - { - position998, tokenIndex998 := position, tokenIndex - if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l998 + { + position1007, tokenIndex1007 := position, tokenIndex + if buffer[position] != rune('x') { + goto l1007 + } + position++ + goto l992 + l1007: + position, tokenIndex = position1007, tokenIndex1007 } - position++ - goto l997 - l998: - position, tokenIndex = position998, tokenIndex998 } - if buffer[position] != rune(')') { - goto l990 + l995: + goto l950 + l992: + position, tokenIndex = position950, tokenIndex950 + if !_rules[ruleS2nBignumHelper]() { + goto l1008 } - position++ - goto l934 - l990: - position, tokenIndex = position934, tokenIndex934 + goto l950 + l1008: + position, tokenIndex = position950, tokenIndex950 if buffer[position] != rune('(') { - goto l903 + goto l919 } position++ if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l903 + goto l919 } position++ - l999: + l1009: { - position1000, tokenIndex1000 := position, tokenIndex + position1010, tokenIndex1010 := position, tokenIndex if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l1000 + goto l1010 } position++ - goto l999 - l1000: - position, tokenIndex = position1000, tokenIndex1000 + goto l1009 + l1010: + position, tokenIndex = position1010, tokenIndex1010 } { - position1001, tokenIndex1001 := position, tokenIndex + position1011, tokenIndex1011 := position, tokenIndex if !_rules[ruleWS]() { - goto l1001 + goto l1011 } - goto l1002 - l1001: - position, tokenIndex = position1001, tokenIndex1001 + goto l1012 + l1011: + position, tokenIndex = position1011, tokenIndex1011 } - l1002: + l1012: if !_rules[ruleOffsetOperator]() { - goto l903 + goto l919 } { - position1003, tokenIndex1003 := position, tokenIndex + position1013, tokenIndex1013 := position, tokenIndex if !_rules[ruleWS]() { - goto l1003 + goto l1013 } - goto l1004 - l1003: - position, tokenIndex = position1003, tokenIndex1003 + goto l1014 + l1013: + position, tokenIndex = position1013, tokenIndex1013 } - l1004: + l1014: if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l903 + goto l919 } position++ - l1005: + l1015: { - position1006, tokenIndex1006 := position, tokenIndex + position1016, tokenIndex1016 := position, tokenIndex if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l1006 + goto l1016 } position++ - goto l1005 - l1006: - position, tokenIndex = position1006, tokenIndex1006 + goto l1015 + l1016: + position, tokenIndex = position1016, tokenIndex1016 } { - position1007, tokenIndex1007 := position, tokenIndex + position1017, tokenIndex1017 := position, tokenIndex if !_rules[ruleWS]() { - goto l1007 + goto l1017 } - goto l1008 - l1007: - position, tokenIndex = position1007, tokenIndex1007 + goto l1018 + l1017: + position, tokenIndex = position1017, tokenIndex1017 } - l1008: + l1018: if !_rules[ruleOffsetOperator]() { - goto l903 + goto l919 } { - position1009, tokenIndex1009 := position, tokenIndex + position1019, tokenIndex1019 := position, tokenIndex if !_rules[ruleWS]() { - goto l1009 + goto l1019 } - goto l1010 - l1009: - position, tokenIndex = position1009, tokenIndex1009 + goto l1020 + l1019: + position, tokenIndex = position1019, tokenIndex1019 } - l1010: + l1020: if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l903 + goto l919 } position++ - l1011: + l1021: { - position1012, tokenIndex1012 := position, tokenIndex + position1022, tokenIndex1022 := position, tokenIndex if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l1012 + goto l1022 } position++ - goto l1011 - l1012: - position, tokenIndex = position1012, tokenIndex1012 + goto l1021 + l1022: + position, tokenIndex = position1022, tokenIndex1022 } if buffer[position] != rune(')') { - goto l903 + goto l919 } position++ } - l934: + l950: { - position1013, tokenIndex1013 := position, tokenIndex + position1023, tokenIndex1023 := position, tokenIndex { - position1014, tokenIndex1014 := position, tokenIndex + position1024, tokenIndex1024 := position, tokenIndex if c := buffer[position]; c < rune('a') || c > rune('z') { - goto l1015 + goto l1025 } position++ - goto l1014 - l1015: - position, tokenIndex = position1014, tokenIndex1014 + goto l1024 + l1025: + position, tokenIndex = position1024, tokenIndex1024 if c := buffer[position]; c < rune('A') || c > rune('Z') { - goto l1013 + goto l1023 } position++ } - l1014: - goto l903 - l1013: - position, tokenIndex = position1013, tokenIndex1013 + l1024: + goto l919 + l1023: + position, tokenIndex = position1023, tokenIndex1023 } } - l909: - add(ruleOffset, position904) + l925: + add(ruleOffset, position920) } return true - l903: - position, tokenIndex = position903, tokenIndex903 + l919: + position, tokenIndex = position919, tokenIndex919 return false }, - /* 58 Section <- <([a-z] / [A-Z] / '@')+> */ + /* 59 Section <- <([a-z] / [A-Z] / '@')+> */ func() bool { - position1016, tokenIndex1016 := position, tokenIndex + position1026, tokenIndex1026 := position, tokenIndex { - position1017 := position + position1027 := position { - position1020, tokenIndex1020 := position, tokenIndex + position1030, tokenIndex1030 := position, tokenIndex if c := buffer[position]; c < rune('a') || c > rune('z') { - goto l1021 + goto l1031 } position++ - goto l1020 - l1021: - position, tokenIndex = position1020, tokenIndex1020 + goto l1030 + l1031: + position, tokenIndex = position1030, tokenIndex1030 if c := buffer[position]; c < rune('A') || c > rune('Z') { - goto l1022 + goto l1032 } position++ - goto l1020 - l1022: - position, tokenIndex = position1020, tokenIndex1020 + goto l1030 + l1032: + position, tokenIndex = position1030, tokenIndex1030 if buffer[position] != rune('@') { - goto l1016 + goto l1026 } position++ } - l1020: - l1018: + l1030: + l1028: { - position1019, tokenIndex1019 := position, tokenIndex + position1029, tokenIndex1029 := position, tokenIndex { - position1023, tokenIndex1023 := position, tokenIndex + position1033, tokenIndex1033 := position, tokenIndex if c := buffer[position]; c < rune('a') || c > rune('z') { - goto l1024 + goto l1034 } position++ - goto l1023 - l1024: - position, tokenIndex = position1023, tokenIndex1023 + goto l1033 + l1034: + position, tokenIndex = position1033, tokenIndex1033 if c := buffer[position]; c < rune('A') || c > rune('Z') { - goto l1025 + goto l1035 } position++ - goto l1023 - l1025: - position, tokenIndex = position1023, tokenIndex1023 + goto l1033 + l1035: + position, tokenIndex = position1033, tokenIndex1033 if buffer[position] != rune('@') { - goto l1019 + goto l1029 } position++ } - l1023: - goto l1018 - l1019: - position, tokenIndex = position1019, tokenIndex1019 + l1033: + goto l1028 + l1029: + position, tokenIndex = position1029, tokenIndex1029 } - add(ruleSection, position1017) + add(ruleSection, position1027) } return true - l1016: - position, tokenIndex = position1016, tokenIndex1016 + l1026: + position, tokenIndex = position1026, tokenIndex1026 return false }, - /* 59 SegmentRegister <- <('%' ([c-g] / 's') ('s' ':'))> */ + /* 60 SegmentRegister <- <('%' ([c-g] / 's') ('s' ':'))> */ func() bool { - position1026, tokenIndex1026 := position, tokenIndex + position1036, tokenIndex1036 := position, tokenIndex { - position1027 := position + position1037 := position if buffer[position] != rune('%') { - goto l1026 + goto l1036 } position++ { - position1028, tokenIndex1028 := position, tokenIndex + position1038, tokenIndex1038 := position, tokenIndex if c := buffer[position]; c < rune('c') || c > rune('g') { - goto l1029 + goto l1039 } position++ - goto l1028 - l1029: - position, tokenIndex = position1028, tokenIndex1028 + goto l1038 + l1039: + position, tokenIndex = position1038, tokenIndex1038 if buffer[position] != rune('s') { - goto l1026 + goto l1036 } position++ } - l1028: + l1038: if buffer[position] != rune('s') { - goto l1026 + goto l1036 } position++ if buffer[position] != rune(':') { - goto l1026 + goto l1036 } position++ - add(ruleSegmentRegister, position1027) + add(ruleSegmentRegister, position1037) } return true - l1026: - position, tokenIndex = position1026, tokenIndex1026 + l1036: + position, tokenIndex = position1036, tokenIndex1036 return false }, }