diff --git a/go.mod b/go.mod
index 189d7a32..78783a7f 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.19
require (
github.com/gin-contrib/cors v1.5.0
github.com/gin-contrib/requestid v0.0.6
- github.com/gin-contrib/zap v0.2.0
+ github.com/gin-contrib/zap v1.1.0
github.com/gin-gonic/gin v1.9.1
github.com/go-rel/mysql v0.12.0
github.com/go-rel/rel v0.41.0
@@ -16,38 +16,38 @@ require (
)
require (
- github.com/bytedance/sonic v1.10.1 // indirect
+ github.com/bytedance/sonic v1.11.2 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
- github.com/chenzhuoyu/iasm v0.9.0 // indirect
+ github.com/chenzhuoyu/iasm v0.9.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
- github.com/gabriel-vasile/mimetype v1.4.2 // indirect
+ github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
- github.com/go-playground/validator/v10 v10.15.5 // indirect
+ github.com/go-playground/validator/v10 v10.18.0 // indirect
github.com/go-rel/sql v0.16.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
- github.com/klauspost/cpuid/v2 v2.2.5 // indirect
- github.com/leodido/go-urn v1.2.4 // indirect
- github.com/mattn/go-isatty v0.0.19 // indirect
+ github.com/klauspost/cpuid/v2 v2.2.7 // indirect
+ github.com/leodido/go-urn v1.4.0 // indirect
+ github.com/mattn/go-isatty v0.0.20 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/pelletier/go-toml/v2 v2.1.0 // indirect
+ github.com/pelletier/go-toml/v2 v2.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/serenize/snaker v0.0.0-20201027110005-a7ad2135616e // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
- github.com/ugorji/go/codec v1.2.11 // indirect
+ github.com/ugorji/go/codec v1.2.12 // indirect
go.uber.org/multierr v1.11.0 // indirect
- golang.org/x/arch v0.5.0 // indirect
- golang.org/x/crypto v0.17.0 // indirect
- golang.org/x/net v0.17.0 // indirect
- golang.org/x/sys v0.15.0 // indirect
+ golang.org/x/arch v0.7.0 // indirect
+ golang.org/x/crypto v0.20.0 // indirect
+ golang.org/x/net v0.21.0 // indirect
+ golang.org/x/sys v0.17.0 // indirect
golang.org/x/text v0.14.0 // indirect
- google.golang.org/protobuf v1.31.0 // indirect
+ google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
diff --git a/go.sum b/go.sum
index 4b921900..5f1114ae 100644
--- a/go.sum
+++ b/go.sum
@@ -1,28 +1,29 @@
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM=
-github.com/bytedance/sonic v1.10.1 h1:7a1wuFXL1cMy7a3f7/VFcEtriuXQnUBhtoVfOZiaysc=
-github.com/bytedance/sonic v1.10.1/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4=
+github.com/bytedance/sonic v1.11.2 h1:ywfwo0a/3j9HR8wsYGWsIWl2mvRsI950HyoxiBERw5A=
+github.com/bytedance/sonic v1.11.2/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4=
github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0=
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA=
-github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo=
github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog=
+github.com/chenzhuoyu/iasm v0.9.1 h1:tUHQJXo3NhBqw6s33wkGn9SP3bvrWLdlVIJ3hQBL7P0=
+github.com/chenzhuoyu/iasm v0.9.1/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
-github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
-github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
+github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
+github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
github.com/gin-contrib/cors v1.5.0 h1:DgGKV7DDoOn36DFkNtbHrjoRiT5ExCe+PC9/xp7aKvk=
github.com/gin-contrib/cors v1.5.0/go.mod h1:TvU7MAZ3EwrPLI2ztzTt3tqgvBCq+wn8WpZmfADjupI=
github.com/gin-contrib/requestid v0.0.6 h1:mGcxTnHQ45F6QU5HQRgQUDsAfHprD3P7g2uZ4cSZo9o=
github.com/gin-contrib/requestid v0.0.6/go.mod h1:9i4vKATX/CdggbkY252dPVasgVucy/ggBeELXuQztm4=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
-github.com/gin-contrib/zap v0.2.0 h1:HLvt3rZXyC8XC+s2lHzMFow3UDqiEbfrBWJyHHS6L8A=
-github.com/gin-contrib/zap v0.2.0/go.mod h1:eqfbe9ZmI+GgTZF6nRiC2ZwDeM4DK1Viwc8OxTCphh0=
+github.com/gin-contrib/zap v1.1.0 h1:GWzL9+zmK8OJdiycaK2SK1/D3SZIYpieJDD0QCNAU1o=
+github.com/gin-contrib/zap v1.1.0/go.mod h1:KzROP9rAL7ofFd1P8lx7Oo2lerwPWNL5vv4f6U/mAk8=
github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk=
github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
@@ -35,8 +36,8 @@ github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos=
-github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24=
-github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
+github.com/go-playground/validator/v10 v10.18.0 h1:BvolUXjp4zuvkZ5YN5t7ebzbhlUtPsPm2S9NAZ5nl9U=
+github.com/go-playground/validator/v10 v10.18.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
github.com/go-rel/mysql v0.12.0 h1:GMwNktroIgA5a8AMxSj6MnnobXqZ85LnjPjtV0OU3Pc=
github.com/go-rel/mysql v0.12.0/go.mod h1:Q1Xa47BIyoeDfv5nFXo6VCEWwjpWpOX5wJnUAYOz4HA=
github.com/go-rel/primaryreplica v0.6.0 h1:8ZlgUatz+Ger+d51aIvlDWK3iZSa2RwD6ys3cingyf0=
@@ -63,8 +64,8 @@ github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkr
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
-github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg=
-github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
+github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=
+github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
@@ -75,11 +76,11 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
-github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
-github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
+github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
+github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
-github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
-github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
+github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
+github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -89,8 +90,8 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/onsi/ginkgo v1.15.0 h1:1V1NfVQR87RtWAgp1lv9JZJ5Jap+XFGKPi00andXGi4=
github.com/onsi/gomega v1.10.5 h1:7n6FEkpFmfCoo2t+YYqXH0evK+a9ICQz0xcAy9dYcaQ=
github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo=
-github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
-github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
+github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI=
+github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@@ -110,7 +111,6 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
-github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
@@ -118,30 +118,30 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
-github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
-github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
+github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=
+github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
-golang.org/x/arch v0.5.0 h1:jpGode6huXQxcskEIpOCvrU+tzo81b6+oFLUYXWtH/Y=
-golang.org/x/arch v0.5.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
+golang.org/x/arch v0.7.0 h1:pskyeJh/3AmoQ8CPE95vxHLqp1G1GfGNXTmcl9NEKTc=
+golang.org/x/arch v0.7.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
-golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
-golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
+golang.org/x/crypto v0.20.0 h1:jmAMJJZXr5KiCw05dfYK9QnqaqKLYXijU23lsEdcQqg=
+golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
-golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
+golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
+golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
-golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
+golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
@@ -151,8 +151,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
-google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
-google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
+google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
diff --git a/vendor/github.com/bytedance/sonic/README.md b/vendor/github.com/bytedance/sonic/README.md
index 3486b9c4..a74fc496 100644
--- a/vendor/github.com/bytedance/sonic/README.md
+++ b/vendor/github.com/bytedance/sonic/README.md
@@ -5,18 +5,27 @@ English | [中文](README_ZH_CN.md)
A blazingly fast JSON serializing & deserializing library, accelerated by JIT (just-in-time compiling) and SIMD (single-instruction-multiple-data).
## Requirement
-- Go 1.16~1.21
+
+- Go 1.16~1.22
- Linux / MacOS / Windows(need go1.17 above)
- Amd64 ARCH
## Features
+
- Runtime object binding without code generation
- Complete APIs for JSON value manipulation
- Fast, fast, fast!
+## APIs
+
+see [go.dev](https://pkg.go.dev/github.com/bytedance/sonic)
+
## Benchmarks
+
For **all sizes** of json and **all scenarios** of usage, **Sonic performs best**.
+
- [Medium](https://github.com/bytedance/sonic/blob/main/decoder/testdata_test.go#L19) (13KB, 300+ key, 6 layers)
+
```powershell
goversion: 1.17.1
goos: darwin
@@ -81,6 +90,7 @@ BenchmarkLoadNode_Parallel/LoadAll()-16 5493 ns/op 2370.6
BenchmarkLoadNode/Interface()-16 17722 ns/op 734.85 MB/s 13323 B/op 88 allocs/op
BenchmarkLoadNode_Parallel/Interface()-16 10330 ns/op 1260.70 MB/s 15178 B/op 88 allocs/op
```
+
- [Small](https://github.com/bytedance/sonic/blob/main/testdata/small.go) (400B, 11 keys, 3 layers)

- [Large](https://github.com/bytedance/sonic/blob/main/testdata/twitter.json) (635KB, 10000+ key, 6 layers)
@@ -89,6 +99,7 @@ BenchmarkLoadNode_Parallel/Interface()-16 10330 ns/op 1260.7
See [bench.sh](https://github.com/bytedance/sonic/blob/main/scripts/bench.sh) for benchmark codes.
## How it works
+
See [INTRODUCTION.md](./docs/INTRODUCTION.md).
## Usage
@@ -96,6 +107,7 @@ See [INTRODUCTION.md](./docs/INTRODUCTION.md).
### Marshal/Unmarshal
Default behaviors are mostly consistent with `encoding/json`, except HTML escaping form (see [Escape HTML](https://github.com/bytedance/sonic/blob/main/README.md#escape-html)) and `SortKeys` feature (optional support see [Sort Keys](https://github.com/bytedance/sonic/blob/main/README.md#sort-keys)) that is **NOT** in conformity to [RFC8259](https://datatracker.ietf.org/doc/html/rfc8259).
+
```go
import "github.com/bytedance/sonic"
@@ -107,8 +119,11 @@ err := sonic.Unmarshal(output, &data)
```
### Streaming IO
-Sonic supports decoding json from `io.Reader` or encoding objects into `io.`Writer`, aims at handling multiple values as well as reducing memory consumption.
+
+Sonic supports decoding json from `io.Reader` or encoding objects into `io.Writer`, aims at handling multiple values as well as reducing memory consumption.
+
- encoder
+
```go
var o1 = map[string]interface{}{
"a": "b",
@@ -123,7 +138,9 @@ fmt.Println(w.String())
// {"a":"b"}
// 1
```
+
- decoder
+
```go
var o = map[string]interface{}{}
var r = strings.NewReader(`{"a":"b"}{"1":"2"}`)
@@ -136,6 +153,7 @@ fmt.Printf("%+v", o)
```
### Use Number/Use Int64
+
```go
import "github.com/bytedance/sonic/decoder"
@@ -164,7 +182,9 @@ fm := root.Interface().(float64) // jn == jm
```
### Sort Keys
+
On account of the performance loss from sorting (roughly 10%), sonic doesn't enable this feature by default. If your component depends on it to work (like [zstd](https://github.com/facebook/zstd)), Use it like this:
+
```go
import "github.com/bytedance/sonic"
import "github.com/bytedance/sonic/encoder"
@@ -177,19 +197,26 @@ v, err := encoder.Encode(m, encoder.SortMapKeys)
var root := sonic.Get(JSON)
err := root.SortKeys()
```
+
### Escape HTML
+
On account of the performance loss (roughly 15%), sonic doesn't enable this feature by default. You can use `encoder.EscapeHTML` option to open this feature (align with `encoding/json.HTMLEscape`).
+
```go
import "github.com/bytedance/sonic"
v := map[string]string{"&&":"<>"}
ret, err := Encode(v, EscapeHTML) // ret == `{"\u0026\u0026":{"X":"\u003c\u003e"}}`
```
+
### Compact Format
+
Sonic encodes primitive objects (struct/map...) as compact-format JSON by default, except marshaling `json.RawMessage` or `json.Marshaler`: sonic ensures validating their output JSON but **DONOT** compacting them for performance concerns. We provide the option `encoder.CompactMarshaler` to add compacting process.
### Print Error
+
If there invalid syntax in input JSON, sonic will return `decoder.SyntaxError`, which supports pretty-printing of error position
+
```go
import "github.com/bytedance/sonic"
import "github.com/bytedance/sonic/decoder"
@@ -215,7 +242,9 @@ if err != nil {
```
#### Mismatched Types [Sonic v1.6.0]
+
If there a **mismatch-typed** value for a given key, sonic will report `decoder.MismatchTypeError` (if there are many, report the last one), but still skip wrong the value and keep decoding next JSON.
+
```go
import "github.com/bytedance/sonic"
import "github.com/bytedance/sonic/decoder"
@@ -228,10 +257,15 @@ err := UnmarshalString(`{"A":"1","B":1}`, &data)
println(err.Error()) // Mismatch type int with value string "at index 5: mismatched type with value\n\n\t{\"A\":\"1\",\"B\":1}\n\t.....^.........\n"
fmt.Printf("%+v", data) // {A:0 B:1}
```
+
### Ast.Node
+
Sonic/ast.Node is a completely self-contained AST for JSON. It implements serialization and deserialization both and provides robust APIs for obtaining and modification of generic data.
+
#### Get/Index
+
Search partial JSON by given paths, which must be non-negative integer or string, or nil
+
```go
import "github.com/bytedance/sonic"
@@ -245,10 +279,13 @@ raw := root.Raw() // == string(input)
root, err := sonic.Get(input, "key1", 1, "key2")
sub := root.Get("key3").Index(2).Int64() // == 3
```
+
**Tip**: since `Index()` uses offset to locate data, which is much faster than scanning like `Get()`, we suggest you use it as much as possible. And sonic also provides another API `IndexOrGet()` to underlying use offset as well as ensure the key is matched.
#### Set/Unset
+
Modify the json content by Set()/Unset()
+
```go
import "github.com/bytedance/sonic"
@@ -265,7 +302,9 @@ println(root.Get("key4").Check()) // "value not exist"
```
#### Serialize
+
To encode `ast.Node` as json, use `MarshalJson()` or `json.Marshal()` (MUST pass the node's pointer)
+
```go
import (
"encoding/json"
@@ -279,6 +318,7 @@ println(string(buf) == string(exp)) // true
```
#### APIs
+
- validation: `Check()`, `Error()`, `Valid()`, `Exist()`
- searching: `Index()`, `Get()`, `IndexPair()`, `IndexOrGet()`, `GetByPath()`
- go-type casting: `Int64()`, `Float64()`, `String()`, `Number()`, `Bool()`, `Map[UseNumber|UseNode]()`, `Array[UseNumber|UseNode]()`, `Interface[UseNumber|UseNode]()`
@@ -287,7 +327,9 @@ println(string(buf) == string(exp)) // true
- modification: `Set()`, `SetByIndex()`, `Add()`
### Ast.Visitor
+
Sonic provides an advanced API for fully parsing JSON into non-standard types (neither `struct` not `map[string]interface{}`) without using any intermediate representation (`ast.Node` or `interface{}`). For example, you might have the following types which are like `interface{}` but actually not `interface{}`:
+
```go
type UserNode interface {}
@@ -302,7 +344,9 @@ type (
UserArray struct{ Value []UserNode }
)
```
+
Sonic provides the following API to return **the preorder traversal of a JSON AST**. The `ast.Visitor` is a SAX style interface which is used in some C++ JSON library. You should implement `ast.Visitor` by yourself and pass it to `ast.Preorder()` method. In your visitor you can make your custom types to represent JSON values. There may be an O(n) space container (such as stack) in your visitor to record the object / array hierarchy.
+
```go
func Preorder(str string, visitor Visitor, opts *VisitorOptions) error
@@ -323,12 +367,14 @@ type Visitor interface {
See [ast/visitor.go](https://github.com/bytedance/sonic/blob/main/ast/visitor.go) for detailed usage. We also implement a demo visitor for `UserNode` in [ast/visitor_test.go](https://github.com/bytedance/sonic/blob/main/ast/visitor_test.go).
## Compatibility
+
Sonic **DOES NOT** ensure to support all environments, due to the difficulty of developing high-performance codes. For developers who use sonic to build their applications in different environments, we have the following suggestions:
- Developing on **Mac M1**: Make sure you have Rosetta 2 installed on your machine, and set `GOARCH=amd64` when building your application. Rosetta 2 can automatically translate x86 binaries to arm64 binaries and run x86 applications on Mac M1.
- Developing on **Linux arm64**: You can install qemu and use the `qemu-x86_64 -cpu max` command to convert x86 binaries to amr64 binaries for applications built with sonic. The qemu can achieve a similar transfer effect to Rosetta 2 on Mac M1.
For developers who want to use sonic on Linux arm64 without qemu, or those who want to handle JSON strictly consistent with `encoding/json`, we provide some compatible APIs as `sonic.API`
+
- `ConfigDefault`: the sonic's default config (`EscapeHTML=false`,`SortKeys=false`...) to run on sonic-supporting environment. It will fall back to `encoding/json` with the corresponding config, and some options like `SortKeys=false` will be invalid.
- `ConfigStd`: the std-compatible config (`EscapeHTML=true`,`SortKeys=true`...) to run on sonic-supporting environment. It will fall back to `encoding/json`.
- `ConfigFastest`: the fastest config (`NoQuoteTextMarshaler=true`) to run on sonic-supporting environment. It will fall back to `encoding/json` with the corresponding config, and some options will be invalid.
@@ -336,7 +382,9 @@ For developers who want to use sonic on Linux arm64 without qemu, or those who w
## Tips
### Pretouch
+
Since Sonic uses [golang-asm](https://github.com/twitchyliquid64/golang-asm) as a JIT assembler, which is NOT very suitable for runtime compiling, first-hit running of a huge schema may cause request-timeout or even process-OOM. For better stability, we advise **using `Pretouch()` for huge-schema or compact-memory applications** before `Marshal()/Unmarshal()`.
+
```go
import (
"reflect"
@@ -362,17 +410,23 @@ func init() {
```
### Copy string
-When decoding **string values without any escaped characters**, sonic references them from the origin JSON buffer instead of mallocing a new buffer to copy. This helps a lot for CPU performance but may leave the whole JSON buffer in memory as long as the decoded objects are being used. In practice, we found the extra memory introduced by referring JSON buffer is usually 20% ~ 80% of decoded objects. Once an application holds these objects for a long time (for example, cache the decoded objects for reusing), its in-use memory on the server may go up. We provide the option `decoder.CopyString()` for users to choose not to reference the JSON buffer, which may cause a decline in CPU performance to some degree.
+
+When decoding **string values without any escaped characters**, sonic references them from the origin JSON buffer instead of mallocing a new buffer to copy. This helps a lot for CPU performance but may leave the whole JSON buffer in memory as long as the decoded objects are being used. In practice, we found the extra memory introduced by referring JSON buffer is usually 20% ~ 80% of decoded objects. Once an application holds these objects for a long time (for example, cache the decoded objects for reusing), its in-use memory on the server may go up. - `Config.CopyString`/`decoder.CopyString()`: We provide the option for `Decode()` / `Unmarshal()` users to choose not to reference the JSON buffer, which may cause a decline in CPU performance to some degree.
+
+- `GetFromStringNoCopy()`: For memory safty, `sonic.Get()` / `sonic.GetFromString()` now copies return JSON. If users want to get json more quickly and not care about memory usage, you can use `GetFromStringNoCopy()` to return a JSON direclty referenced from source.
### Pass string or []byte?
+
For alignment to `encoding/json`, we provide API to pass `[]byte` as an argument, but the string-to-bytes copy is conducted at the same time considering safety, which may lose performance when the origin JSON is huge. Therefore, you can use `UnmarshalString()` and `GetFromString()` to pass a string, as long as your origin data is a string or **nocopy-cast** is safe for your []byte. We also provide API `MarshalString()` for convenient **nocopy-cast** of encoded JSON []byte, which is safe since sonic's output bytes is always duplicated and unique.
### Accelerate `encoding.TextMarshaler`
-To ensure data security, sonic.Encoder quotes and escapes string values from `encoding.TextMarshaler` interfaces by default, which may degrade performance much if most of your data is in form of them. We provide `encoder.NoQuoteTextMarshaler` to skip these operations, which means you **MUST** ensure their output string escaped and quoted following [RFC8259](https://datatracker.ietf.org/doc/html/rfc8259).
+To ensure data security, sonic.Encoder quotes and escapes string values from `encoding.TextMarshaler` interfaces by default, which may degrade performance much if most of your data is in form of them. We provide `encoder.NoQuoteTextMarshaler` to skip these operations, which means you **MUST** ensure their output string escaped and quoted following [RFC8259](https://datatracker.ietf.org/doc/html/rfc8259).
### Better performance for generic data
+
In **fully-parsed** scenario, `Unmarshal()` performs better than `Get()`+`Node.Interface()`. But if you only have a part of the schema for specific json, you can combine `Get()` and `Unmarshal()` together:
+
```go
import "github.com/bytedance/sonic"
@@ -380,7 +434,9 @@ node, err := sonic.GetFromString(_TwitterJson, "statuses", 3, "user")
var user User // your partial schema...
err = sonic.UnmarshalString(node.Raw(), &user)
```
+
Even if you don't have any schema, use `ast.Node` as the container of generic values instead of `map` or `interface`:
+
```go
import "github.com/bytedance/sonic"
@@ -391,7 +447,9 @@ err = user.Check()
// err = user.LoadAll() // only call this when you want to use 'user' concurrently...
go someFunc(user)
```
+
Why? Because `ast.Node` stores its children using `array`:
+
- `Array`'s performance is **much better** than `Map` when Inserting (Deserialize) and Scanning (Serialize) data;
- **Hashing** (`map[x]`) is not as efficient as **Indexing** (`array[x]`), which `ast.Node` can conduct on **both array and object**;
- Using `Interface()`/`Map()` means Sonic must parse all the underlying values, while `ast.Node` can parse them **on demand**.
@@ -399,6 +457,7 @@ Why? Because `ast.Node` stores its children using `array`:
**CAUTION:** `ast.Node` **DOESN'T** ensure concurrent security directly, due to its **lazy-load** design. However, you can call `Node.Load()`/`Node.LoadAll()` to achieve that, which may bring performance reduction while it still works faster than converting to `map` or `interface{}`
### Ast.Node or Ast.Visitor?
+
For generic data, `ast.Node` should be enough for your needs in most cases.
However, `ast.Node` is designed for partially processing JSON string. It has some special designs such as lazy-load which might not be suitable for directly parsing the whole JSON string like `Unmarshal()`. Although `ast.Node` is better then `map` or `interface{}`, it's also a kind of intermediate representation after all if your final types are customized and you have to convert the above types to your custom types after parsing.
@@ -408,4 +467,5 @@ For better performance, in previous case the `ast.Visitor` will be the better ch
But `ast.Visitor` is not a very handy API. You might need to write a lot of code to implement your visitor and carefully maintain the tree hierarchy during decoding. Please read the comments in [ast/visitor.go](https://github.com/bytedance/sonic/blob/main/ast/visitor.go) carefully if you decide to use this API.
## Community
+
Sonic is a subproject of [CloudWeGo](https://www.cloudwego.io/). We are committed to building a cloud native ecosystem.
diff --git a/vendor/github.com/bytedance/sonic/README_ZH_CN.md b/vendor/github.com/bytedance/sonic/README_ZH_CN.md
index a18e99af..d0341ab7 100644
--- a/vendor/github.com/bytedance/sonic/README_ZH_CN.md
+++ b/vendor/github.com/bytedance/sonic/README_ZH_CN.md
@@ -6,10 +6,14 @@
## 依赖
-- Go 1.16~1.21
+- Go 1.16~1.22
- Linux / MacOS / Windows(需要 Go1.17 以上)
- Amd64 架构
+## 接口
+
+详见 [go.dev](https://pkg.go.dev/github.com/bytedance/sonic)
+
## 特色
- 运行时对象绑定,无需代码生成
@@ -19,7 +23,9 @@
## 基准测试
对于**所有大小**的 json 和**所有使用场景**, **Sonic 表现均为最佳**。
+
- [中型](https://github.com/bytedance/sonic/blob/main/decoder/testdata_test.go#L19) (13kB, 300+ 键, 6 层)
+
```powershell
goversion: 1.17.1
goos: darwin
@@ -84,6 +90,7 @@ BenchmarkLoadNode_Parallel/LoadAll()-16 5493 ns/op 2370.6
BenchmarkLoadNode/Interface()-16 17722 ns/op 734.85 MB/s 13323 B/op 88 allocs/op
BenchmarkLoadNode_Parallel/Interface()-16 10330 ns/op 1260.70 MB/s 15178 B/op 88 allocs/op
```
+
- [小型](https://github.com/bytedance/sonic/blob/main/testdata/small.go) (400B, 11 个键, 3 层)

- [大型](https://github.com/bytedance/sonic/blob/main/testdata/twitter.json) (635kB, 10000+ 个键, 6 层)
@@ -100,6 +107,7 @@ BenchmarkLoadNode_Parallel/Interface()-16 10330 ns/op 1260.7
### 序列化/反序列化
默认的行为基本上与 `encoding/json` 相一致,除了 HTML 转义形式(参见 [Escape HTML](https://github.com/bytedance/sonic/blob/main/README.md#escape-html)) 和 `SortKeys` 功能(参见 [Sort Keys](https://github.com/bytedance/sonic/blob/main/README.md#sort-keys))**没有**遵循 [RFC8259](https://datatracker.ietf.org/doc/html/rfc8259) 。
+
```go
import "github.com/bytedance/sonic"
@@ -113,7 +121,9 @@ err := sonic.Unmarshal(output, &data)
### 流式输入输出
Sonic 支持解码 `io.Reader` 中输入的 json,或将对象编码为 json 后输出至 `io.Writer`,以处理多个值并减少内存消耗。
+
- 编码器
+
```go
var o1 = map[string]interface{}{
"a": "b",
@@ -128,7 +138,9 @@ fmt.Println(w.String())
// {"a":"b"}
// 1
```
+
- 解码器
+
```go
var o = map[string]interface{}{}
var r = strings.NewReader(`{"a":"b"}{"1":"2"}`)
@@ -172,6 +184,7 @@ fm := root.Interface().(float64) // jn == jm
### 对键排序
考虑到排序带来的性能损失(约 10% ), sonic 默认不会启用这个功能。如果你的组件依赖这个行为(如 [zstd](https://github.com/facebook/zstd)) ,可以仿照下面的例子:
+
```go
import "github.com/bytedance/sonic"
import "github.com/bytedance/sonic/encoder"
@@ -188,6 +201,7 @@ err := root.SortKeys()
### HTML 转义
考虑到性能损失(约15%), sonic 默认不会启用这个功能。你可以使用 `encoder.EscapeHTML` 选项来开启(与 `encoding/json.HTMLEscape` 行为一致)。
+
```go
import "github.com/bytedance/sonic"
@@ -196,11 +210,13 @@ ret, err := Encode(v, EscapeHTML) // ret == `{"\u0026\u0026":{"X":"\u003c\u003e"
```
### 紧凑格式
+
Sonic 默认将基本类型( `struct` , `map` 等)编码为紧凑格式的 JSON ,除非使用 `json.RawMessage` or `json.Marshaler` 进行编码: sonic 确保输出的 JSON 合法,但出于性能考虑,**不会**加工成紧凑格式。我们提供选项 `encoder.CompactMarshaler` 来添加此过程,
### 打印错误
如果输入的 JSON 存在无效的语法,sonic 将返回 `decoder.SyntaxError`,该错误支持错误位置的美化输出。
+
```go
import "github.com/bytedance/sonic"
import "github.com/bytedance/sonic/decoder"
@@ -228,6 +244,7 @@ if err != nil {
#### 类型不匹配 [Sonic v1.6.0]
如果给定键中存在**类型不匹配**的值, sonic 会抛出 `decoder.MismatchTypeError` (如果有多个,只会报告最后一个),但仍会跳过错误的值并解码下一个 JSON 。
+
```go
import "github.com/bytedance/sonic"
import "github.com/bytedance/sonic/decoder"
@@ -240,6 +257,7 @@ err := UnmarshalString(`{"A":"1","B":1}`, &data)
println(err.Error()) // Mismatch type int with value string "at index 5: mismatched type with value\n\n\t{\"A\":\"1\",\"B\":1}\n\t.....^.........\n"
fmt.Printf("%+v", data) // {A:0 B:1}
```
+
### `Ast.Node`
Sonic/ast.Node 是完全独立的 JSON 抽象语法树库。它实现了序列化和反序列化,并提供了获取和修改通用数据的鲁棒的 API。
@@ -247,6 +265,7 @@ Sonic/ast.Node 是完全独立的 JSON 抽象语法树库。它实现了序列
#### 查找/索引
通过给定的路径搜索 JSON 片段,路径必须为非负整数,字符串或 `nil` 。
+
```go
import "github.com/bytedance/sonic"
@@ -260,11 +279,13 @@ raw := root.Raw() // == string(input)
root, err := sonic.Get(input, "key1", 1, "key2")
sub := root.Get("key3").Index(2).Int64() // == 3
```
+
**注意**:由于 `Index()` 使用偏移量来定位数据,比使用扫描的 `Get()` 要快的多,建议尽可能的使用 `Index` 。 Sonic 也提供了另一个 API, `IndexOrGet()` ,以偏移量为基础并且也确保键的匹配。
#### 修改
-使用 ` Set()` / `Unset()` 修改 json 的内容
+使用 `Set()` / `Unset()` 修改 json 的内容
+
```go
import "github.com/bytedance/sonic"
@@ -281,7 +302,9 @@ println(root.Get("key4").Check()) // "value not exist"
```
#### 序列化
+
要将 `ast.Node` 编码为 json ,使用 `MarshalJson()` 或者 `json.Marshal()` (必须传递指向节点的指针)
+
```go
import (
"encoding/json"
@@ -295,6 +318,7 @@ println(string(buf) == string(exp)) // true
```
#### APIs
+
- 合法性检查: `Check()`, `Error()`, `Valid()`, `Exist()`
- 索引: `Index()`, `Get()`, `IndexPair()`, `IndexOrGet()`, `GetByPath()`
- 转换至 go 内置类型: `Int64()`, `Float64()`, `String()`, `Number()`, `Bool()`, `Map[UseNumber|UseNode]()`, `Array[UseNumber|UseNode]()`, `Interface[UseNumber|UseNode]()`
@@ -303,7 +327,9 @@ println(string(buf) == string(exp)) // true
- 修改: `Set()`, `SetByIndex()`, `Add()`
### `Ast.Visitor`
+
Sonic 提供了一个高级的 API 用于直接全量解析 JSON 到非标准容器里 (既不是 `struct` 也不是 `map[string]interface{}`) 且不需要借助任何中间表示 (`ast.Node` 或 `interface{}`)。举个例子,你可能定义了下述的类型,它们看起来像 `interface{}`,但实际上并不是:
+
```go
type UserNode interface {}
@@ -318,7 +344,9 @@ type (
UserArray struct{ Value []UserNode }
)
```
+
Sonic 提供了下述的 API 来返回 **“对 JSON AST 的前序遍历”**。`ast.Visitor` 是一个 SAX 风格的接口,这在某些 C++ 的 JSON 解析库中被使用到。你需要自己实现一个 `ast.Visitor`,将它传递给 `ast.Preorder()` 方法。在你的实现中你可以使用自定义的类型来表示 JSON 的值。在你的 `ast.Visitor` 中,可能需要有一个 O(n) 空间复杂度的容器(比如说栈)来记录 object / array 的层级。
+
```go
func Preorder(str string, visitor Visitor, opts *VisitorOptions) error
@@ -335,15 +363,18 @@ type Visitor interface {
OnArrayEnd() error
}
```
+
详细用法参看 [ast/visitor.go](https://github.com/bytedance/sonic/blob/main/ast/visitor.go),我们还为 `UserNode` 实现了一个示例 `ast.Visitor`,你可以在 [ast/visitor_test.go](https://github.com/bytedance/sonic/blob/main/ast/visitor_test.go) 中找到它。
## 兼容性
+
由于开发高性能代码的困难性, Sonic **不**保证对所有环境的支持。对于在不同环境中使用 Sonic 构建应用程序的开发者,我们有以下建议:
- 在 **Mac M1** 上开发:确保在您的计算机上安装了 Rosetta 2,并在构建时设置 `GOARCH=amd64` 。 Rosetta 2 可以自动将 x86 二进制文件转换为 arm64 二进制文件,并在 Mac M1 上运行 x86 应用程序。
- 在 **Linux arm64** 上开发:您可以安装 qemu 并使用 `qemu-x86_64 -cpu max` 命令来将 x86 二进制文件转换为 arm64 二进制文件。qemu可以实现与Mac M1上的Rosetta 2类似的转换效果。
对于希望在不使用 qemu 下使用 sonic 的开发者,或者希望处理 JSON 时与 `encoding/JSON` 严格保持一致的开发者,我们在 `sonic.API` 中提供了一些兼容性 API
+
- `ConfigDefault`: 在支持 sonic 的环境下 sonic 的默认配置(`EscapeHTML=false`,`SortKeys=false`等)。行为与具有相应配置的 `encoding/json` 一致,一些选项,如 `SortKeys=false` 将无效。
- `ConfigStd`: 在支持 sonic 的环境下与标准库兼容的配置(`EscapeHTML=true`,`SortKeys=true`等)。行为与 `encoding/json` 一致。
- `ConfigFastest`: 在支持 sonic 的环境下运行最快的配置(`NoQuoteTextMarshaler=true`)。行为与具有相应配置的 `encoding/json` 一致,某些选项将无效。
@@ -351,7 +382,9 @@ type Visitor interface {
## 注意事项
### 预热
+
由于 Sonic 使用 [golang-asm](https://github.com/twitchyliquid64/golang-asm) 作为 JIT 汇编器,这个库并不适用于运行时编译,第一次运行一个大型模式可能会导致请求超时甚至进程内存溢出。为了更好地稳定性,我们建议在运行大型模式或在内存有限的应用中,在使用 `Marshal()/Unmarshal()` 前运行 `Pretouch()`。
+
```go
import (
"reflect"
@@ -381,16 +414,17 @@ func init() {
当解码 **没有转义字符的字符串**时, sonic 会从原始的 JSON 缓冲区内引用而不是复制到新的一个缓冲区中。这对 CPU 的性能方面很有帮助,但是可能因此在解码后对象仍在使用的时候将整个 JSON 缓冲区保留在内存中。实践中我们发现,通过引用 JSON 缓冲区引入的额外内存通常是解码后对象的 20% 至 80% ,一旦应用长期保留这些对象(如缓存以备重用),服务器所使用的内存可能会增加。我们提供了选项 `decoder.CopyString()` 供用户选择,不引用 JSON 缓冲区。这可能在一定程度上降低 CPU 性能。
### 传递字符串还是字节数组?
+
为了和 `encoding/json` 保持一致,我们提供了传递 `[]byte` 作为参数的 API ,但考虑到安全性,字符串到字节的复制是同时进行的,这在原始 JSON 非常大时可能会导致性能损失。因此,你可以使用 `UnmarshalString()` 和 `GetFromString()` 来传递字符串,只要你的原始数据是字符串,或**零拷贝类型转换**对于你的字节数组是安全的。我们也提供了 `MarshalString()` 的 API ,以便对编码的 JSON 字节数组进行**零拷贝类型转换**,因为 sonic 输出的字节始终是重复并且唯一的,所以这样是安全的。
### 加速 `encoding.TextMarshaler`
为了保证数据安全性, `sonic.Encoder` 默认会对来自 `encoding.TextMarshaler` 接口的字符串进行引用和转义,如果大部分数据都是这种形式那可能会导致很大的性能损失。我们提供了 `encoder.NoQuoteTextMarshaler` 选项来跳过这些操作,但你**必须**保证他们的输出字符串依照 [RFC8259](https://datatracker.ietf.org/doc/html/rfc8259) 进行了转义和引用。
-
### 泛型的性能优化
在 **完全解析**的场景下, `Unmarshal()` 表现得比 `Get()`+`Node.Interface()` 更好。但是如果你只有特定 JSON 的部分模式,你可以将 `Get()` 和 `Unmarshal()` 结合使用:
+
```go
import "github.com/bytedance/sonic"
@@ -398,7 +432,9 @@ node, err := sonic.GetFromString(_TwitterJson, "statuses", 3, "user")
var user User // your partial schema...
err = sonic.UnmarshalString(node.Raw(), &user)
```
+
甚至如果你没有任何模式,可以用 `ast.Node` 代替 `map` 或 `interface` 作为泛型的容器:
+
```go
import "github.com/bytedance/sonic"
@@ -409,7 +445,9 @@ err = user.Check()
// err = user.LoadAll() // only call this when you want to use 'user' concurrently...
go someFunc(user)
```
+
为什么?因为 `ast.Node` 使用 `array` 来存储其子节点:
+
- 在插入(反序列化)和扫描(序列化)数据时,`Array` 的性能比 `Map` **好得多**;
- **哈希**(`map[x]`)的效率不如**索引**(`array[x]`)高效,而 `ast.Node` 可以在数组和对象上使用索引;
- 使用 `Interface()` / `Map()` 意味着 sonic 必须解析所有的底层值,而 `ast.Node` 可以**按需解析**它们。
@@ -417,6 +455,7 @@ go someFunc(user)
**注意**:由于 `ast.Node` 的惰性加载设计,其**不能**直接保证并发安全性,但你可以调用 `Node.Load()` / `Node.LoadAll()` 来实现并发安全。尽管可能会带来性能损失,但仍比转换成 `map` 或 `interface{}` 更为高效。
### 使用 `ast.Node` 还是 `ast.Visitor`?
+
对于泛型数据的解析,`ast.Node` 在大多数场景上应该能够满足你的需求。
然而,`ast.Node` 是一种针对部分解析 JSON 而设计的泛型容器,它包含一些特殊设计,比如惰性加载,如果你希望像 `Unmarshal()` 那样直接解析整个 JSON,这些设计可能并不合适。尽管 `ast.Node` 相较于 `map` 或 `interface{}` 来说是更好的一种泛型容器,但它毕竟也是一种中间表示,如果你的最终类型是自定义的,你还得在解析完成后将上述类型转化成你自定义的类型。
diff --git a/vendor/github.com/bytedance/sonic/api.go b/vendor/github.com/bytedance/sonic/api.go
index 9525b7af..54d9a216 100644
--- a/vendor/github.com/bytedance/sonic/api.go
+++ b/vendor/github.com/bytedance/sonic/api.go
@@ -20,6 +20,7 @@ import (
`io`
`github.com/bytedance/sonic/ast`
+ `github.com/bytedance/sonic/internal/rt`
)
// Config is a combination of sonic/encoder.Options and sonic/decoder.Options
@@ -73,6 +74,9 @@ type Config struct {
// NoValidateJSONMarshaler indicates that the encoder should not validate the output string
// after encoding the JSONMarshaler to JSON.
NoValidateJSONMarshaler bool
+
+ // NoEncoderNewline indicates that the encoder should not add a newline after every message
+ NoEncoderNewline bool
}
var (
@@ -170,27 +174,41 @@ func UnmarshalString(buf string, val interface{}) error {
return ConfigDefault.UnmarshalFromString(buf, val)
}
-// Get searches the given path from json,
-// and returns its representing ast.Node.
+// Get searches and locates the given path from src json,
+// and returns a ast.Node representing the partially json.
//
// Each path arg must be integer or string:
// - Integer is target index(>=0), means searching current node as array.
// - String is target key, means searching current node as object.
//
//
-// Note, the api expects the json is well-formed at least,
-// otherwise it may return unexpected result.
+// Notice: It expects the src json is **Well-formed** and **Immutable** when calling,
+// otherwise it may return unexpected result.
+// Considering memory safty, the returned JSON is **Copied** from the input
func Get(src []byte, path ...interface{}) (ast.Node, error) {
- return GetFromString(string(src), path...)
+ return GetCopyFromString(rt.Mem2Str(src), path...)
}
-// GetFromString is same with Get except src is string,
-// which can reduce unnecessary memory copy.
+// GetFromString is same with Get except src is string.
+//
+// WARNING: The returned JSON is **Referenced** from the input.
+// Caching or long-time holding the returned node may cause OOM.
+// If your src is big, consider use GetFromStringCopy().
func GetFromString(src string, path ...interface{}) (ast.Node, error) {
return ast.NewSearcher(src).GetByPath(path...)
}
+// GetCopyFromString is same with Get except src is string
+func GetCopyFromString(src string, path ...interface{}) (ast.Node, error) {
+ return ast.NewSearcher(src).GetByPathCopy(path...)
+}
+
// Valid reports whether data is a valid JSON encoding.
func Valid(data []byte) bool {
return ConfigDefault.Valid(data)
}
+
+// Valid reports whether data is a valid JSON encoding.
+func ValidString(data string) bool {
+ return ConfigDefault.Valid(rt.Str2Mem(data))
+}
diff --git a/vendor/github.com/bytedance/sonic/ast/api_amd64.go b/vendor/github.com/bytedance/sonic/ast/api_amd64.go
index da6738ef..fa437563 100644
--- a/vendor/github.com/bytedance/sonic/ast/api_amd64.go
+++ b/vendor/github.com/bytedance/sonic/ast/api_amd64.go
@@ -1,4 +1,4 @@
-// +build amd64,go1.16,!go1.22
+// +build amd64,go1.16,!go1.23
/*
* Copyright 2022 ByteDance Inc.
@@ -131,27 +131,3 @@ func (self *Parser) getByPath(path ...interface{}) (int, types.ParsingError) {
}
return start, 0
}
-
-func (self *Searcher) GetByPath(path ...interface{}) (Node, error) {
- var err types.ParsingError
- var start int
-
- self.parser.p = 0
- start, err = self.parser.getByPath(path...)
- if err != 0 {
- // for compatibility with old version
- if err == types.ERR_NOT_FOUND {
- return Node{}, ErrNotExist
- }
- if err == types.ERR_UNSUPPORT_TYPE {
- panic("path must be either int(>=0) or string")
- }
- return Node{}, self.parser.syntaxError(err)
- }
-
- t := switchRawType(self.parser.s[start])
- if t == _V_NONE {
- return Node{}, self.parser.ExportError(err)
- }
- return newRawNode(self.parser.s[start:self.parser.p], t), nil
-}
diff --git a/vendor/github.com/bytedance/sonic/ast/api_compat.go b/vendor/github.com/bytedance/sonic/ast/api_compat.go
index 7b475eb6..9244e76e 100644
--- a/vendor/github.com/bytedance/sonic/ast/api_compat.go
+++ b/vendor/github.com/bytedance/sonic/ast/api_compat.go
@@ -1,4 +1,4 @@
-// +build !amd64 !go1.16 go1.22
+// +build !amd64 !go1.16 go1.23
/*
* Copyright 2022 ByteDance Inc.
@@ -21,14 +21,13 @@ package ast
import (
`encoding/base64`
`encoding/json`
- `fmt`
`github.com/bytedance/sonic/internal/native/types`
`github.com/bytedance/sonic/internal/rt`
)
func init() {
- println("WARNING: sonic only supports Go1.16~1.20 && CPU amd64, but your environment is not suitable")
+ println("WARNING: sonic only supports Go1.16~1.22 && CPU amd64, but your environment is not suitable")
}
func quote(buf *[]byte, val string) {
@@ -88,37 +87,25 @@ func (self *Node) encodeInterface(buf *[]byte) error {
return nil
}
-func (self *Searcher) GetByPath(path ...interface{}) (Node, error) {
- self.parser.p = 0
-
+func (self *Parser) getByPath(path ...interface{}) (int, types.ParsingError) {
var err types.ParsingError
for _, p := range path {
if idx, ok := p.(int); ok && idx >= 0 {
- if err = self.parser.searchIndex(idx); err != 0 {
- return Node{}, self.parser.ExportError(err)
+ if err = self.searchIndex(idx); err != 0 {
+ return -1, err
}
} else if key, ok := p.(string); ok {
- if err = self.parser.searchKey(key); err != 0 {
- return Node{}, self.parser.ExportError(err)
+ if err = self.searchKey(key); err != 0 {
+ return -1, err
}
} else {
panic("path must be either int(>=0) or string")
}
}
- var start = self.parser.p
- if start, err = self.parser.skip(); err != 0 {
- return Node{}, self.parser.ExportError(err)
- }
- ns := len(self.parser.s)
- if self.parser.p > ns || start >= ns || start>=self.parser.p {
- return Node{}, fmt.Errorf("skip %d char out of json boundary", start)
- }
-
- t := switchRawType(self.parser.s[start])
- if t == _V_NONE {
- return Node{}, self.parser.ExportError(err)
+ var start int
+ if start, err = self.skip(); err != 0 {
+ return -1, err
}
-
- return newRawNode(self.parser.s[start:self.parser.p], t), nil
-}
\ No newline at end of file
+ return start, 0
+}
diff --git a/vendor/github.com/bytedance/sonic/ast/buffer.go b/vendor/github.com/bytedance/sonic/ast/buffer.go
index 93f4ff47..bccbf481 100644
--- a/vendor/github.com/bytedance/sonic/ast/buffer.go
+++ b/vendor/github.com/bytedance/sonic/ast/buffer.go
@@ -58,29 +58,89 @@ func (self *linkedNodes) At(i int) (*Node) {
return nil
}
-func (self *linkedNodes) Add(v Node) {
- if self.size < _DEFAULT_NODE_CAP {
- self.head[self.size] = v
- self.size++
+func (self *linkedNodes) MoveOne(source int, target int) {
+ if source == target {
return
}
+ if source < 0 || source >= self.size || target < 0 || target >= self.size {
+ return
+ }
+ // reserve source
+ n := *self.At(source)
+ if source < target {
+ // move every element (source,target] one step back
+ for i:=source; i
-
-
-
diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/binary.go b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/binary.go
index 29bdded3..f1e94498 100644
--- a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/binary.go
+++ b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/binary.go
@@ -150,32 +150,34 @@ func Marc(raw []byte, limit uint32) bool {
}
// Glb matches a glTF model format file.
-// GLB is the binary file format representation of 3D models save in
+// GLB is the binary file format representation of 3D models saved in
// the GL transmission Format (glTF).
-// see more: https://docs.fileformat.com/3d/glb/
-// https://www.iana.org/assignments/media-types/model/gltf-binary
-// GLB file format is based on little endian and its header structure
-// show below:
+// GLB uses little endian and its header structure is as follows:
//
-// <-- 12-byte header -->
-// | magic | version | length |
-// | (uint32) | (uint32) | (uint32) |
-// | \x67\x6C\x54\x46 | \x01\x00\x00\x00 | ... |
-// | g l T F | 1 | ... |
+// <-- 12-byte header -->
+// | magic | version | length |
+// | (uint32) | (uint32) | (uint32) |
+// | \x67\x6C\x54\x46 | \x01\x00\x00\x00 | ... |
+// | g l T F | 1 | ... |
+//
+// Visit [glTF specification] and [IANA glTF entry] for more details.
+//
+// [glTF specification]: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html
+// [IANA glTF entry]: https://www.iana.org/assignments/media-types/model/gltf-binary
var Glb = prefix([]byte("\x67\x6C\x54\x46\x02\x00\x00\x00"),
[]byte("\x67\x6C\x54\x46\x01\x00\x00\x00"))
// TzIf matches a Time Zone Information Format (TZif) file.
// See more: https://tools.ietf.org/id/draft-murchison-tzdist-tzif-00.html#rfc.section.3
// Its header structure is shown below:
-// +---------------+---+
-// | magic (4) | <-+-- version (1)
-// +---------------+---+---------------------------------------+
-// | [unused - reserved for future use] (15) |
-// +---------------+---------------+---------------+-----------+
-// | isutccnt (4) | isstdcnt (4) | leapcnt (4) |
-// +---------------+---------------+---------------+
-// | timecnt (4) | typecnt (4) | charcnt (4) |
+// +---------------+---+
+// | magic (4) | <-+-- version (1)
+// +---------------+---+---------------------------------------+
+// | [unused - reserved for future use] (15) |
+// +---------------+---------------+---------------+-----------+
+// | isutccnt (4) | isstdcnt (4) | leapcnt (4) |
+// +---------------+---------------+---------------+
+// | timecnt (4) | typecnt (4) | charcnt (4) |
func TzIf(raw []byte, limit uint32) bool {
// File is at least 44 bytes (header size).
if len(raw) < 44 {
diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/magic.go b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/magic.go
index 466058fb..34b84f40 100644
--- a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/magic.go
+++ b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/magic.go
@@ -177,7 +177,9 @@ func newXMLSig(localName, xmlns string) xmlSig {
// and, optionally, followed by the arguments for the interpreter.
//
// Ex:
-// #! /usr/bin/env php
+//
+// #! /usr/bin/env php
+//
// /usr/bin/env is the interpreter, php is the first and only argument.
func shebang(sigs ...[]byte) Detector {
return func(raw []byte, limit uint32) bool {
diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/text_csv.go b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/text_csv.go
index 6a156192..84ed6492 100644
--- a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/text_csv.go
+++ b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/text_csv.go
@@ -3,6 +3,7 @@ package magic
import (
"bytes"
"encoding/csv"
+ "errors"
"io"
)
@@ -19,12 +20,23 @@ func Tsv(raw []byte, limit uint32) bool {
func sv(in []byte, comma rune, limit uint32) bool {
r := csv.NewReader(dropLastLine(in, limit))
r.Comma = comma
- r.TrimLeadingSpace = true
+ r.ReuseRecord = true
r.LazyQuotes = true
r.Comment = '#'
- lines, err := r.ReadAll()
- return err == nil && r.FieldsPerRecord > 1 && len(lines) > 1
+ lines := 0
+ for {
+ _, err := r.Read()
+ if errors.Is(err, io.EOF) {
+ break
+ }
+ if err != nil {
+ return false
+ }
+ lines++
+ }
+
+ return r.FieldsPerRecord > 1 && lines > 1
}
// dropLastLine drops the last incomplete line from b.
diff --git a/vendor/github.com/gabriel-vasile/mimetype/mimetype.go b/vendor/github.com/gabriel-vasile/mimetype/mimetype.go
index 08e68e33..1b5909b7 100644
--- a/vendor/github.com/gabriel-vasile/mimetype/mimetype.go
+++ b/vendor/github.com/gabriel-vasile/mimetype/mimetype.go
@@ -39,7 +39,8 @@ func Detect(in []byte) *MIME {
//
// DetectReader assumes the reader offset is at the start. If the input is an
// io.ReadSeeker you previously read from, it should be rewinded before detection:
-// reader.Seek(0, io.SeekStart)
+//
+// reader.Seek(0, io.SeekStart)
func DetectReader(r io.Reader) (*MIME, error) {
var in []byte
var err error
diff --git a/vendor/github.com/gabriel-vasile/mimetype/supported_mimes.md b/vendor/github.com/gabriel-vasile/mimetype/supported_mimes.md
index cdec4e67..5ec6f6b6 100644
--- a/vendor/github.com/gabriel-vasile/mimetype/supported_mimes.md
+++ b/vendor/github.com/gabriel-vasile/mimetype/supported_mimes.md
@@ -1,4 +1,4 @@
-## 172 Supported MIME types
+## 173 Supported MIME types
This file is automatically generated when running tests. Do not edit manually.
Extension | MIME type | Aliases
diff --git a/vendor/github.com/gin-contrib/zap/.golangci.yml b/vendor/github.com/gin-contrib/zap/.golangci.yml
new file mode 100644
index 00000000..d59c99bd
--- /dev/null
+++ b/vendor/github.com/gin-contrib/zap/.golangci.yml
@@ -0,0 +1,39 @@
+linters:
+ enable-all: false
+ disable-all: true
+ fast: false
+ enable:
+ - bodyclose
+ - dogsled
+ - dupl
+ - errcheck
+ - exportloopref
+ - exhaustive
+ - gochecknoinits
+ - goconst
+ - gocritic
+ - gocyclo
+ - gofmt
+ - goimports
+ - goprintffuncname
+ - gosec
+ - gosimple
+ - govet
+ - ineffassign
+ - lll
+ - misspell
+ - nakedret
+ - noctx
+ - nolintlint
+ - rowserrcheck
+ - staticcheck
+ - stylecheck
+ - typecheck
+ - unconvert
+ - unparam
+ - unused
+ - whitespace
+ - gofumpt
+
+run:
+ timeout: 3m
diff --git a/vendor/github.com/gin-contrib/zap/README.md b/vendor/github.com/gin-contrib/zap/README.md
index 70b2c840..570c7d55 100644
--- a/vendor/github.com/gin-contrib/zap/README.md
+++ b/vendor/github.com/gin-contrib/zap/README.md
@@ -7,6 +7,10 @@
Alternative logging through [zap](https://github.com/uber-go/zap). Thanks for [Pull Request](https://github.com/gin-gonic/contrib/pull/129) from [@yezooz](https://github.com/yezooz)
+## Requirement
+
+Require Go **1.19** or later.
+
## Usage
### Start using it
@@ -75,7 +79,6 @@ When you want to skip logging for specific path,
please use GinzapWithConfig
```go
-
r.Use(GinzapWithConfig(utcLogger, &Config{
TimeFormat: time.RFC3339,
UTC: true,
@@ -133,6 +136,121 @@ func main() {
})
// Listen and Server in 0.0.0.0:8080
- r.Run(":8080")
+ if err := r.Run(":8080"); err != nil {
+ panic(err)
+ }
+}
+```
+
+## Custom `skipper` function
+
+Example for custom `skipper` function
+
+```go
+r.Use(GinzapWithConfig(logger, &Config{
+ TimeFormat: time.RFC3339,
+ UTC: true,
+ Skipper: func(c *gin.Context) bool {
+ return c.Request.URL.Path == "/ping" && c.Request.Method == "GET"
+ },
+}))
+```
+
+Full example
+
+```go
+package main
+
+import (
+ "fmt"
+ "time"
+
+ ginzap "github.com/gin-contrib/zap"
+
+ "github.com/gin-gonic/gin"
+ "go.uber.org/zap"
+)
+
+func main() {
+ r := gin.New()
+
+ logger, _ := zap.NewProduction()
+
+ r.Use(ginzap.GinzapWithConfig(logger, &ginzap.Config{
+ UTC: true,
+ TimeFormat: time.RFC3339,
+ Skipper: func(c *gin.Context) bool {
+ return c.Request.URL.Path == "/ping" && c.Request.Method == "GET"
+ },
+ }))
+
+ // Example ping request.
+ r.GET("/ping", func(c *gin.Context) {
+ c.Writer.Header().Add("X-Request-Id", "1234-5678-9012")
+ c.String(200, "pong "+fmt.Sprint(time.Now().Unix()))
+ })
+
+ r.POST("/ping", func(c *gin.Context) {
+ c.Writer.Header().Add("X-Request-Id", "9012-5678-1234")
+ c.String(200, "pong "+fmt.Sprint(time.Now().Unix()))
+ })
+
+ // Listen and Server in 0.0.0.0:8080
+ if err := r.Run(":8080"); err != nil {
+ panic(err)
+ }
+}
+```
+
+## Custom `SkipPathRegexps` function
+
+Example for custom `SkipPathRegexps` function
+
+```go
+rxURL := regexp.MustCompile(`^/ping\s*`)
+r.Use(ginzap.GinzapWithConfig(logger, &ginzap.Config{
+ UTC: true,
+ TimeFormat: time.RFC3339,
+ SkipPathRegexps: []*regexp.Regexp{rxURL},
+}))
+```
+
+Full example
+
+```go
+package main
+
+import (
+ "fmt"
+ "regexp"
+ "time"
+
+ ginzap "github.com/gin-contrib/zap"
+
+ "github.com/gin-gonic/gin"
+ "go.uber.org/zap"
+)
+
+func main() {
+ r := gin.New()
+
+ logger, _ := zap.NewProduction()
+ rxURL := regexp.MustCompile(`^/ping\s*`)
+
+ r.Use(ginzap.GinzapWithConfig(logger, &ginzap.Config{
+ UTC: true,
+ TimeFormat: time.RFC3339,
+ SkipPathRegexps: []*regexp.Regexp{rxURL},
+ }))
+
+ // Example ping request.
+ r.GET("/ping1234", func(c *gin.Context) {
+ c.String(200, "pong "+fmt.Sprint(time.Now().Unix()))
+ })
+
+ // Listen and Server in 0.0.0.0:8080
+ if err := r.Run(":8080"); err != nil {
+ panic(err)
+ }
}
```
diff --git a/vendor/github.com/gin-contrib/zap/zap.go b/vendor/github.com/gin-contrib/zap/zap.go
index 6e8d7488..52738cd1 100644
--- a/vendor/github.com/gin-contrib/zap/zap.go
+++ b/vendor/github.com/gin-contrib/zap/zap.go
@@ -7,6 +7,7 @@ import (
"net/http"
"net/http/httputil"
"os"
+ "regexp"
"runtime/debug"
"strings"
"time"
@@ -18,6 +19,9 @@ import (
type Fn func(c *gin.Context) []zapcore.Field
+// Skipper is a function to skip logs based on provided Context
+type Skipper func(c *gin.Context) bool
+
// ZapLogger is the minimal logger interface compatible with zap.Logger
type ZapLogger interface {
Info(msg string, fields ...zap.Field)
@@ -26,10 +30,15 @@ type ZapLogger interface {
// Config is config setting for Ginzap
type Config struct {
- TimeFormat string
- UTC bool
- SkipPaths []string
- Context Fn
+ TimeFormat string
+ UTC bool
+ SkipPaths []string
+ SkipPathRegexps []*regexp.Regexp
+ Context Fn
+ DefaultLevel zapcore.Level
+ // skip is a Skipper that indicates which logs should not be written.
+ // Optional.
+ Skipper Skipper
}
// Ginzap returns a gin.HandlerFunc (middleware) that logs requests using uber-go/zap.
@@ -41,7 +50,7 @@ type Config struct {
// 1. A time package format string (e.g. time.RFC3339).
// 2. A boolean stating whether to use UTC time zone or local.
func Ginzap(logger ZapLogger, timeFormat string, utc bool) gin.HandlerFunc {
- return GinzapWithConfig(logger, &Config{TimeFormat: timeFormat, UTC: utc})
+ return GinzapWithConfig(logger, &Config{TimeFormat: timeFormat, UTC: utc, DefaultLevel: zapcore.InfoLevel})
}
// GinzapWithConfig returns a gin.HandlerFunc using configs
@@ -57,8 +66,24 @@ func GinzapWithConfig(logger ZapLogger, conf *Config) gin.HandlerFunc {
path := c.Request.URL.Path
query := c.Request.URL.RawQuery
c.Next()
+ track := true
+
+ if _, ok := skipPaths[path]; ok || (conf.Skipper != nil && conf.Skipper(c)) {
+ track = false
+ }
+
+ if track && len(conf.SkipPathRegexps) > 0 {
+ for _, reg := range conf.SkipPathRegexps {
+ if !reg.MatchString(path) {
+ continue
+ }
- if _, ok := skipPaths[path]; !ok {
+ track = false
+ break
+ }
+ }
+
+ if track {
end := time.Now()
latency := end.Sub(start)
if conf.UTC {
@@ -88,7 +113,12 @@ func GinzapWithConfig(logger ZapLogger, conf *Config) gin.HandlerFunc {
logger.Error(e, fields...)
}
} else {
- logger.Info(path, fields...)
+ zl, ok := logger.(*zap.Logger)
+ if ok {
+ zl.Log(conf.DefaultLevel, "", fields...)
+ } else {
+ logger.Error(path, fields...)
+ }
}
}
}
@@ -121,7 +151,8 @@ func CustomRecoveryWithZap(logger ZapLogger, stack bool, recovery gin.RecoveryFu
var brokenPipe bool
if ne, ok := err.(*net.OpError); ok {
if se, ok := ne.Err.(*os.SyscallError); ok {
- if strings.Contains(strings.ToLower(se.Error()), "broken pipe") || strings.Contains(strings.ToLower(se.Error()), "connection reset by peer") {
+ if strings.Contains(strings.ToLower(se.Error()), "broken pipe") ||
+ strings.Contains(strings.ToLower(se.Error()), "connection reset by peer") {
brokenPipe = true
}
}
@@ -134,7 +165,7 @@ func CustomRecoveryWithZap(logger ZapLogger, stack bool, recovery gin.RecoveryFu
zap.String("request", string(httpRequest)),
)
// If the connection is dead, we can't write a status to it.
- c.Error(err.(error)) // nolint: errcheck
+ c.Error(err.(error)) //nolint: errcheck
c.Abort()
return
}
diff --git a/vendor/github.com/go-playground/validator/v10/Makefile b/vendor/github.com/go-playground/validator/v10/Makefile
index 09f171ba..8bf4f28a 100644
--- a/vendor/github.com/go-playground/validator/v10/Makefile
+++ b/vendor/github.com/go-playground/validator/v10/Makefile
@@ -1,4 +1,4 @@
-GOCMD=GO111MODULE=on go
+GOCMD=go
linters-install:
@golangci-lint --version >/dev/null 2>&1 || { \
diff --git a/vendor/github.com/go-playground/validator/v10/README.md b/vendor/github.com/go-playground/validator/v10/README.md
index 8e80d52a..b3e113a1 100644
--- a/vendor/github.com/go-playground/validator/v10/README.md
+++ b/vendor/github.com/go-playground/validator/v10/README.md
@@ -1,7 +1,7 @@
Package validator
=================
[](https://gitter.im/go-playground/validator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-
+
[](https://travis-ci.org/go-playground/validator)
[](https://coveralls.io/github/go-playground/validator?branch=master)
[](https://goreportcard.com/report/github.com/go-playground/validator)
@@ -178,6 +178,7 @@ validate := validator.New(validator.WithRequiredStructEnabled())
| isbn | International Standard Book Number |
| isbn10 | International Standard Book Number 10 |
| isbn13 | International Standard Book Number 13 |
+| issn | International Standard Serial Number |
| iso3166_1_alpha2 | Two-letter country code (ISO 3166-1 alpha-2) |
| iso3166_1_alpha3 | Three-letter country code (ISO 3166-1 alpha-3) |
| iso3166_1_alpha_numeric | Numeric country code (ISO 3166-1 numeric) |
diff --git a/vendor/github.com/go-playground/validator/v10/baked_in.go b/vendor/github.com/go-playground/validator/v10/baked_in.go
index 0b623307..95f56e00 100644
--- a/vendor/github.com/go-playground/validator/v10/baked_in.go
+++ b/vendor/github.com/go-playground/validator/v10/baked_in.go
@@ -51,6 +51,7 @@ var (
endKeysTag: {},
structOnlyTag: {},
omitempty: {},
+ omitnil: {},
skipValidationTag: {},
utf8HexComma: {},
utf8Pipe: {},
@@ -149,6 +150,7 @@ var (
"isbn": isISBN,
"isbn10": isISBN10,
"isbn13": isISBN13,
+ "issn": isISSN,
"eth_addr": isEthereumAddress,
"eth_addr_checksum": isEthereumAddressChecksum,
"btc_addr": isBitcoinAddress,
@@ -508,47 +510,47 @@ func isASCII(fl FieldLevel) bool {
// isUUID5 is the validation function for validating if the field's value is a valid v5 UUID.
func isUUID5(fl FieldLevel) bool {
- return uUID5Regex.MatchString(fl.Field().String())
+ return fieldMatchesRegexByStringerValOrString(uUID5Regex, fl)
}
// isUUID4 is the validation function for validating if the field's value is a valid v4 UUID.
func isUUID4(fl FieldLevel) bool {
- return uUID4Regex.MatchString(fl.Field().String())
+ return fieldMatchesRegexByStringerValOrString(uUID4Regex, fl)
}
// isUUID3 is the validation function for validating if the field's value is a valid v3 UUID.
func isUUID3(fl FieldLevel) bool {
- return uUID3Regex.MatchString(fl.Field().String())
+ return fieldMatchesRegexByStringerValOrString(uUID3Regex, fl)
}
// isUUID is the validation function for validating if the field's value is a valid UUID of any version.
func isUUID(fl FieldLevel) bool {
- return uUIDRegex.MatchString(fl.Field().String())
+ return fieldMatchesRegexByStringerValOrString(uUIDRegex, fl)
}
// isUUID5RFC4122 is the validation function for validating if the field's value is a valid RFC4122 v5 UUID.
func isUUID5RFC4122(fl FieldLevel) bool {
- return uUID5RFC4122Regex.MatchString(fl.Field().String())
+ return fieldMatchesRegexByStringerValOrString(uUID5RFC4122Regex, fl)
}
// isUUID4RFC4122 is the validation function for validating if the field's value is a valid RFC4122 v4 UUID.
func isUUID4RFC4122(fl FieldLevel) bool {
- return uUID4RFC4122Regex.MatchString(fl.Field().String())
+ return fieldMatchesRegexByStringerValOrString(uUID4RFC4122Regex, fl)
}
// isUUID3RFC4122 is the validation function for validating if the field's value is a valid RFC4122 v3 UUID.
func isUUID3RFC4122(fl FieldLevel) bool {
- return uUID3RFC4122Regex.MatchString(fl.Field().String())
+ return fieldMatchesRegexByStringerValOrString(uUID3RFC4122Regex, fl)
}
// isUUIDRFC4122 is the validation function for validating if the field's value is a valid RFC4122 UUID of any version.
func isUUIDRFC4122(fl FieldLevel) bool {
- return uUIDRFC4122Regex.MatchString(fl.Field().String())
+ return fieldMatchesRegexByStringerValOrString(uUIDRFC4122Regex, fl)
}
// isULID is the validation function for validating if the field's value is a valid ULID.
func isULID(fl FieldLevel) bool {
- return uLIDRegex.MatchString(fl.Field().String())
+ return fieldMatchesRegexByStringerValOrString(uLIDRegex, fl)
}
// isMD4 is the validation function for validating if the field's value is a valid MD4.
@@ -650,6 +652,32 @@ func isISBN10(fl FieldLevel) bool {
return checksum%11 == 0
}
+// isISSN is the validation function for validating if the field's value is a valid ISSN.
+func isISSN(fl FieldLevel) bool {
+ s := fl.Field().String()
+
+ if !iSSNRegex.MatchString(s) {
+ return false
+ }
+ s = strings.ReplaceAll(s, "-", "")
+
+ pos := 8
+ checksum := 0
+
+ for i := 0; i < 7; i++ {
+ checksum += pos * int(s[i]-'0')
+ pos--
+ }
+
+ if s[7] == 'X' {
+ checksum += 10
+ } else {
+ checksum += int(s[7] - '0')
+ }
+
+ return checksum%11 == 0
+}
+
// isEthereumAddress is the validation function for validating if the field's value is a valid Ethereum address.
func isEthereumAddress(fl FieldLevel) bool {
address := fl.Field().String()
@@ -1413,6 +1441,15 @@ func isURI(fl FieldLevel) bool {
panic(fmt.Sprintf("Bad field type %T", field.Interface()))
}
+// isFileURL is the helper function for validating if the `path` valid file URL as per RFC8089
+func isFileURL(path string) bool {
+ if !strings.HasPrefix(path, "file:/") {
+ return false
+ }
+ _, err := url.ParseRequestURI(path)
+ return err == nil
+}
+
// isURL is the validation function for validating if the current field's value is a valid URL.
func isURL(fl FieldLevel) bool {
field := fl.Field()
@@ -1420,12 +1457,16 @@ func isURL(fl FieldLevel) bool {
switch field.Kind() {
case reflect.String:
- s := field.String()
+ s := strings.ToLower(field.String())
if len(s) == 0 {
return false
}
+ if isFileURL(s) {
+ return true
+ }
+
url, err := url.Parse(s)
if err != nil || url.Scheme == "" {
return false
diff --git a/vendor/github.com/go-playground/validator/v10/cache.go b/vendor/github.com/go-playground/validator/v10/cache.go
index bbfd2a4a..0f4fa6b5 100644
--- a/vendor/github.com/go-playground/validator/v10/cache.go
+++ b/vendor/github.com/go-playground/validator/v10/cache.go
@@ -20,6 +20,7 @@ const (
typeOr
typeKeys
typeEndKeys
+ typeOmitNil
)
const (
@@ -252,6 +253,10 @@ func (v *Validate) parseFieldTagsRecursive(tag string, fieldName string, alias s
current.typeof = typeOmitEmpty
continue
+ case omitnil:
+ current.typeof = typeOmitNil
+ continue
+
case structOnlyTag:
current.typeof = typeStructOnly
continue
diff --git a/vendor/github.com/go-playground/validator/v10/doc.go b/vendor/github.com/go-playground/validator/v10/doc.go
index c4dbb595..b4740918 100644
--- a/vendor/github.com/go-playground/validator/v10/doc.go
+++ b/vendor/github.com/go-playground/validator/v10/doc.go
@@ -194,6 +194,13 @@ such as min or max won't run, but if a value is set validation will run.
Usage: omitempty
+# Omit Nil
+
+Allows to skip the validation if the value is nil (same as omitempty, but
+only for the nil-values).
+
+ Usage: omitnil
+
# Dive
This tells the validator to dive into a slice, array or map and validate that
diff --git a/vendor/github.com/go-playground/validator/v10/errors.go b/vendor/github.com/go-playground/validator/v10/errors.go
index 5856d57c..be2676e9 100644
--- a/vendor/github.com/go-playground/validator/v10/errors.go
+++ b/vendor/github.com/go-playground/validator/v10/errors.go
@@ -257,15 +257,19 @@ func (fe *fieldError) Error() string {
// NOTE: if no registered translation can be found, it returns the original
// untranslated error message.
func (fe *fieldError) Translate(ut ut.Translator) string {
+ var fn TranslationFunc
m, ok := fe.v.transTagFunc[ut]
if !ok {
return fe.Error()
}
- fn, ok := m[fe.tag]
+ fn, ok = m[fe.tag]
if !ok {
- return fe.Error()
+ fn, ok = m[fe.actualTag]
+ if !ok {
+ return fe.Error()
+ }
}
return fn(ut, fe)
diff --git a/vendor/github.com/go-playground/validator/v10/regexes.go b/vendor/github.com/go-playground/validator/v10/regexes.go
index 6c8f9856..af98d8da 100644
--- a/vendor/github.com/go-playground/validator/v10/regexes.go
+++ b/vendor/github.com/go-playground/validator/v10/regexes.go
@@ -22,6 +22,7 @@ const (
base64RawURLRegexString = "^(?:[A-Za-z0-9-_]{4})*(?:[A-Za-z0-9-_]{2,4})$"
iSBN10RegexString = "^(?:[0-9]{9}X|[0-9]{10})$"
iSBN13RegexString = "^(?:(?:97(?:8|9))[0-9]{10})$"
+ iSSNRegexString = "^(?:[0-9]{4}-[0-9]{3}[0-9X])$"
uUID3RegexString = "^[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$"
uUID4RegexString = "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
uUID5RegexString = "^[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
@@ -93,6 +94,7 @@ var (
base64RawURLRegex = regexp.MustCompile(base64RawURLRegexString)
iSBN10Regex = regexp.MustCompile(iSBN10RegexString)
iSBN13Regex = regexp.MustCompile(iSBN13RegexString)
+ iSSNRegex = regexp.MustCompile(iSSNRegexString)
uUID3Regex = regexp.MustCompile(uUID3RegexString)
uUID4Regex = regexp.MustCompile(uUID4RegexString)
uUID5Regex = regexp.MustCompile(uUID5RegexString)
diff --git a/vendor/github.com/go-playground/validator/v10/util.go b/vendor/github.com/go-playground/validator/v10/util.go
index 4bd947bd..16851593 100644
--- a/vendor/github.com/go-playground/validator/v10/util.go
+++ b/vendor/github.com/go-playground/validator/v10/util.go
@@ -1,7 +1,9 @@
package validator
import (
+ "fmt"
"reflect"
+ "regexp"
"strconv"
"strings"
"time"
@@ -292,3 +294,18 @@ func panicIf(err error) {
panic(err.Error())
}
}
+
+// Checks if field value matches regex. If fl.Field can be cast to Stringer, it uses the Stringer interfaces
+// String() return value. Otherwise, it uses fl.Field's String() value.
+func fieldMatchesRegexByStringerValOrString(regex *regexp.Regexp, fl FieldLevel) bool {
+ switch fl.Field().Kind() {
+ case reflect.String:
+ return regex.MatchString(fl.Field().String())
+ default:
+ if stringer, ok := fl.Field().Interface().(fmt.Stringer); ok {
+ return regex.MatchString(stringer.String())
+ } else {
+ return regex.MatchString(fl.Field().String())
+ }
+ }
+}
diff --git a/vendor/github.com/go-playground/validator/v10/validator.go b/vendor/github.com/go-playground/validator/v10/validator.go
index 342c4ec2..a072d39c 100644
--- a/vendor/github.com/go-playground/validator/v10/validator.go
+++ b/vendor/github.com/go-playground/validator/v10/validator.go
@@ -112,6 +112,10 @@ func (v *validate) traverseField(ctx context.Context, parent reflect.Value, curr
return
}
+ if ct.typeof == typeOmitNil && (kind != reflect.Invalid && current.IsNil()) {
+ return
+ }
+
if ct.hasTag {
if kind == reflect.Invalid {
v.str1 = string(append(ns, cf.altName...))
@@ -233,6 +237,26 @@ OUTER:
ct = ct.next
continue
+ case typeOmitNil:
+ v.slflParent = parent
+ v.flField = current
+ v.cf = cf
+ v.ct = ct
+
+ switch field := v.Field(); field.Kind() {
+ case reflect.Slice, reflect.Map, reflect.Ptr, reflect.Interface, reflect.Chan, reflect.Func:
+ if field.IsNil() {
+ return
+ }
+ default:
+ if v.fldIsPointer && field.Interface() == nil {
+ return
+ }
+ }
+
+ ct = ct.next
+ continue
+
case typeEndKeys:
return
diff --git a/vendor/github.com/go-playground/validator/v10/validator_instance.go b/vendor/github.com/go-playground/validator/v10/validator_instance.go
index a4dbdd09..d5a7be1d 100644
--- a/vendor/github.com/go-playground/validator/v10/validator_instance.go
+++ b/vendor/github.com/go-playground/validator/v10/validator_instance.go
@@ -22,6 +22,7 @@ const (
structOnlyTag = "structonly"
noStructLevelTag = "nostructlevel"
omitempty = "omitempty"
+ omitnil = "omitnil"
isdefault = "isdefault"
requiredWithoutAllTag = "required_without_all"
requiredWithoutTag = "required_without"
diff --git a/vendor/github.com/klauspost/cpuid/v2/README.md b/vendor/github.com/klauspost/cpuid/v2/README.md
index accd7aba..30f8d296 100644
--- a/vendor/github.com/klauspost/cpuid/v2/README.md
+++ b/vendor/github.com/klauspost/cpuid/v2/README.md
@@ -9,10 +9,7 @@ You can access the CPU information by accessing the shared CPU variable of the c
Package home: https://github.com/klauspost/cpuid
[](https://pkg.go.dev/github.com/klauspost/cpuid/v2)
-[![Build Status][3]][4]
-
-[3]: https://travis-ci.org/klauspost/cpuid.svg?branch=master
-[4]: https://travis-ci.org/klauspost/cpuid
+[](https://github.com/klauspost/cpuid/actions/workflows/go.yml)
## installing
@@ -285,7 +282,12 @@ Exit Code 1
| AMXINT8 | Tile computational operations on 8-bit integers |
| AMXFP16 | Tile computational operations on FP16 numbers |
| AMXTILE | Tile architecture |
+| APX_F | Intel APX |
| AVX | AVX functions |
+| AVX10 | If set the Intel AVX10 Converged Vector ISA is supported |
+| AVX10_128 | If set indicates that AVX10 128-bit vector support is present |
+| AVX10_256 | If set indicates that AVX10 256-bit vector support is present |
+| AVX10_512 | If set indicates that AVX10 512-bit vector support is present |
| AVX2 | AVX2 functions |
| AVX512BF16 | AVX-512 BFLOAT16 Instructions |
| AVX512BITALG | AVX-512 Bit Algorithms |
@@ -365,6 +367,8 @@ Exit Code 1
| IDPRED_CTRL | IPRED_DIS |
| INT_WBINVD | WBINVD/WBNOINVD are interruptible. |
| INVLPGB | NVLPGB and TLBSYNC instruction supported |
+| KEYLOCKER | Key locker |
+| KEYLOCKERW | Key locker wide |
| LAHF | LAHF/SAHF in long mode |
| LAM | If set, CPU supports Linear Address Masking |
| LBRVIRT | LBR virtualization |
@@ -380,7 +384,7 @@ Exit Code 1
| MOVDIRI | Move Doubleword as Direct Store |
| MOVSB_ZL | Fast Zero-Length MOVSB |
| MPX | Intel MPX (Memory Protection Extensions) |
-| MOVU | MOVU SSE instructions are more efficient and should be preferred to SSE MOVL/MOVH. MOVUPS is more efficient than MOVLPS/MOVHPS. MOVUPD is more efficient than MOVLPD/MOVHPD |
+| MOVU | MOVU SSE instructions are more efficient and should be preferred to SSE MOVL/MOVH. MOVUPS is more efficient than MOVLPS/MOVHPS. MOVUPD is more efficient than MOVLPD/MOVHPD |
| MSRIRC | Instruction Retired Counter MSR available |
| MSRLIST | Read/Write List of Model Specific Registers |
| MSR_PAGEFLUSH | Page Flush MSR available |
diff --git a/vendor/github.com/klauspost/cpuid/v2/cpuid.go b/vendor/github.com/klauspost/cpuid/v2/cpuid.go
index d015c744..805f5e7b 100644
--- a/vendor/github.com/klauspost/cpuid/v2/cpuid.go
+++ b/vendor/github.com/klauspost/cpuid/v2/cpuid.go
@@ -67,188 +67,200 @@ const (
// Keep index -1 as unknown
UNKNOWN = -1
- // Add features
- ADX FeatureID = iota // Intel ADX (Multi-Precision Add-Carry Instruction Extensions)
- AESNI // Advanced Encryption Standard New Instructions
- AMD3DNOW // AMD 3DNOW
- AMD3DNOWEXT // AMD 3DNowExt
- AMXBF16 // Tile computational operations on BFLOAT16 numbers
- AMXFP16 // Tile computational operations on FP16 numbers
- AMXINT8 // Tile computational operations on 8-bit integers
- AMXTILE // Tile architecture
- AVX // AVX functions
- AVX2 // AVX2 functions
- AVX512BF16 // AVX-512 BFLOAT16 Instructions
- AVX512BITALG // AVX-512 Bit Algorithms
- AVX512BW // AVX-512 Byte and Word Instructions
- AVX512CD // AVX-512 Conflict Detection Instructions
- AVX512DQ // AVX-512 Doubleword and Quadword Instructions
- AVX512ER // AVX-512 Exponential and Reciprocal Instructions
- AVX512F // AVX-512 Foundation
- AVX512FP16 // AVX-512 FP16 Instructions
- AVX512IFMA // AVX-512 Integer Fused Multiply-Add Instructions
- AVX512PF // AVX-512 Prefetch Instructions
- AVX512VBMI // AVX-512 Vector Bit Manipulation Instructions
- AVX512VBMI2 // AVX-512 Vector Bit Manipulation Instructions, Version 2
- AVX512VL // AVX-512 Vector Length Extensions
- AVX512VNNI // AVX-512 Vector Neural Network Instructions
- AVX512VP2INTERSECT // AVX-512 Intersect for D/Q
- AVX512VPOPCNTDQ // AVX-512 Vector Population Count Doubleword and Quadword
- AVXIFMA // AVX-IFMA instructions
- AVXNECONVERT // AVX-NE-CONVERT instructions
- AVXSLOW // Indicates the CPU performs 2 128 bit operations instead of one
- AVXVNNI // AVX (VEX encoded) VNNI neural network instructions
- AVXVNNIINT8 // AVX-VNNI-INT8 instructions
- BHI_CTRL // Branch History Injection and Intra-mode Branch Target Injection / CVE-2022-0001, CVE-2022-0002 / INTEL-SA-00598
- BMI1 // Bit Manipulation Instruction Set 1
- BMI2 // Bit Manipulation Instruction Set 2
- CETIBT // Intel CET Indirect Branch Tracking
- CETSS // Intel CET Shadow Stack
- CLDEMOTE // Cache Line Demote
- CLMUL // Carry-less Multiplication
- CLZERO // CLZERO instruction supported
- CMOV // i686 CMOV
- CMPCCXADD // CMPCCXADD instructions
- CMPSB_SCADBS_SHORT // Fast short CMPSB and SCASB
- CMPXCHG8 // CMPXCHG8 instruction
- CPBOOST // Core Performance Boost
- CPPC // AMD: Collaborative Processor Performance Control
- CX16 // CMPXCHG16B Instruction
- EFER_LMSLE_UNS // AMD: =Core::X86::Msr::EFER[LMSLE] is not supported, and MBZ
- ENQCMD // Enqueue Command
- ERMS // Enhanced REP MOVSB/STOSB
- F16C // Half-precision floating-point conversion
- FLUSH_L1D // Flush L1D cache
- FMA3 // Intel FMA 3. Does not imply AVX.
- FMA4 // Bulldozer FMA4 functions
- FP128 // AMD: When set, the internal FP/SIMD execution datapath is no more than 128-bits wide
- FP256 // AMD: When set, the internal FP/SIMD execution datapath is no more than 256-bits wide
- FSRM // Fast Short Rep Mov
- FXSR // FXSAVE, FXRESTOR instructions, CR4 bit 9
- FXSROPT // FXSAVE/FXRSTOR optimizations
- GFNI // Galois Field New Instructions. May require other features (AVX, AVX512VL,AVX512F) based on usage.
- HLE // Hardware Lock Elision
- HRESET // If set CPU supports history reset and the IA32_HRESET_ENABLE MSR
- HTT // Hyperthreading (enabled)
- HWA // Hardware assert supported. Indicates support for MSRC001_10
- HYBRID_CPU // This part has CPUs of more than one type.
- HYPERVISOR // This bit has been reserved by Intel & AMD for use by hypervisors
- IA32_ARCH_CAP // IA32_ARCH_CAPABILITIES MSR (Intel)
- IA32_CORE_CAP // IA32_CORE_CAPABILITIES MSR
- IBPB // Indirect Branch Restricted Speculation (IBRS) and Indirect Branch Predictor Barrier (IBPB)
- IBRS // AMD: Indirect Branch Restricted Speculation
- IBRS_PREFERRED // AMD: IBRS is preferred over software solution
- IBRS_PROVIDES_SMP // AMD: IBRS provides Same Mode Protection
- IBS // Instruction Based Sampling (AMD)
- IBSBRNTRGT // Instruction Based Sampling Feature (AMD)
- IBSFETCHSAM // Instruction Based Sampling Feature (AMD)
- IBSFFV // Instruction Based Sampling Feature (AMD)
- IBSOPCNT // Instruction Based Sampling Feature (AMD)
- IBSOPCNTEXT // Instruction Based Sampling Feature (AMD)
- IBSOPSAM // Instruction Based Sampling Feature (AMD)
- IBSRDWROPCNT // Instruction Based Sampling Feature (AMD)
- IBSRIPINVALIDCHK // Instruction Based Sampling Feature (AMD)
- IBS_FETCH_CTLX // AMD: IBS fetch control extended MSR supported
- IBS_OPDATA4 // AMD: IBS op data 4 MSR supported
- IBS_OPFUSE // AMD: Indicates support for IbsOpFuse
- IBS_PREVENTHOST // Disallowing IBS use by the host supported
- IBS_ZEN4 // AMD: Fetch and Op IBS support IBS extensions added with Zen4
- IDPRED_CTRL // IPRED_DIS
- INT_WBINVD // WBINVD/WBNOINVD are interruptible.
- INVLPGB // NVLPGB and TLBSYNC instruction supported
- LAHF // LAHF/SAHF in long mode
- LAM // If set, CPU supports Linear Address Masking
- LBRVIRT // LBR virtualization
- LZCNT // LZCNT instruction
- MCAOVERFLOW // MCA overflow recovery support.
- MCDT_NO // Processor do not exhibit MXCSR Configuration Dependent Timing behavior and do not need to mitigate it.
- MCOMMIT // MCOMMIT instruction supported
- MD_CLEAR // VERW clears CPU buffers
- MMX // standard MMX
- MMXEXT // SSE integer functions or AMD MMX ext
- MOVBE // MOVBE instruction (big-endian)
- MOVDIR64B // Move 64 Bytes as Direct Store
- MOVDIRI // Move Doubleword as Direct Store
- MOVSB_ZL // Fast Zero-Length MOVSB
- MOVU // AMD: MOVU SSE instructions are more efficient and should be preferred to SSE MOVL/MOVH. MOVUPS is more efficient than MOVLPS/MOVHPS. MOVUPD is more efficient than MOVLPD/MOVHPD
- MPX // Intel MPX (Memory Protection Extensions)
- MSRIRC // Instruction Retired Counter MSR available
- MSRLIST // Read/Write List of Model Specific Registers
- MSR_PAGEFLUSH // Page Flush MSR available
- NRIPS // Indicates support for NRIP save on VMEXIT
- NX // NX (No-Execute) bit
- OSXSAVE // XSAVE enabled by OS
- PCONFIG // PCONFIG for Intel Multi-Key Total Memory Encryption
- POPCNT // POPCNT instruction
- PPIN // AMD: Protected Processor Inventory Number support. Indicates that Protected Processor Inventory Number (PPIN) capability can be enabled
- PREFETCHI // PREFETCHIT0/1 instructions
- PSFD // Predictive Store Forward Disable
- RDPRU // RDPRU instruction supported
- RDRAND // RDRAND instruction is available
- RDSEED // RDSEED instruction is available
- RDTSCP // RDTSCP Instruction
- RRSBA_CTRL // Restricted RSB Alternate
- RTM // Restricted Transactional Memory
- RTM_ALWAYS_ABORT // Indicates that the loaded microcode is forcing RTM abort.
- SERIALIZE // Serialize Instruction Execution
- SEV // AMD Secure Encrypted Virtualization supported
- SEV_64BIT // AMD SEV guest execution only allowed from a 64-bit host
- SEV_ALTERNATIVE // AMD SEV Alternate Injection supported
- SEV_DEBUGSWAP // Full debug state swap supported for SEV-ES guests
- SEV_ES // AMD SEV Encrypted State supported
- SEV_RESTRICTED // AMD SEV Restricted Injection supported
- SEV_SNP // AMD SEV Secure Nested Paging supported
- SGX // Software Guard Extensions
- SGXLC // Software Guard Extensions Launch Control
- SHA // Intel SHA Extensions
- SME // AMD Secure Memory Encryption supported
- SME_COHERENT // AMD Hardware cache coherency across encryption domains enforced
- SPEC_CTRL_SSBD // Speculative Store Bypass Disable
- SRBDS_CTRL // SRBDS mitigation MSR available
- SSE // SSE functions
- SSE2 // P4 SSE functions
- SSE3 // Prescott SSE3 functions
- SSE4 // Penryn SSE4.1 functions
- SSE42 // Nehalem SSE4.2 functions
- SSE4A // AMD Barcelona microarchitecture SSE4a instructions
- SSSE3 // Conroe SSSE3 functions
- STIBP // Single Thread Indirect Branch Predictors
- STIBP_ALWAYSON // AMD: Single Thread Indirect Branch Prediction Mode has Enhanced Performance and may be left Always On
- STOSB_SHORT // Fast short STOSB
- SUCCOR // Software uncorrectable error containment and recovery capability.
- SVM // AMD Secure Virtual Machine
- SVMDA // Indicates support for the SVM decode assists.
- SVMFBASID // SVM, Indicates that TLB flush events, including CR3 writes and CR4.PGE toggles, flush only the current ASID's TLB entries. Also indicates support for the extended VMCBTLB_Control
- SVML // AMD SVM lock. Indicates support for SVM-Lock.
- SVMNP // AMD SVM nested paging
- SVMPF // SVM pause intercept filter. Indicates support for the pause intercept filter
- SVMPFT // SVM PAUSE filter threshold. Indicates support for the PAUSE filter cycle count threshold
- SYSCALL // System-Call Extension (SCE): SYSCALL and SYSRET instructions.
- SYSEE // SYSENTER and SYSEXIT instructions
- TBM // AMD Trailing Bit Manipulation
- TDX_GUEST // Intel Trust Domain Extensions Guest
- TLB_FLUSH_NESTED // AMD: Flushing includes all the nested translations for guest translations
- TME // Intel Total Memory Encryption. The following MSRs are supported: IA32_TME_CAPABILITY, IA32_TME_ACTIVATE, IA32_TME_EXCLUDE_MASK, and IA32_TME_EXCLUDE_BASE.
- TOPEXT // TopologyExtensions: topology extensions support. Indicates support for CPUID Fn8000_001D_EAX_x[N:0]-CPUID Fn8000_001E_EDX.
- TSCRATEMSR // MSR based TSC rate control. Indicates support for MSR TSC ratio MSRC000_0104
- TSXLDTRK // Intel TSX Suspend Load Address Tracking
- VAES // Vector AES. AVX(512) versions requires additional checks.
- VMCBCLEAN // VMCB clean bits. Indicates support for VMCB clean bits.
- VMPL // AMD VM Permission Levels supported
- VMSA_REGPROT // AMD VMSA Register Protection supported
- VMX // Virtual Machine Extensions
- VPCLMULQDQ // Carry-Less Multiplication Quadword. Requires AVX for 3 register versions.
- VTE // AMD Virtual Transparent Encryption supported
- WAITPKG // TPAUSE, UMONITOR, UMWAIT
- WBNOINVD // Write Back and Do Not Invalidate Cache
- WRMSRNS // Non-Serializing Write to Model Specific Register
- X87 // FPU
- XGETBV1 // Supports XGETBV with ECX = 1
- XOP // Bulldozer XOP functions
- XSAVE // XSAVE, XRESTOR, XSETBV, XGETBV
- XSAVEC // Supports XSAVEC and the compacted form of XRSTOR.
- XSAVEOPT // XSAVEOPT available
- XSAVES // Supports XSAVES/XRSTORS and IA32_XSS
+ // x86 features
+ ADX FeatureID = iota // Intel ADX (Multi-Precision Add-Carry Instruction Extensions)
+ AESNI // Advanced Encryption Standard New Instructions
+ AMD3DNOW // AMD 3DNOW
+ AMD3DNOWEXT // AMD 3DNowExt
+ AMXBF16 // Tile computational operations on BFLOAT16 numbers
+ AMXFP16 // Tile computational operations on FP16 numbers
+ AMXINT8 // Tile computational operations on 8-bit integers
+ AMXTILE // Tile architecture
+ APX_F // Intel APX
+ AVX // AVX functions
+ AVX10 // If set the Intel AVX10 Converged Vector ISA is supported
+ AVX10_128 // If set indicates that AVX10 128-bit vector support is present
+ AVX10_256 // If set indicates that AVX10 256-bit vector support is present
+ AVX10_512 // If set indicates that AVX10 512-bit vector support is present
+ AVX2 // AVX2 functions
+ AVX512BF16 // AVX-512 BFLOAT16 Instructions
+ AVX512BITALG // AVX-512 Bit Algorithms
+ AVX512BW // AVX-512 Byte and Word Instructions
+ AVX512CD // AVX-512 Conflict Detection Instructions
+ AVX512DQ // AVX-512 Doubleword and Quadword Instructions
+ AVX512ER // AVX-512 Exponential and Reciprocal Instructions
+ AVX512F // AVX-512 Foundation
+ AVX512FP16 // AVX-512 FP16 Instructions
+ AVX512IFMA // AVX-512 Integer Fused Multiply-Add Instructions
+ AVX512PF // AVX-512 Prefetch Instructions
+ AVX512VBMI // AVX-512 Vector Bit Manipulation Instructions
+ AVX512VBMI2 // AVX-512 Vector Bit Manipulation Instructions, Version 2
+ AVX512VL // AVX-512 Vector Length Extensions
+ AVX512VNNI // AVX-512 Vector Neural Network Instructions
+ AVX512VP2INTERSECT // AVX-512 Intersect for D/Q
+ AVX512VPOPCNTDQ // AVX-512 Vector Population Count Doubleword and Quadword
+ AVXIFMA // AVX-IFMA instructions
+ AVXNECONVERT // AVX-NE-CONVERT instructions
+ AVXSLOW // Indicates the CPU performs 2 128 bit operations instead of one
+ AVXVNNI // AVX (VEX encoded) VNNI neural network instructions
+ AVXVNNIINT8 // AVX-VNNI-INT8 instructions
+ BHI_CTRL // Branch History Injection and Intra-mode Branch Target Injection / CVE-2022-0001, CVE-2022-0002 / INTEL-SA-00598
+ BMI1 // Bit Manipulation Instruction Set 1
+ BMI2 // Bit Manipulation Instruction Set 2
+ CETIBT // Intel CET Indirect Branch Tracking
+ CETSS // Intel CET Shadow Stack
+ CLDEMOTE // Cache Line Demote
+ CLMUL // Carry-less Multiplication
+ CLZERO // CLZERO instruction supported
+ CMOV // i686 CMOV
+ CMPCCXADD // CMPCCXADD instructions
+ CMPSB_SCADBS_SHORT // Fast short CMPSB and SCASB
+ CMPXCHG8 // CMPXCHG8 instruction
+ CPBOOST // Core Performance Boost
+ CPPC // AMD: Collaborative Processor Performance Control
+ CX16 // CMPXCHG16B Instruction
+ EFER_LMSLE_UNS // AMD: =Core::X86::Msr::EFER[LMSLE] is not supported, and MBZ
+ ENQCMD // Enqueue Command
+ ERMS // Enhanced REP MOVSB/STOSB
+ F16C // Half-precision floating-point conversion
+ FLUSH_L1D // Flush L1D cache
+ FMA3 // Intel FMA 3. Does not imply AVX.
+ FMA4 // Bulldozer FMA4 functions
+ FP128 // AMD: When set, the internal FP/SIMD execution datapath is no more than 128-bits wide
+ FP256 // AMD: When set, the internal FP/SIMD execution datapath is no more than 256-bits wide
+ FSRM // Fast Short Rep Mov
+ FXSR // FXSAVE, FXRESTOR instructions, CR4 bit 9
+ FXSROPT // FXSAVE/FXRSTOR optimizations
+ GFNI // Galois Field New Instructions. May require other features (AVX, AVX512VL,AVX512F) based on usage.
+ HLE // Hardware Lock Elision
+ HRESET // If set CPU supports history reset and the IA32_HRESET_ENABLE MSR
+ HTT // Hyperthreading (enabled)
+ HWA // Hardware assert supported. Indicates support for MSRC001_10
+ HYBRID_CPU // This part has CPUs of more than one type.
+ HYPERVISOR // This bit has been reserved by Intel & AMD for use by hypervisors
+ IA32_ARCH_CAP // IA32_ARCH_CAPABILITIES MSR (Intel)
+ IA32_CORE_CAP // IA32_CORE_CAPABILITIES MSR
+ IBPB // Indirect Branch Restricted Speculation (IBRS) and Indirect Branch Predictor Barrier (IBPB)
+ IBPB_BRTYPE // Indicates that MSR 49h (PRED_CMD) bit 0 (IBPB) flushes all branch type predictions from the CPU branch predictor
+ IBRS // AMD: Indirect Branch Restricted Speculation
+ IBRS_PREFERRED // AMD: IBRS is preferred over software solution
+ IBRS_PROVIDES_SMP // AMD: IBRS provides Same Mode Protection
+ IBS // Instruction Based Sampling (AMD)
+ IBSBRNTRGT // Instruction Based Sampling Feature (AMD)
+ IBSFETCHSAM // Instruction Based Sampling Feature (AMD)
+ IBSFFV // Instruction Based Sampling Feature (AMD)
+ IBSOPCNT // Instruction Based Sampling Feature (AMD)
+ IBSOPCNTEXT // Instruction Based Sampling Feature (AMD)
+ IBSOPSAM // Instruction Based Sampling Feature (AMD)
+ IBSRDWROPCNT // Instruction Based Sampling Feature (AMD)
+ IBSRIPINVALIDCHK // Instruction Based Sampling Feature (AMD)
+ IBS_FETCH_CTLX // AMD: IBS fetch control extended MSR supported
+ IBS_OPDATA4 // AMD: IBS op data 4 MSR supported
+ IBS_OPFUSE // AMD: Indicates support for IbsOpFuse
+ IBS_PREVENTHOST // Disallowing IBS use by the host supported
+ IBS_ZEN4 // AMD: Fetch and Op IBS support IBS extensions added with Zen4
+ IDPRED_CTRL // IPRED_DIS
+ INT_WBINVD // WBINVD/WBNOINVD are interruptible.
+ INVLPGB // NVLPGB and TLBSYNC instruction supported
+ KEYLOCKER // Key locker
+ KEYLOCKERW // Key locker wide
+ LAHF // LAHF/SAHF in long mode
+ LAM // If set, CPU supports Linear Address Masking
+ LBRVIRT // LBR virtualization
+ LZCNT // LZCNT instruction
+ MCAOVERFLOW // MCA overflow recovery support.
+ MCDT_NO // Processor do not exhibit MXCSR Configuration Dependent Timing behavior and do not need to mitigate it.
+ MCOMMIT // MCOMMIT instruction supported
+ MD_CLEAR // VERW clears CPU buffers
+ MMX // standard MMX
+ MMXEXT // SSE integer functions or AMD MMX ext
+ MOVBE // MOVBE instruction (big-endian)
+ MOVDIR64B // Move 64 Bytes as Direct Store
+ MOVDIRI // Move Doubleword as Direct Store
+ MOVSB_ZL // Fast Zero-Length MOVSB
+ MOVU // AMD: MOVU SSE instructions are more efficient and should be preferred to SSE MOVL/MOVH. MOVUPS is more efficient than MOVLPS/MOVHPS. MOVUPD is more efficient than MOVLPD/MOVHPD
+ MPX // Intel MPX (Memory Protection Extensions)
+ MSRIRC // Instruction Retired Counter MSR available
+ MSRLIST // Read/Write List of Model Specific Registers
+ MSR_PAGEFLUSH // Page Flush MSR available
+ NRIPS // Indicates support for NRIP save on VMEXIT
+ NX // NX (No-Execute) bit
+ OSXSAVE // XSAVE enabled by OS
+ PCONFIG // PCONFIG for Intel Multi-Key Total Memory Encryption
+ POPCNT // POPCNT instruction
+ PPIN // AMD: Protected Processor Inventory Number support. Indicates that Protected Processor Inventory Number (PPIN) capability can be enabled
+ PREFETCHI // PREFETCHIT0/1 instructions
+ PSFD // Predictive Store Forward Disable
+ RDPRU // RDPRU instruction supported
+ RDRAND // RDRAND instruction is available
+ RDSEED // RDSEED instruction is available
+ RDTSCP // RDTSCP Instruction
+ RRSBA_CTRL // Restricted RSB Alternate
+ RTM // Restricted Transactional Memory
+ RTM_ALWAYS_ABORT // Indicates that the loaded microcode is forcing RTM abort.
+ SBPB // Indicates support for the Selective Branch Predictor Barrier
+ SERIALIZE // Serialize Instruction Execution
+ SEV // AMD Secure Encrypted Virtualization supported
+ SEV_64BIT // AMD SEV guest execution only allowed from a 64-bit host
+ SEV_ALTERNATIVE // AMD SEV Alternate Injection supported
+ SEV_DEBUGSWAP // Full debug state swap supported for SEV-ES guests
+ SEV_ES // AMD SEV Encrypted State supported
+ SEV_RESTRICTED // AMD SEV Restricted Injection supported
+ SEV_SNP // AMD SEV Secure Nested Paging supported
+ SGX // Software Guard Extensions
+ SGXLC // Software Guard Extensions Launch Control
+ SHA // Intel SHA Extensions
+ SME // AMD Secure Memory Encryption supported
+ SME_COHERENT // AMD Hardware cache coherency across encryption domains enforced
+ SPEC_CTRL_SSBD // Speculative Store Bypass Disable
+ SRBDS_CTRL // SRBDS mitigation MSR available
+ SRSO_MSR_FIX // Indicates that software may use MSR BP_CFG[BpSpecReduce] to mitigate SRSO.
+ SRSO_NO // Indicates the CPU is not subject to the SRSO vulnerability
+ SRSO_USER_KERNEL_NO // Indicates the CPU is not subject to the SRSO vulnerability across user/kernel boundaries
+ SSE // SSE functions
+ SSE2 // P4 SSE functions
+ SSE3 // Prescott SSE3 functions
+ SSE4 // Penryn SSE4.1 functions
+ SSE42 // Nehalem SSE4.2 functions
+ SSE4A // AMD Barcelona microarchitecture SSE4a instructions
+ SSSE3 // Conroe SSSE3 functions
+ STIBP // Single Thread Indirect Branch Predictors
+ STIBP_ALWAYSON // AMD: Single Thread Indirect Branch Prediction Mode has Enhanced Performance and may be left Always On
+ STOSB_SHORT // Fast short STOSB
+ SUCCOR // Software uncorrectable error containment and recovery capability.
+ SVM // AMD Secure Virtual Machine
+ SVMDA // Indicates support for the SVM decode assists.
+ SVMFBASID // SVM, Indicates that TLB flush events, including CR3 writes and CR4.PGE toggles, flush only the current ASID's TLB entries. Also indicates support for the extended VMCBTLB_Control
+ SVML // AMD SVM lock. Indicates support for SVM-Lock.
+ SVMNP // AMD SVM nested paging
+ SVMPF // SVM pause intercept filter. Indicates support for the pause intercept filter
+ SVMPFT // SVM PAUSE filter threshold. Indicates support for the PAUSE filter cycle count threshold
+ SYSCALL // System-Call Extension (SCE): SYSCALL and SYSRET instructions.
+ SYSEE // SYSENTER and SYSEXIT instructions
+ TBM // AMD Trailing Bit Manipulation
+ TDX_GUEST // Intel Trust Domain Extensions Guest
+ TLB_FLUSH_NESTED // AMD: Flushing includes all the nested translations for guest translations
+ TME // Intel Total Memory Encryption. The following MSRs are supported: IA32_TME_CAPABILITY, IA32_TME_ACTIVATE, IA32_TME_EXCLUDE_MASK, and IA32_TME_EXCLUDE_BASE.
+ TOPEXT // TopologyExtensions: topology extensions support. Indicates support for CPUID Fn8000_001D_EAX_x[N:0]-CPUID Fn8000_001E_EDX.
+ TSCRATEMSR // MSR based TSC rate control. Indicates support for MSR TSC ratio MSRC000_0104
+ TSXLDTRK // Intel TSX Suspend Load Address Tracking
+ VAES // Vector AES. AVX(512) versions requires additional checks.
+ VMCBCLEAN // VMCB clean bits. Indicates support for VMCB clean bits.
+ VMPL // AMD VM Permission Levels supported
+ VMSA_REGPROT // AMD VMSA Register Protection supported
+ VMX // Virtual Machine Extensions
+ VPCLMULQDQ // Carry-Less Multiplication Quadword. Requires AVX for 3 register versions.
+ VTE // AMD Virtual Transparent Encryption supported
+ WAITPKG // TPAUSE, UMONITOR, UMWAIT
+ WBNOINVD // Write Back and Do Not Invalidate Cache
+ WRMSRNS // Non-Serializing Write to Model Specific Register
+ X87 // FPU
+ XGETBV1 // Supports XGETBV with ECX = 1
+ XOP // Bulldozer XOP functions
+ XSAVE // XSAVE, XRESTOR, XSETBV, XGETBV
+ XSAVEC // Supports XSAVEC and the compacted form of XRSTOR.
+ XSAVEOPT // XSAVEOPT available
+ XSAVES // Supports XSAVES/XRSTORS and IA32_XSS
// ARM features:
AESARM // AES instructions
@@ -302,9 +314,11 @@ type CPUInfo struct {
L2 int // L2 Cache (per core or shared). Will be -1 if undetected
L3 int // L3 Cache (per core, per ccx or shared). Will be -1 if undetected
}
- SGX SGXSupport
- maxFunc uint32
- maxExFunc uint32
+ SGX SGXSupport
+ AMDMemEncryption AMDMemEncryptionSupport
+ AVX10Level uint8
+ maxFunc uint32
+ maxExFunc uint32
}
var cpuid func(op uint32) (eax, ebx, ecx, edx uint32)
@@ -1071,6 +1085,32 @@ func hasSGX(available, lc bool) (rval SGXSupport) {
return
}
+type AMDMemEncryptionSupport struct {
+ Available bool
+ CBitPossition uint32
+ NumVMPL uint32
+ PhysAddrReduction uint32
+ NumEntryptedGuests uint32
+ MinSevNoEsAsid uint32
+}
+
+func hasAMDMemEncryption(available bool) (rval AMDMemEncryptionSupport) {
+ rval.Available = available
+ if !available {
+ return
+ }
+
+ _, b, c, d := cpuidex(0x8000001f, 0)
+
+ rval.CBitPossition = b & 0x3f
+ rval.PhysAddrReduction = (b >> 6) & 0x3F
+ rval.NumVMPL = (b >> 12) & 0xf
+ rval.NumEntryptedGuests = c
+ rval.MinSevNoEsAsid = d
+
+ return
+}
+
func support() flagSet {
var fs flagSet
mfi := maxFunctionID()
@@ -1165,6 +1205,7 @@ func support() flagSet {
fs.setIf(ecx&(1<<10) != 0, VPCLMULQDQ)
fs.setIf(ecx&(1<<13) != 0, TME)
fs.setIf(ecx&(1<<25) != 0, CLDEMOTE)
+ fs.setIf(ecx&(1<<23) != 0, KEYLOCKER)
fs.setIf(ecx&(1<<27) != 0, MOVDIRI)
fs.setIf(ecx&(1<<28) != 0, MOVDIR64B)
fs.setIf(ecx&(1<<29) != 0, ENQCMD)
@@ -1202,6 +1243,8 @@ func support() flagSet {
fs.setIf(edx1&(1<<4) != 0, AVXVNNIINT8)
fs.setIf(edx1&(1<<5) != 0, AVXNECONVERT)
fs.setIf(edx1&(1<<14) != 0, PREFETCHI)
+ fs.setIf(edx1&(1<<19) != 0, AVX10)
+ fs.setIf(edx1&(1<<21) != 0, APX_F)
// Only detect AVX-512 features if XGETBV is supported
if c&((1<<26)|(1<<27)) == (1<<26)|(1<<27) {
@@ -1252,6 +1295,19 @@ func support() flagSet {
fs.setIf(edx&(1<<4) != 0, BHI_CTRL)
fs.setIf(edx&(1<<5) != 0, MCDT_NO)
+ // Add keylocker features.
+ if fs.inSet(KEYLOCKER) && mfi >= 0x19 {
+ _, ebx, _, _ := cpuidex(0x19, 0)
+ fs.setIf(ebx&5 == 5, KEYLOCKERW) // Bit 0 and 2 (1+4)
+ }
+
+ // Add AVX10 features.
+ if fs.inSet(AVX10) && mfi >= 0x24 {
+ _, ebx, _, _ := cpuidex(0x24, 0)
+ fs.setIf(ebx&(1<<16) != 0, AVX10_128)
+ fs.setIf(ebx&(1<<17) != 0, AVX10_256)
+ fs.setIf(ebx&(1<<18) != 0, AVX10_512)
+ }
}
// Processor Extended State Enumeration Sub-leaf (EAX = 0DH, ECX = 1)
@@ -1394,6 +1450,29 @@ func support() flagSet {
fs.setIf((a>>24)&1 == 1, VMSA_REGPROT)
}
+ if maxExtendedFunction() >= 0x80000021 && vend == AMD {
+ a, _, _, _ := cpuid(0x80000021)
+ fs.setIf((a>>31)&1 == 1, SRSO_MSR_FIX)
+ fs.setIf((a>>30)&1 == 1, SRSO_USER_KERNEL_NO)
+ fs.setIf((a>>29)&1 == 1, SRSO_NO)
+ fs.setIf((a>>28)&1 == 1, IBPB_BRTYPE)
+ fs.setIf((a>>27)&1 == 1, SBPB)
+ }
+
+ if mfi >= 0x20 {
+ // Microsoft has decided to purposefully hide the information
+ // of the guest TEE when VMs are being created using Hyper-V.
+ //
+ // This leads us to check for the Hyper-V cpuid features
+ // (0x4000000C), and then for the `ebx` value set.
+ //
+ // For Intel TDX, `ebx` is set as `0xbe3`, being 3 the part
+ // we're mostly interested about,according to:
+ // https://github.com/torvalds/linux/blob/d2f51b3516dade79269ff45eae2a7668ae711b25/arch/x86/include/asm/hyperv-tlfs.h#L169-L174
+ _, ebx, _, _ := cpuid(0x4000000C)
+ fs.setIf(ebx == 0xbe3, TDX_GUEST)
+ }
+
if mfi >= 0x21 {
// Intel Trusted Domain Extensions Guests have their own cpuid leaf (0x21).
_, ebx, ecx, edx := cpuid(0x21)
@@ -1404,6 +1483,14 @@ func support() flagSet {
return fs
}
+func (c *CPUInfo) supportAVX10() uint8 {
+ if c.maxFunc >= 0x24 && c.featureSet.inSet(AVX10) {
+ _, ebx, _, _ := cpuidex(0x24, 0)
+ return uint8(ebx)
+ }
+ return 0
+}
+
func valAsString(values ...uint32) []byte {
r := make([]byte, 4*len(values))
for i, v := range values {
diff --git a/vendor/github.com/klauspost/cpuid/v2/detect_x86.go b/vendor/github.com/klauspost/cpuid/v2/detect_x86.go
index c946824e..799b400c 100644
--- a/vendor/github.com/klauspost/cpuid/v2/detect_x86.go
+++ b/vendor/github.com/klauspost/cpuid/v2/detect_x86.go
@@ -27,10 +27,12 @@ func addInfo(c *CPUInfo, safe bool) {
c.Family, c.Model, c.Stepping = familyModel()
c.featureSet = support()
c.SGX = hasSGX(c.featureSet.inSet(SGX), c.featureSet.inSet(SGXLC))
+ c.AMDMemEncryption = hasAMDMemEncryption(c.featureSet.inSet(SME) || c.featureSet.inSet(SEV))
c.ThreadsPerCore = threadsPerCore()
c.LogicalCores = logicalCores()
c.PhysicalCores = physicalCores()
c.VendorID, c.VendorString = vendorID()
+ c.AVX10Level = c.supportAVX10()
c.cacheSize()
c.frequencies()
}
diff --git a/vendor/github.com/klauspost/cpuid/v2/featureid_string.go b/vendor/github.com/klauspost/cpuid/v2/featureid_string.go
index 024c706a..57a085a5 100644
--- a/vendor/github.com/klauspost/cpuid/v2/featureid_string.go
+++ b/vendor/github.com/klauspost/cpuid/v2/featureid_string.go
@@ -16,210 +16,222 @@ func _() {
_ = x[AMXFP16-6]
_ = x[AMXINT8-7]
_ = x[AMXTILE-8]
- _ = x[AVX-9]
- _ = x[AVX2-10]
- _ = x[AVX512BF16-11]
- _ = x[AVX512BITALG-12]
- _ = x[AVX512BW-13]
- _ = x[AVX512CD-14]
- _ = x[AVX512DQ-15]
- _ = x[AVX512ER-16]
- _ = x[AVX512F-17]
- _ = x[AVX512FP16-18]
- _ = x[AVX512IFMA-19]
- _ = x[AVX512PF-20]
- _ = x[AVX512VBMI-21]
- _ = x[AVX512VBMI2-22]
- _ = x[AVX512VL-23]
- _ = x[AVX512VNNI-24]
- _ = x[AVX512VP2INTERSECT-25]
- _ = x[AVX512VPOPCNTDQ-26]
- _ = x[AVXIFMA-27]
- _ = x[AVXNECONVERT-28]
- _ = x[AVXSLOW-29]
- _ = x[AVXVNNI-30]
- _ = x[AVXVNNIINT8-31]
- _ = x[BHI_CTRL-32]
- _ = x[BMI1-33]
- _ = x[BMI2-34]
- _ = x[CETIBT-35]
- _ = x[CETSS-36]
- _ = x[CLDEMOTE-37]
- _ = x[CLMUL-38]
- _ = x[CLZERO-39]
- _ = x[CMOV-40]
- _ = x[CMPCCXADD-41]
- _ = x[CMPSB_SCADBS_SHORT-42]
- _ = x[CMPXCHG8-43]
- _ = x[CPBOOST-44]
- _ = x[CPPC-45]
- _ = x[CX16-46]
- _ = x[EFER_LMSLE_UNS-47]
- _ = x[ENQCMD-48]
- _ = x[ERMS-49]
- _ = x[F16C-50]
- _ = x[FLUSH_L1D-51]
- _ = x[FMA3-52]
- _ = x[FMA4-53]
- _ = x[FP128-54]
- _ = x[FP256-55]
- _ = x[FSRM-56]
- _ = x[FXSR-57]
- _ = x[FXSROPT-58]
- _ = x[GFNI-59]
- _ = x[HLE-60]
- _ = x[HRESET-61]
- _ = x[HTT-62]
- _ = x[HWA-63]
- _ = x[HYBRID_CPU-64]
- _ = x[HYPERVISOR-65]
- _ = x[IA32_ARCH_CAP-66]
- _ = x[IA32_CORE_CAP-67]
- _ = x[IBPB-68]
- _ = x[IBRS-69]
- _ = x[IBRS_PREFERRED-70]
- _ = x[IBRS_PROVIDES_SMP-71]
- _ = x[IBS-72]
- _ = x[IBSBRNTRGT-73]
- _ = x[IBSFETCHSAM-74]
- _ = x[IBSFFV-75]
- _ = x[IBSOPCNT-76]
- _ = x[IBSOPCNTEXT-77]
- _ = x[IBSOPSAM-78]
- _ = x[IBSRDWROPCNT-79]
- _ = x[IBSRIPINVALIDCHK-80]
- _ = x[IBS_FETCH_CTLX-81]
- _ = x[IBS_OPDATA4-82]
- _ = x[IBS_OPFUSE-83]
- _ = x[IBS_PREVENTHOST-84]
- _ = x[IBS_ZEN4-85]
- _ = x[IDPRED_CTRL-86]
- _ = x[INT_WBINVD-87]
- _ = x[INVLPGB-88]
- _ = x[LAHF-89]
- _ = x[LAM-90]
- _ = x[LBRVIRT-91]
- _ = x[LZCNT-92]
- _ = x[MCAOVERFLOW-93]
- _ = x[MCDT_NO-94]
- _ = x[MCOMMIT-95]
- _ = x[MD_CLEAR-96]
- _ = x[MMX-97]
- _ = x[MMXEXT-98]
- _ = x[MOVBE-99]
- _ = x[MOVDIR64B-100]
- _ = x[MOVDIRI-101]
- _ = x[MOVSB_ZL-102]
- _ = x[MOVU-103]
- _ = x[MPX-104]
- _ = x[MSRIRC-105]
- _ = x[MSRLIST-106]
- _ = x[MSR_PAGEFLUSH-107]
- _ = x[NRIPS-108]
- _ = x[NX-109]
- _ = x[OSXSAVE-110]
- _ = x[PCONFIG-111]
- _ = x[POPCNT-112]
- _ = x[PPIN-113]
- _ = x[PREFETCHI-114]
- _ = x[PSFD-115]
- _ = x[RDPRU-116]
- _ = x[RDRAND-117]
- _ = x[RDSEED-118]
- _ = x[RDTSCP-119]
- _ = x[RRSBA_CTRL-120]
- _ = x[RTM-121]
- _ = x[RTM_ALWAYS_ABORT-122]
- _ = x[SERIALIZE-123]
- _ = x[SEV-124]
- _ = x[SEV_64BIT-125]
- _ = x[SEV_ALTERNATIVE-126]
- _ = x[SEV_DEBUGSWAP-127]
- _ = x[SEV_ES-128]
- _ = x[SEV_RESTRICTED-129]
- _ = x[SEV_SNP-130]
- _ = x[SGX-131]
- _ = x[SGXLC-132]
- _ = x[SHA-133]
- _ = x[SME-134]
- _ = x[SME_COHERENT-135]
- _ = x[SPEC_CTRL_SSBD-136]
- _ = x[SRBDS_CTRL-137]
- _ = x[SSE-138]
- _ = x[SSE2-139]
- _ = x[SSE3-140]
- _ = x[SSE4-141]
- _ = x[SSE42-142]
- _ = x[SSE4A-143]
- _ = x[SSSE3-144]
- _ = x[STIBP-145]
- _ = x[STIBP_ALWAYSON-146]
- _ = x[STOSB_SHORT-147]
- _ = x[SUCCOR-148]
- _ = x[SVM-149]
- _ = x[SVMDA-150]
- _ = x[SVMFBASID-151]
- _ = x[SVML-152]
- _ = x[SVMNP-153]
- _ = x[SVMPF-154]
- _ = x[SVMPFT-155]
- _ = x[SYSCALL-156]
- _ = x[SYSEE-157]
- _ = x[TBM-158]
- _ = x[TDX_GUEST-159]
- _ = x[TLB_FLUSH_NESTED-160]
- _ = x[TME-161]
- _ = x[TOPEXT-162]
- _ = x[TSCRATEMSR-163]
- _ = x[TSXLDTRK-164]
- _ = x[VAES-165]
- _ = x[VMCBCLEAN-166]
- _ = x[VMPL-167]
- _ = x[VMSA_REGPROT-168]
- _ = x[VMX-169]
- _ = x[VPCLMULQDQ-170]
- _ = x[VTE-171]
- _ = x[WAITPKG-172]
- _ = x[WBNOINVD-173]
- _ = x[WRMSRNS-174]
- _ = x[X87-175]
- _ = x[XGETBV1-176]
- _ = x[XOP-177]
- _ = x[XSAVE-178]
- _ = x[XSAVEC-179]
- _ = x[XSAVEOPT-180]
- _ = x[XSAVES-181]
- _ = x[AESARM-182]
- _ = x[ARMCPUID-183]
- _ = x[ASIMD-184]
- _ = x[ASIMDDP-185]
- _ = x[ASIMDHP-186]
- _ = x[ASIMDRDM-187]
- _ = x[ATOMICS-188]
- _ = x[CRC32-189]
- _ = x[DCPOP-190]
- _ = x[EVTSTRM-191]
- _ = x[FCMA-192]
- _ = x[FP-193]
- _ = x[FPHP-194]
- _ = x[GPA-195]
- _ = x[JSCVT-196]
- _ = x[LRCPC-197]
- _ = x[PMULL-198]
- _ = x[SHA1-199]
- _ = x[SHA2-200]
- _ = x[SHA3-201]
- _ = x[SHA512-202]
- _ = x[SM3-203]
- _ = x[SM4-204]
- _ = x[SVE-205]
- _ = x[lastID-206]
+ _ = x[APX_F-9]
+ _ = x[AVX-10]
+ _ = x[AVX10-11]
+ _ = x[AVX10_128-12]
+ _ = x[AVX10_256-13]
+ _ = x[AVX10_512-14]
+ _ = x[AVX2-15]
+ _ = x[AVX512BF16-16]
+ _ = x[AVX512BITALG-17]
+ _ = x[AVX512BW-18]
+ _ = x[AVX512CD-19]
+ _ = x[AVX512DQ-20]
+ _ = x[AVX512ER-21]
+ _ = x[AVX512F-22]
+ _ = x[AVX512FP16-23]
+ _ = x[AVX512IFMA-24]
+ _ = x[AVX512PF-25]
+ _ = x[AVX512VBMI-26]
+ _ = x[AVX512VBMI2-27]
+ _ = x[AVX512VL-28]
+ _ = x[AVX512VNNI-29]
+ _ = x[AVX512VP2INTERSECT-30]
+ _ = x[AVX512VPOPCNTDQ-31]
+ _ = x[AVXIFMA-32]
+ _ = x[AVXNECONVERT-33]
+ _ = x[AVXSLOW-34]
+ _ = x[AVXVNNI-35]
+ _ = x[AVXVNNIINT8-36]
+ _ = x[BHI_CTRL-37]
+ _ = x[BMI1-38]
+ _ = x[BMI2-39]
+ _ = x[CETIBT-40]
+ _ = x[CETSS-41]
+ _ = x[CLDEMOTE-42]
+ _ = x[CLMUL-43]
+ _ = x[CLZERO-44]
+ _ = x[CMOV-45]
+ _ = x[CMPCCXADD-46]
+ _ = x[CMPSB_SCADBS_SHORT-47]
+ _ = x[CMPXCHG8-48]
+ _ = x[CPBOOST-49]
+ _ = x[CPPC-50]
+ _ = x[CX16-51]
+ _ = x[EFER_LMSLE_UNS-52]
+ _ = x[ENQCMD-53]
+ _ = x[ERMS-54]
+ _ = x[F16C-55]
+ _ = x[FLUSH_L1D-56]
+ _ = x[FMA3-57]
+ _ = x[FMA4-58]
+ _ = x[FP128-59]
+ _ = x[FP256-60]
+ _ = x[FSRM-61]
+ _ = x[FXSR-62]
+ _ = x[FXSROPT-63]
+ _ = x[GFNI-64]
+ _ = x[HLE-65]
+ _ = x[HRESET-66]
+ _ = x[HTT-67]
+ _ = x[HWA-68]
+ _ = x[HYBRID_CPU-69]
+ _ = x[HYPERVISOR-70]
+ _ = x[IA32_ARCH_CAP-71]
+ _ = x[IA32_CORE_CAP-72]
+ _ = x[IBPB-73]
+ _ = x[IBPB_BRTYPE-74]
+ _ = x[IBRS-75]
+ _ = x[IBRS_PREFERRED-76]
+ _ = x[IBRS_PROVIDES_SMP-77]
+ _ = x[IBS-78]
+ _ = x[IBSBRNTRGT-79]
+ _ = x[IBSFETCHSAM-80]
+ _ = x[IBSFFV-81]
+ _ = x[IBSOPCNT-82]
+ _ = x[IBSOPCNTEXT-83]
+ _ = x[IBSOPSAM-84]
+ _ = x[IBSRDWROPCNT-85]
+ _ = x[IBSRIPINVALIDCHK-86]
+ _ = x[IBS_FETCH_CTLX-87]
+ _ = x[IBS_OPDATA4-88]
+ _ = x[IBS_OPFUSE-89]
+ _ = x[IBS_PREVENTHOST-90]
+ _ = x[IBS_ZEN4-91]
+ _ = x[IDPRED_CTRL-92]
+ _ = x[INT_WBINVD-93]
+ _ = x[INVLPGB-94]
+ _ = x[KEYLOCKER-95]
+ _ = x[KEYLOCKERW-96]
+ _ = x[LAHF-97]
+ _ = x[LAM-98]
+ _ = x[LBRVIRT-99]
+ _ = x[LZCNT-100]
+ _ = x[MCAOVERFLOW-101]
+ _ = x[MCDT_NO-102]
+ _ = x[MCOMMIT-103]
+ _ = x[MD_CLEAR-104]
+ _ = x[MMX-105]
+ _ = x[MMXEXT-106]
+ _ = x[MOVBE-107]
+ _ = x[MOVDIR64B-108]
+ _ = x[MOVDIRI-109]
+ _ = x[MOVSB_ZL-110]
+ _ = x[MOVU-111]
+ _ = x[MPX-112]
+ _ = x[MSRIRC-113]
+ _ = x[MSRLIST-114]
+ _ = x[MSR_PAGEFLUSH-115]
+ _ = x[NRIPS-116]
+ _ = x[NX-117]
+ _ = x[OSXSAVE-118]
+ _ = x[PCONFIG-119]
+ _ = x[POPCNT-120]
+ _ = x[PPIN-121]
+ _ = x[PREFETCHI-122]
+ _ = x[PSFD-123]
+ _ = x[RDPRU-124]
+ _ = x[RDRAND-125]
+ _ = x[RDSEED-126]
+ _ = x[RDTSCP-127]
+ _ = x[RRSBA_CTRL-128]
+ _ = x[RTM-129]
+ _ = x[RTM_ALWAYS_ABORT-130]
+ _ = x[SBPB-131]
+ _ = x[SERIALIZE-132]
+ _ = x[SEV-133]
+ _ = x[SEV_64BIT-134]
+ _ = x[SEV_ALTERNATIVE-135]
+ _ = x[SEV_DEBUGSWAP-136]
+ _ = x[SEV_ES-137]
+ _ = x[SEV_RESTRICTED-138]
+ _ = x[SEV_SNP-139]
+ _ = x[SGX-140]
+ _ = x[SGXLC-141]
+ _ = x[SHA-142]
+ _ = x[SME-143]
+ _ = x[SME_COHERENT-144]
+ _ = x[SPEC_CTRL_SSBD-145]
+ _ = x[SRBDS_CTRL-146]
+ _ = x[SRSO_MSR_FIX-147]
+ _ = x[SRSO_NO-148]
+ _ = x[SRSO_USER_KERNEL_NO-149]
+ _ = x[SSE-150]
+ _ = x[SSE2-151]
+ _ = x[SSE3-152]
+ _ = x[SSE4-153]
+ _ = x[SSE42-154]
+ _ = x[SSE4A-155]
+ _ = x[SSSE3-156]
+ _ = x[STIBP-157]
+ _ = x[STIBP_ALWAYSON-158]
+ _ = x[STOSB_SHORT-159]
+ _ = x[SUCCOR-160]
+ _ = x[SVM-161]
+ _ = x[SVMDA-162]
+ _ = x[SVMFBASID-163]
+ _ = x[SVML-164]
+ _ = x[SVMNP-165]
+ _ = x[SVMPF-166]
+ _ = x[SVMPFT-167]
+ _ = x[SYSCALL-168]
+ _ = x[SYSEE-169]
+ _ = x[TBM-170]
+ _ = x[TDX_GUEST-171]
+ _ = x[TLB_FLUSH_NESTED-172]
+ _ = x[TME-173]
+ _ = x[TOPEXT-174]
+ _ = x[TSCRATEMSR-175]
+ _ = x[TSXLDTRK-176]
+ _ = x[VAES-177]
+ _ = x[VMCBCLEAN-178]
+ _ = x[VMPL-179]
+ _ = x[VMSA_REGPROT-180]
+ _ = x[VMX-181]
+ _ = x[VPCLMULQDQ-182]
+ _ = x[VTE-183]
+ _ = x[WAITPKG-184]
+ _ = x[WBNOINVD-185]
+ _ = x[WRMSRNS-186]
+ _ = x[X87-187]
+ _ = x[XGETBV1-188]
+ _ = x[XOP-189]
+ _ = x[XSAVE-190]
+ _ = x[XSAVEC-191]
+ _ = x[XSAVEOPT-192]
+ _ = x[XSAVES-193]
+ _ = x[AESARM-194]
+ _ = x[ARMCPUID-195]
+ _ = x[ASIMD-196]
+ _ = x[ASIMDDP-197]
+ _ = x[ASIMDHP-198]
+ _ = x[ASIMDRDM-199]
+ _ = x[ATOMICS-200]
+ _ = x[CRC32-201]
+ _ = x[DCPOP-202]
+ _ = x[EVTSTRM-203]
+ _ = x[FCMA-204]
+ _ = x[FP-205]
+ _ = x[FPHP-206]
+ _ = x[GPA-207]
+ _ = x[JSCVT-208]
+ _ = x[LRCPC-209]
+ _ = x[PMULL-210]
+ _ = x[SHA1-211]
+ _ = x[SHA2-212]
+ _ = x[SHA3-213]
+ _ = x[SHA512-214]
+ _ = x[SM3-215]
+ _ = x[SM4-216]
+ _ = x[SVE-217]
+ _ = x[lastID-218]
_ = x[firstID-0]
}
-const _FeatureID_name = "firstIDADXAESNIAMD3DNOWAMD3DNOWEXTAMXBF16AMXFP16AMXINT8AMXTILEAVXAVX2AVX512BF16AVX512BITALGAVX512BWAVX512CDAVX512DQAVX512ERAVX512FAVX512FP16AVX512IFMAAVX512PFAVX512VBMIAVX512VBMI2AVX512VLAVX512VNNIAVX512VP2INTERSECTAVX512VPOPCNTDQAVXIFMAAVXNECONVERTAVXSLOWAVXVNNIAVXVNNIINT8BHI_CTRLBMI1BMI2CETIBTCETSSCLDEMOTECLMULCLZEROCMOVCMPCCXADDCMPSB_SCADBS_SHORTCMPXCHG8CPBOOSTCPPCCX16EFER_LMSLE_UNSENQCMDERMSF16CFLUSH_L1DFMA3FMA4FP128FP256FSRMFXSRFXSROPTGFNIHLEHRESETHTTHWAHYBRID_CPUHYPERVISORIA32_ARCH_CAPIA32_CORE_CAPIBPBIBRSIBRS_PREFERREDIBRS_PROVIDES_SMPIBSIBSBRNTRGTIBSFETCHSAMIBSFFVIBSOPCNTIBSOPCNTEXTIBSOPSAMIBSRDWROPCNTIBSRIPINVALIDCHKIBS_FETCH_CTLXIBS_OPDATA4IBS_OPFUSEIBS_PREVENTHOSTIBS_ZEN4IDPRED_CTRLINT_WBINVDINVLPGBLAHFLAMLBRVIRTLZCNTMCAOVERFLOWMCDT_NOMCOMMITMD_CLEARMMXMMXEXTMOVBEMOVDIR64BMOVDIRIMOVSB_ZLMOVUMPXMSRIRCMSRLISTMSR_PAGEFLUSHNRIPSNXOSXSAVEPCONFIGPOPCNTPPINPREFETCHIPSFDRDPRURDRANDRDSEEDRDTSCPRRSBA_CTRLRTMRTM_ALWAYS_ABORTSERIALIZESEVSEV_64BITSEV_ALTERNATIVESEV_DEBUGSWAPSEV_ESSEV_RESTRICTEDSEV_SNPSGXSGXLCSHASMESME_COHERENTSPEC_CTRL_SSBDSRBDS_CTRLSSESSE2SSE3SSE4SSE42SSE4ASSSE3STIBPSTIBP_ALWAYSONSTOSB_SHORTSUCCORSVMSVMDASVMFBASIDSVMLSVMNPSVMPFSVMPFTSYSCALLSYSEETBMTDX_GUESTTLB_FLUSH_NESTEDTMETOPEXTTSCRATEMSRTSXLDTRKVAESVMCBCLEANVMPLVMSA_REGPROTVMXVPCLMULQDQVTEWAITPKGWBNOINVDWRMSRNSX87XGETBV1XOPXSAVEXSAVECXSAVEOPTXSAVESAESARMARMCPUIDASIMDASIMDDPASIMDHPASIMDRDMATOMICSCRC32DCPOPEVTSTRMFCMAFPFPHPGPAJSCVTLRCPCPMULLSHA1SHA2SHA3SHA512SM3SM4SVElastID"
+const _FeatureID_name = "firstIDADXAESNIAMD3DNOWAMD3DNOWEXTAMXBF16AMXFP16AMXINT8AMXTILEAPX_FAVXAVX10AVX10_128AVX10_256AVX10_512AVX2AVX512BF16AVX512BITALGAVX512BWAVX512CDAVX512DQAVX512ERAVX512FAVX512FP16AVX512IFMAAVX512PFAVX512VBMIAVX512VBMI2AVX512VLAVX512VNNIAVX512VP2INTERSECTAVX512VPOPCNTDQAVXIFMAAVXNECONVERTAVXSLOWAVXVNNIAVXVNNIINT8BHI_CTRLBMI1BMI2CETIBTCETSSCLDEMOTECLMULCLZEROCMOVCMPCCXADDCMPSB_SCADBS_SHORTCMPXCHG8CPBOOSTCPPCCX16EFER_LMSLE_UNSENQCMDERMSF16CFLUSH_L1DFMA3FMA4FP128FP256FSRMFXSRFXSROPTGFNIHLEHRESETHTTHWAHYBRID_CPUHYPERVISORIA32_ARCH_CAPIA32_CORE_CAPIBPBIBPB_BRTYPEIBRSIBRS_PREFERREDIBRS_PROVIDES_SMPIBSIBSBRNTRGTIBSFETCHSAMIBSFFVIBSOPCNTIBSOPCNTEXTIBSOPSAMIBSRDWROPCNTIBSRIPINVALIDCHKIBS_FETCH_CTLXIBS_OPDATA4IBS_OPFUSEIBS_PREVENTHOSTIBS_ZEN4IDPRED_CTRLINT_WBINVDINVLPGBKEYLOCKERKEYLOCKERWLAHFLAMLBRVIRTLZCNTMCAOVERFLOWMCDT_NOMCOMMITMD_CLEARMMXMMXEXTMOVBEMOVDIR64BMOVDIRIMOVSB_ZLMOVUMPXMSRIRCMSRLISTMSR_PAGEFLUSHNRIPSNXOSXSAVEPCONFIGPOPCNTPPINPREFETCHIPSFDRDPRURDRANDRDSEEDRDTSCPRRSBA_CTRLRTMRTM_ALWAYS_ABORTSBPBSERIALIZESEVSEV_64BITSEV_ALTERNATIVESEV_DEBUGSWAPSEV_ESSEV_RESTRICTEDSEV_SNPSGXSGXLCSHASMESME_COHERENTSPEC_CTRL_SSBDSRBDS_CTRLSRSO_MSR_FIXSRSO_NOSRSO_USER_KERNEL_NOSSESSE2SSE3SSE4SSE42SSE4ASSSE3STIBPSTIBP_ALWAYSONSTOSB_SHORTSUCCORSVMSVMDASVMFBASIDSVMLSVMNPSVMPFSVMPFTSYSCALLSYSEETBMTDX_GUESTTLB_FLUSH_NESTEDTMETOPEXTTSCRATEMSRTSXLDTRKVAESVMCBCLEANVMPLVMSA_REGPROTVMXVPCLMULQDQVTEWAITPKGWBNOINVDWRMSRNSX87XGETBV1XOPXSAVEXSAVECXSAVEOPTXSAVESAESARMARMCPUIDASIMDASIMDDPASIMDHPASIMDRDMATOMICSCRC32DCPOPEVTSTRMFCMAFPFPHPGPAJSCVTLRCPCPMULLSHA1SHA2SHA3SHA512SM3SM4SVElastID"
-var _FeatureID_index = [...]uint16{0, 7, 10, 15, 23, 34, 41, 48, 55, 62, 65, 69, 79, 91, 99, 107, 115, 123, 130, 140, 150, 158, 168, 179, 187, 197, 215, 230, 237, 249, 256, 263, 274, 282, 286, 290, 296, 301, 309, 314, 320, 324, 333, 351, 359, 366, 370, 374, 388, 394, 398, 402, 411, 415, 419, 424, 429, 433, 437, 444, 448, 451, 457, 460, 463, 473, 483, 496, 509, 513, 517, 531, 548, 551, 561, 572, 578, 586, 597, 605, 617, 633, 647, 658, 668, 683, 691, 702, 712, 719, 723, 726, 733, 738, 749, 756, 763, 771, 774, 780, 785, 794, 801, 809, 813, 816, 822, 829, 842, 847, 849, 856, 863, 869, 873, 882, 886, 891, 897, 903, 909, 919, 922, 938, 947, 950, 959, 974, 987, 993, 1007, 1014, 1017, 1022, 1025, 1028, 1040, 1054, 1064, 1067, 1071, 1075, 1079, 1084, 1089, 1094, 1099, 1113, 1124, 1130, 1133, 1138, 1147, 1151, 1156, 1161, 1167, 1174, 1179, 1182, 1191, 1207, 1210, 1216, 1226, 1234, 1238, 1247, 1251, 1263, 1266, 1276, 1279, 1286, 1294, 1301, 1304, 1311, 1314, 1319, 1325, 1333, 1339, 1345, 1353, 1358, 1365, 1372, 1380, 1387, 1392, 1397, 1404, 1408, 1410, 1414, 1417, 1422, 1427, 1432, 1436, 1440, 1444, 1450, 1453, 1456, 1459, 1465}
+var _FeatureID_index = [...]uint16{0, 7, 10, 15, 23, 34, 41, 48, 55, 62, 67, 70, 75, 84, 93, 102, 106, 116, 128, 136, 144, 152, 160, 167, 177, 187, 195, 205, 216, 224, 234, 252, 267, 274, 286, 293, 300, 311, 319, 323, 327, 333, 338, 346, 351, 357, 361, 370, 388, 396, 403, 407, 411, 425, 431, 435, 439, 448, 452, 456, 461, 466, 470, 474, 481, 485, 488, 494, 497, 500, 510, 520, 533, 546, 550, 561, 565, 579, 596, 599, 609, 620, 626, 634, 645, 653, 665, 681, 695, 706, 716, 731, 739, 750, 760, 767, 776, 786, 790, 793, 800, 805, 816, 823, 830, 838, 841, 847, 852, 861, 868, 876, 880, 883, 889, 896, 909, 914, 916, 923, 930, 936, 940, 949, 953, 958, 964, 970, 976, 986, 989, 1005, 1009, 1018, 1021, 1030, 1045, 1058, 1064, 1078, 1085, 1088, 1093, 1096, 1099, 1111, 1125, 1135, 1147, 1154, 1173, 1176, 1180, 1184, 1188, 1193, 1198, 1203, 1208, 1222, 1233, 1239, 1242, 1247, 1256, 1260, 1265, 1270, 1276, 1283, 1288, 1291, 1300, 1316, 1319, 1325, 1335, 1343, 1347, 1356, 1360, 1372, 1375, 1385, 1388, 1395, 1403, 1410, 1413, 1420, 1423, 1428, 1434, 1442, 1448, 1454, 1462, 1467, 1474, 1481, 1489, 1496, 1501, 1506, 1513, 1517, 1519, 1523, 1526, 1531, 1536, 1541, 1545, 1549, 1553, 1559, 1562, 1565, 1568, 1574}
func (i FeatureID) String() string {
if i < 0 || i >= FeatureID(len(_FeatureID_index)-1) {
diff --git a/vendor/github.com/leodido/go-urn/.gitignore b/vendor/github.com/leodido/go-urn/.gitignore
index 89d4bc55..427454f8 100644
--- a/vendor/github.com/leodido/go-urn/.gitignore
+++ b/vendor/github.com/leodido/go-urn/.gitignore
@@ -9,4 +9,5 @@
*.txt
vendor/
-/removecomments
\ No newline at end of file
+/removecomments
+/snake2camel
\ No newline at end of file
diff --git a/vendor/github.com/leodido/go-urn/README.md b/vendor/github.com/leodido/go-urn/README.md
index 731eecbb..619475bf 100644
--- a/vendor/github.com/leodido/go-urn/README.md
+++ b/vendor/github.com/leodido/go-urn/README.md
@@ -2,21 +2,34 @@
**A parser for URNs**.
-> As seen on [RFC 2141](https://tools.ietf.org/html/rfc2141#ref-1).
+> As seen on [RFC 2141](https://datatracker.ietf.org/doc/html/rfc2141), [RFC 7643](https://datatracker.ietf.org/doc/html/rfc7643#section-10), and on [RFC 8141](https://datatracker.ietf.org/doc/html/rfc8141).
[API documentation](https://godoc.org/github.com/leodido/go-urn).
+Starting with version 1.3 this library also supports [RFC 7643 SCIM URNs](https://datatracker.ietf.org/doc/html/rfc7643#section-10).
+
+Starting with version 1.4 this library also supports [RFC 8141 URNs (2017)](https://datatracker.ietf.org/doc/html/rfc8141).
+
## Installation
```
go get github.com/leodido/go-urn
```
+## Features
+
+1. RFC 2141 URNs parsing (default)
+2. RFC 8141 URNs parsing (supersedes RFC 2141)
+3. RFC 7643 SCIM URNs parsing
+4. Normalization as per RFCs
+5. Lexical equivalence as per RFCs
+6. Precise, fine-grained errors
+
## Performances
This implementation results to be really fast.
-Usually below ½ microsecond on my machine[1](#mymachine).
+Usually below 400 ns on my machine[1](#mymachine).
Notice it also performs, while parsing:
@@ -24,35 +37,64 @@ Notice it also performs, while parsing:
2. specific-string normalization
```
-ok/00/urn:a:b______________________________________/-4 20000000 265 ns/op 182 B/op 6 allocs/op
-ok/01/URN:foo:a123,456_____________________________/-4 30000000 296 ns/op 200 B/op 6 allocs/op
-ok/02/urn:foo:a123%2c456___________________________/-4 20000000 331 ns/op 208 B/op 6 allocs/op
-ok/03/urn:ietf:params:scim:schemas:core:2.0:User___/-4 20000000 430 ns/op 280 B/op 6 allocs/op
-ok/04/urn:ietf:params:scim:schemas:extension:enterp/-4 20000000 411 ns/op 312 B/op 6 allocs/op
-ok/05/urn:ietf:params:scim:schemas:extension:enterp/-4 20000000 472 ns/op 344 B/op 6 allocs/op
-ok/06/urn:burnout:nss______________________________/-4 30000000 257 ns/op 192 B/op 6 allocs/op
-ok/07/urn:abcdefghilmnopqrstuvzabcdefghilm:x_______/-4 20000000 375 ns/op 213 B/op 6 allocs/op
-ok/08/urn:urnurnurn:urn____________________________/-4 30000000 265 ns/op 197 B/op 6 allocs/op
-ok/09/urn:ciao:@!=%2c(xyz)+a,b.*@g=$_'_____________/-4 20000000 307 ns/op 248 B/op 6 allocs/op
-ok/10/URN:x:abc%1dz%2f%3az_________________________/-4 30000000 259 ns/op 212 B/op 6 allocs/op
-no/11/URN:-xxx:x___________________________________/-4 20000000 445 ns/op 320 B/op 6 allocs/op
-no/12/urn::colon:nss_______________________________/-4 20000000 461 ns/op 320 B/op 6 allocs/op
-no/13/urn:abcdefghilmnopqrstuvzabcdefghilmn:specifi/-4 10000000 660 ns/op 320 B/op 6 allocs/op
-no/14/URN:a!?:x____________________________________/-4 20000000 507 ns/op 320 B/op 6 allocs/op
-no/15/urn:urn:NSS__________________________________/-4 20000000 429 ns/op 288 B/op 6 allocs/op
-no/16/urn:white_space:NSS__________________________/-4 20000000 482 ns/op 320 B/op 6 allocs/op
-no/17/urn:concat:no_spaces_________________________/-4 20000000 539 ns/op 328 B/op 7 allocs/op
-no/18/urn:a:/______________________________________/-4 20000000 470 ns/op 320 B/op 7 allocs/op
-no/19/urn:UrN:NSS__________________________________/-4 20000000 399 ns/op 288 B/op 6 allocs/op
+ok/00/urn:a:b______________________________________/-10 51372006 109.0 ns/op 275 B/op 3 allocs/op
+ok/01/URN:foo:a123,456_____________________________/-10 36024072 160.8 ns/op 296 B/op 6 allocs/op
+ok/02/urn:foo:a123%2C456___________________________/-10 31901007 188.4 ns/op 320 B/op 7 allocs/op
+ok/03/urn:ietf:params:scim:schemas:core:2.0:User___/-10 22736756 266.6 ns/op 376 B/op 6 allocs/op
+ok/04/urn:ietf:params:scim:schemas:extension:enterp/-10 18291859 335.2 ns/op 408 B/op 6 allocs/op
+ok/05/urn:ietf:params:scim:schemas:extension:enterp/-10 15283087 379.4 ns/op 440 B/op 6 allocs/op
+ok/06/urn:burnout:nss______________________________/-10 39407593 155.1 ns/op 288 B/op 6 allocs/op
+ok/07/urn:abcdefghilmnopqrstuvzabcdefghilm:x_______/-10 27832718 211.4 ns/op 307 B/op 4 allocs/op
+ok/08/urn:urnurnurn:urn____________________________/-10 33269596 168.1 ns/op 293 B/op 6 allocs/op
+ok/09/urn:ciao:!!*_________________________________/-10 41100675 148.8 ns/op 288 B/op 6 allocs/op
+ok/10/urn:ciao:=@__________________________________/-10 37214253 149.7 ns/op 284 B/op 6 allocs/op
+ok/11/urn:ciao:@!=%2C(xyz)+a,b.*@g=$_'_____________/-10 26534240 229.8 ns/op 336 B/op 7 allocs/op
+ok/12/URN:x:abc%1Dz%2F%3az_________________________/-10 28166396 211.8 ns/op 336 B/op 7 allocs/op
+no/13/URN:---xxx:x_________________________________/-10 23635159 255.6 ns/op 419 B/op 5 allocs/op
+no/14/urn::colon:nss_______________________________/-10 23594779 258.4 ns/op 419 B/op 5 allocs/op
+no/15/URN:@,:x_____________________________________/-10 23742535 261.5 ns/op 419 B/op 5 allocs/op
+no/16/URN:URN:NSS__________________________________/-10 27432714 223.3 ns/op 371 B/op 5 allocs/op
+no/17/urn:UrN:NSS__________________________________/-10 26922117 224.9 ns/op 371 B/op 5 allocs/op
+no/18/urn:a:%______________________________________/-10 24926733 224.6 ns/op 371 B/op 5 allocs/op
+no/19/urn:urn:NSS__________________________________/-10 27652641 220.7 ns/op 371 B/op 5 allocs/op
```
----
-
-* [1]: Intel Core i7-7600U CPU @ 2.80GHz
+* [1]: Apple M1 Pro
----
## Example
+
+For more examples take a look at the [examples file](examples_test.go).
+
+
+```go
+package main
+
+import (
+ "fmt"
+ "github.com/leodido/go-urn"
+)
+
+func main() {
+ var uid = "URN:foo:a123,456"
+
+ // Parse the input string as a RFC 2141 URN only
+ u, e := urn.NewMachine().Parse(uid)
+ if e != nil {
+ fmt.Errorf(err)
+
+ return
+ }
+
+ fmt.Println(u.ID)
+ fmt.Println(u.SS)
+
+ // Output:
+ // foo
+ // a123,456
+}
+```
+
```go
package main
@@ -64,6 +106,7 @@ import (
func main() {
var uid = "URN:foo:a123,456"
+ // Parse the input string as a RFC 2141 URN only
u, ok := urn.Parse([]byte(uid))
if !ok {
panic("error parsing urn")
@@ -78,4 +121,33 @@ func main() {
}
```
-[](https://github.com/igrigorik/ga-beacon)
\ No newline at end of file
+```go
+package main
+
+import (
+ "fmt"
+ "github.com/leodido/go-urn"
+)
+
+func main() {
+ input := "urn:ietf:params:scim:api:messages:2.0:ListResponse"
+
+ // Parsing the input string as a RFC 7643 SCIM URN
+ u, ok := urn.Parse([]byte(input), urn.WithParsingMode(urn.RFC7643Only))
+ if !ok {
+ panic("error parsing urn")
+ }
+
+ fmt.Println(u.IsSCIM())
+ scim := u.SCIM()
+ fmt.Println(scim.Type.String())
+ fmt.Println(scim.Name)
+ fmt.Println(scim.Other)
+
+ // Output:
+ // true
+ // api
+ // messages
+ // 2.0:ListResponse
+}
+```
\ No newline at end of file
diff --git a/vendor/github.com/leodido/go-urn/kind.go b/vendor/github.com/leodido/go-urn/kind.go
new file mode 100644
index 00000000..f5e140f0
--- /dev/null
+++ b/vendor/github.com/leodido/go-urn/kind.go
@@ -0,0 +1,10 @@
+package urn
+
+type Kind int
+
+const (
+ NONE Kind = iota
+ RFC2141
+ RFC7643
+ RFC8141
+)
diff --git a/vendor/github.com/leodido/go-urn/machine.go b/vendor/github.com/leodido/go-urn/machine.go
index f8d57b41..aec1ba69 100644
--- a/vendor/github.com/leodido/go-urn/machine.go
+++ b/vendor/github.com/leodido/go-urn/machine.go
@@ -2,27 +2,98 @@ package urn
import (
"fmt"
+
+ scimschema "github.com/leodido/go-urn/scim/schema"
)
var (
- errPrefix = "expecting the prefix to be the \"urn\" string (whatever case) [col %d]"
- errIdentifier = "expecting the identifier to be string (1..31 alnum chars, also containing dashes but not at its start) [col %d]"
- errSpecificString = "expecting the specific string to be a string containing alnum, hex, or others ([()+,-.:=@;$_!*']) chars [col %d]"
- errNoUrnWithinID = "expecting the identifier to not contain the \"urn\" reserved string [col %d]"
- errHex = "expecting the specific string hex chars to be well-formed (%%alnum{2}) [col %d]"
- errParse = "parsing error [col %d]"
+ errPrefix = "expecting the prefix to be the \"urn\" string (whatever case) [col %d]"
+ errIdentifier = "expecting the identifier to be string (1..31 alnum chars, also containing dashes but not at its beginning) [col %d]"
+ errSpecificString = "expecting the specific string to be a string containing alnum, hex, or others ([()+,-.:=@;$_!*']) chars [col %d]"
+ errNoUrnWithinID = "expecting the identifier to not contain the \"urn\" reserved string [col %d]"
+ errHex = "expecting the percent encoded chars to be well-formed (%%alnum{2}) [col %d]"
+ errSCIMNamespace = "expecing the SCIM namespace identifier (ietf:params:scim) [col %d]"
+ errSCIMType = "expecting a correct SCIM type (schemas, api, param) [col %d]"
+ errSCIMName = "expecting one or more alnum char in the SCIM name part [col %d]"
+ errSCIMOther = "expecting a well-formed other SCIM part [col %d]"
+ errSCIMOtherIncomplete = "expecting a not empty SCIM other part after colon [col %d]"
+ err8141InformalID = "informal URN namespace must be in the form urn-[1-9][0-9] [col %d]"
+ err8141SpecificString = "expecting the specific string to contain alnum, hex, or others ([~&()+,-.:=@;$_!*'] or [/?] not in first position) chars [col %d]"
+ err8141Identifier = "expecting the indentifier to be a string with (length 2 to 32 chars) containing alnum (or dashes) not starting or ending with a dash [col %d]"
+ err8141RComponentStart = "expecting only one r-component (starting with the ?+ sequence) [col %d]"
+ err8141QComponentStart = "expecting only one q-component (starting with the ?= sequence) [col %d]"
+ err8141MalformedRComp = "expecting a non-empty r-component containing alnum, hex, or others ([~&()+,-.:=@;$_!*'] or [/?] but not at its beginning) [col %d]"
+ err8141MalformedQComp = "expecting a non-empty q-component containing alnum, hex, or others ([~&()+,-.:=@;$_!*'] or [/?] but not at its beginning) [col %d]"
)
+var _toStateActions []byte = []byte{
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 33, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,
+}
+
+var _eofActions []byte = []byte{
+ 0, 1, 1, 1, 1, 4, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 8, 9,
+ 9, 4, 4, 11, 1, 1, 1, 1,
+ 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 14, 14, 14, 14, 16, 18, 20,
+ 20, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 1, 1, 1, 1, 21,
+ 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22,
+ 23, 24, 24, 25, 25, 0, 26, 28,
+ 28, 29, 29, 30, 30, 26, 26, 31,
+ 31, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 21,
+ 21, 22, 22, 22, 34, 34, 35, 37,
+ 37, 38, 40, 41, 41, 38, 42, 42,
+ 42, 44, 42, 48, 48, 48, 50, 44,
+ 50, 0,
+}
const start int = 1
-const firstFinal int = 44
+const firstFinal int = 172
-const enFail int = 46
+const enScimOnly int = 44
+const enRfc8141Only int = 83
+const enFail int = 193
const enMain int = 1
// Machine is the interface representing the FSM
type Machine interface {
Error() error
Parse(input []byte) (*URN, error)
+ WithParsingMode(ParsingMode)
}
type machine struct {
@@ -30,12 +101,24 @@ type machine struct {
cs int
p, pe, eof, pb int
err error
- tolower []int
+ startParsingAt int
+ parsingMode ParsingMode
+ parsingModeSet bool
}
// NewMachine creates a new FSM able to parse RFC 2141 strings.
-func NewMachine() Machine {
- m := &machine{}
+func NewMachine(options ...Option) Machine {
+ m := &machine{
+ parsingModeSet: false,
+ }
+
+ for _, o := range options {
+ o(m)
+ }
+ // Set default parsing mode
+ if !m.parsingModeSet {
+ m.WithParsingMode(DefaultParsingMode)
+ }
return m
}
@@ -51,7 +134,7 @@ func (m *machine) text() []byte {
return m.data[m.pb:m.p]
}
-// Parse parses the input byte array as a RFC 2141 string.
+// Parse parses the input byte array as a RFC 2141 or RFC7643 string.
func (m *machine) Parse(input []byte) (*URN, error) {
m.data = input
m.p = 0
@@ -59,1619 +142,4881 @@ func (m *machine) Parse(input []byte) (*URN, error) {
m.pe = len(input)
m.eof = len(input)
m.err = nil
- m.tolower = []int{}
- output := &URN{}
- {
- m.cs = start
+ m.cs = m.startParsingAt
+ output := &URN{
+ tolower: []int{},
}
{
if (m.p) == (m.pe) {
goto _testEof
}
+ if m.cs == 0 {
+ goto _out
+ }
+ _resume:
switch m.cs {
case 1:
- goto stCase1
+ switch (m.data)[(m.p)] {
+ case 85:
+ goto tr1
+ case 117:
+ goto tr1
+ }
+ goto tr0
case 0:
- goto stCase0
+ goto _out
case 2:
- goto stCase2
+ switch (m.data)[(m.p)] {
+ case 82:
+ goto tr2
+ case 114:
+ goto tr2
+ }
+ goto tr0
case 3:
- goto stCase3
+ switch (m.data)[(m.p)] {
+ case 78:
+ goto tr3
+ case 110:
+ goto tr3
+ }
+ goto tr0
case 4:
- goto stCase4
+ if (m.data)[(m.p)] == 58 {
+ goto tr4
+ }
+ goto tr0
case 5:
- goto stCase5
+ switch (m.data)[(m.p)] {
+ case 85:
+ goto tr7
+ case 117:
+ goto tr7
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr6
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr6
+ }
+ default:
+ goto tr6
+ }
+ goto tr5
case 6:
- goto stCase6
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr9
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr9
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr9
+ }
+ default:
+ goto tr9
+ }
+ goto tr8
case 7:
- goto stCase7
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr11
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr11
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr11
+ }
+ default:
+ goto tr11
+ }
+ goto tr8
case 8:
- goto stCase8
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr12
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr12
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr12
+ }
+ default:
+ goto tr12
+ }
+ goto tr8
case 9:
- goto stCase9
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr13
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr13
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr13
+ }
+ default:
+ goto tr13
+ }
+ goto tr8
case 10:
- goto stCase10
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr14
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr14
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr14
+ }
+ default:
+ goto tr14
+ }
+ goto tr8
case 11:
- goto stCase11
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr15
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr15
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr15
+ }
+ default:
+ goto tr15
+ }
+ goto tr8
case 12:
- goto stCase12
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr16
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr16
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr16
+ }
+ default:
+ goto tr16
+ }
+ goto tr8
case 13:
- goto stCase13
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr17
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr17
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr17
+ }
+ default:
+ goto tr17
+ }
+ goto tr8
case 14:
- goto stCase14
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr18
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr18
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr18
+ }
+ default:
+ goto tr18
+ }
+ goto tr8
case 15:
- goto stCase15
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr19
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr19
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr19
+ }
+ default:
+ goto tr19
+ }
+ goto tr8
case 16:
- goto stCase16
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr20
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr20
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr20
+ }
+ default:
+ goto tr20
+ }
+ goto tr8
case 17:
- goto stCase17
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr21
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr21
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr21
+ }
+ default:
+ goto tr21
+ }
+ goto tr8
case 18:
- goto stCase18
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr22
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr22
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr22
+ }
+ default:
+ goto tr22
+ }
+ goto tr8
case 19:
- goto stCase19
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr23
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr23
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr23
+ }
+ default:
+ goto tr23
+ }
+ goto tr8
case 20:
- goto stCase20
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr24
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr24
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr24
+ }
+ default:
+ goto tr24
+ }
+ goto tr8
case 21:
- goto stCase21
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr25
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr25
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr25
+ }
+ default:
+ goto tr25
+ }
+ goto tr8
case 22:
- goto stCase22
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr26
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr26
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr26
+ }
+ default:
+ goto tr26
+ }
+ goto tr8
case 23:
- goto stCase23
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr27
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr27
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr27
+ }
+ default:
+ goto tr27
+ }
+ goto tr8
case 24:
- goto stCase24
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr28
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr28
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr28
+ }
+ default:
+ goto tr28
+ }
+ goto tr8
case 25:
- goto stCase25
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr29
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr29
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr29
+ }
+ default:
+ goto tr29
+ }
+ goto tr8
case 26:
- goto stCase26
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr30
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr30
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr30
+ }
+ default:
+ goto tr30
+ }
+ goto tr8
case 27:
- goto stCase27
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr31
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr31
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr31
+ }
+ default:
+ goto tr31
+ }
+ goto tr8
case 28:
- goto stCase28
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr32
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr32
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr32
+ }
+ default:
+ goto tr32
+ }
+ goto tr8
case 29:
- goto stCase29
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr33
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr33
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr33
+ }
+ default:
+ goto tr33
+ }
+ goto tr8
case 30:
- goto stCase30
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr34
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr34
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr34
+ }
+ default:
+ goto tr34
+ }
+ goto tr8
case 31:
- goto stCase31
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr35
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr35
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr35
+ }
+ default:
+ goto tr35
+ }
+ goto tr8
case 32:
- goto stCase32
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr36
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr36
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr36
+ }
+ default:
+ goto tr36
+ }
+ goto tr8
case 33:
- goto stCase33
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr37
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr37
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr37
+ }
+ default:
+ goto tr37
+ }
+ goto tr8
case 34:
- goto stCase34
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr38
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr38
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr38
+ }
+ default:
+ goto tr38
+ }
+ goto tr8
case 35:
- goto stCase35
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr39
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr39
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr39
+ }
+ default:
+ goto tr39
+ }
+ goto tr8
case 36:
- goto stCase36
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr40
+ case 58:
+ goto tr10
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr40
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr40
+ }
+ default:
+ goto tr40
+ }
+ goto tr8
case 37:
- goto stCase37
+ if (m.data)[(m.p)] == 58 {
+ goto tr10
+ }
+ goto tr8
case 38:
- goto stCase38
- case 44:
- goto stCase44
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr42
+ case 36:
+ goto tr42
+ case 37:
+ goto tr43
+ case 61:
+ goto tr42
+ case 95:
+ goto tr42
+ }
+ switch {
+ case (m.data)[(m.p)] < 48:
+ if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 {
+ goto tr42
+ }
+ case (m.data)[(m.p)] > 59:
+ switch {
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr42
+ }
+ case (m.data)[(m.p)] >= 64:
+ goto tr42
+ }
+ default:
+ goto tr42
+ }
+ goto tr41
+ case 172:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr212
+ case 36:
+ goto tr212
+ case 37:
+ goto tr213
+ case 61:
+ goto tr212
+ case 95:
+ goto tr212
+ }
+ switch {
+ case (m.data)[(m.p)] < 48:
+ if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 {
+ goto tr212
+ }
+ case (m.data)[(m.p)] > 59:
+ switch {
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr212
+ }
+ case (m.data)[(m.p)] >= 64:
+ goto tr212
+ }
+ default:
+ goto tr212
+ }
+ goto tr41
case 39:
- goto stCase39
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr45
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr45
+ }
+ default:
+ goto tr46
+ }
+ goto tr44
case 40:
- goto stCase40
- case 45:
- goto stCase45
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr47
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr47
+ }
+ default:
+ goto tr48
+ }
+ goto tr44
+ case 173:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr212
+ case 36:
+ goto tr212
+ case 37:
+ goto tr213
+ case 61:
+ goto tr212
+ case 95:
+ goto tr212
+ }
+ switch {
+ case (m.data)[(m.p)] < 48:
+ if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 {
+ goto tr212
+ }
+ case (m.data)[(m.p)] > 59:
+ switch {
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr212
+ }
+ case (m.data)[(m.p)] >= 64:
+ goto tr212
+ }
+ default:
+ goto tr212
+ }
+ goto tr44
case 41:
- goto stCase41
- case 42:
- goto stCase42
- case 43:
- goto stCase43
- case 46:
- goto stCase46
- }
- goto stOut
- stCase1:
- switch (m.data)[(m.p)] {
- case 85:
- goto tr1
- case 117:
- goto tr1
- }
- goto tr0
- tr0:
-
- m.err = fmt.Errorf(errParse, m.p)
- (m.p)--
-
- {
- goto st46
- }
-
- goto st0
- tr3:
-
- m.err = fmt.Errorf(errPrefix, m.p)
- (m.p)--
-
- {
- goto st46
- }
-
- m.err = fmt.Errorf(errParse, m.p)
- (m.p)--
-
- {
- goto st46
- }
-
- goto st0
- tr6:
-
- m.err = fmt.Errorf(errIdentifier, m.p)
- (m.p)--
-
- {
- goto st46
- }
-
- m.err = fmt.Errorf(errParse, m.p)
- (m.p)--
-
- {
- goto st46
- }
-
- goto st0
- tr41:
-
- m.err = fmt.Errorf(errSpecificString, m.p)
- (m.p)--
-
- {
- goto st46
- }
-
- m.err = fmt.Errorf(errParse, m.p)
- (m.p)--
-
- {
- goto st46
- }
-
- goto st0
- tr44:
-
- m.err = fmt.Errorf(errHex, m.p)
- (m.p)--
-
- {
- goto st46
- }
-
- m.err = fmt.Errorf(errSpecificString, m.p)
- (m.p)--
-
- {
- goto st46
- }
-
- m.err = fmt.Errorf(errParse, m.p)
- (m.p)--
-
- {
- goto st46
- }
-
- goto st0
- tr50:
-
- m.err = fmt.Errorf(errPrefix, m.p)
- (m.p)--
-
- {
- goto st46
- }
-
- m.err = fmt.Errorf(errIdentifier, m.p)
- (m.p)--
-
- {
- goto st46
- }
-
- m.err = fmt.Errorf(errParse, m.p)
- (m.p)--
-
- {
- goto st46
- }
-
- goto st0
- tr52:
-
- m.err = fmt.Errorf(errNoUrnWithinID, m.p)
- (m.p)--
-
- {
- goto st46
- }
-
- m.err = fmt.Errorf(errIdentifier, m.p)
- (m.p)--
-
- {
- goto st46
- }
-
- m.err = fmt.Errorf(errParse, m.p)
- (m.p)--
-
- {
- goto st46
- }
-
- goto st0
- stCase0:
- st0:
- m.cs = 0
- goto _out
- tr1:
-
- m.pb = m.p
-
- goto st2
- st2:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof2
- }
- stCase2:
- switch (m.data)[(m.p)] {
- case 82:
- goto st3
- case 114:
- goto st3
- }
- goto tr0
- st3:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof3
- }
- stCase3:
- switch (m.data)[(m.p)] {
- case 78:
- goto st4
- case 110:
- goto st4
- }
- goto tr3
- st4:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof4
- }
- stCase4:
- if (m.data)[(m.p)] == 58 {
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr9
+ case 58:
+ goto tr10
+ case 82:
+ goto tr49
+ case 114:
+ goto tr49
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr9
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr9
+ }
+ default:
+ goto tr9
+ }
goto tr5
- }
- goto tr0
- tr5:
-
- output.prefix = string(m.text())
-
- goto st5
- st5:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof5
- }
- stCase5:
- switch (m.data)[(m.p)] {
- case 85:
- goto tr8
- case 117:
- goto tr8
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto tr7
+ case 42:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr11
+ case 58:
+ goto tr10
+ case 78:
+ goto tr50
+ case 110:
+ goto tr50
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto tr7
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr11
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr11
+ }
+ default:
+ goto tr11
}
- default:
- goto tr7
- }
- goto tr6
- tr7:
-
- m.pb = m.p
-
- goto st6
- st6:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof6
- }
- stCase6:
- switch (m.data)[(m.p)] {
- case 45:
- goto st7
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st7
+ goto tr5
+ case 43:
+ if (m.data)[(m.p)] == 45 {
+ goto tr12
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr12
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr12
+ }
+ default:
+ goto tr12
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st7
+ goto tr51
+ case 44:
+ switch (m.data)[(m.p)] {
+ case 85:
+ goto tr52
+ case 117:
+ goto tr52
}
- default:
- goto st7
- }
- goto tr6
- st7:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof7
- }
- stCase7:
- switch (m.data)[(m.p)] {
+ goto tr0
case 45:
- goto st8
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st8
+ switch (m.data)[(m.p)] {
+ case 82:
+ goto tr53
+ case 114:
+ goto tr53
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st8
+ goto tr0
+ case 46:
+ switch (m.data)[(m.p)] {
+ case 78:
+ goto tr54
+ case 110:
+ goto tr54
}
- default:
- goto st8
- }
- goto tr6
- st8:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof8
- }
- stCase8:
- switch (m.data)[(m.p)] {
- case 45:
- goto st9
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st9
+ goto tr0
+ case 47:
+ if (m.data)[(m.p)] == 58 {
+ goto tr55
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st9
+ goto tr0
+ case 48:
+ if (m.data)[(m.p)] == 105 {
+ goto tr57
}
- default:
- goto st9
- }
- goto tr6
- st9:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof9
- }
- stCase9:
- switch (m.data)[(m.p)] {
- case 45:
- goto st10
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st10
+ goto tr56
+ case 49:
+ if (m.data)[(m.p)] == 101 {
+ goto tr58
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st10
+ goto tr56
+ case 50:
+ if (m.data)[(m.p)] == 116 {
+ goto tr59
}
- default:
- goto st10
- }
- goto tr6
- st10:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof10
- }
- stCase10:
- switch (m.data)[(m.p)] {
- case 45:
- goto st11
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st11
+ goto tr56
+ case 51:
+ if (m.data)[(m.p)] == 102 {
+ goto tr60
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st11
+ goto tr56
+ case 52:
+ if (m.data)[(m.p)] == 58 {
+ goto tr61
}
- default:
- goto st11
- }
- goto tr6
- st11:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof11
- }
- stCase11:
- switch (m.data)[(m.p)] {
- case 45:
- goto st12
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st12
+ goto tr56
+ case 53:
+ if (m.data)[(m.p)] == 112 {
+ goto tr62
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st12
+ goto tr56
+ case 54:
+ if (m.data)[(m.p)] == 97 {
+ goto tr63
}
- default:
- goto st12
- }
- goto tr6
- st12:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof12
- }
- stCase12:
- switch (m.data)[(m.p)] {
- case 45:
- goto st13
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st13
+ goto tr56
+ case 55:
+ if (m.data)[(m.p)] == 114 {
+ goto tr64
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st13
+ goto tr56
+ case 56:
+ if (m.data)[(m.p)] == 97 {
+ goto tr65
}
- default:
- goto st13
- }
- goto tr6
- st13:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof13
- }
- stCase13:
- switch (m.data)[(m.p)] {
- case 45:
- goto st14
+ goto tr56
+ case 57:
+ if (m.data)[(m.p)] == 109 {
+ goto tr66
+ }
+ goto tr56
case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st14
+ if (m.data)[(m.p)] == 115 {
+ goto tr67
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st14
+ goto tr56
+ case 59:
+ if (m.data)[(m.p)] == 58 {
+ goto tr68
}
- default:
- goto st14
- }
- goto tr6
- st14:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof14
- }
- stCase14:
- switch (m.data)[(m.p)] {
- case 45:
- goto st15
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st15
+ goto tr56
+ case 60:
+ if (m.data)[(m.p)] == 115 {
+ goto tr69
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st15
+ goto tr56
+ case 61:
+ if (m.data)[(m.p)] == 99 {
+ goto tr70
}
- default:
- goto st15
- }
- goto tr6
- st15:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof15
- }
- stCase15:
- switch (m.data)[(m.p)] {
- case 45:
- goto st16
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st16
+ goto tr56
+ case 62:
+ if (m.data)[(m.p)] == 105 {
+ goto tr71
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st16
+ goto tr56
+ case 63:
+ if (m.data)[(m.p)] == 109 {
+ goto tr72
}
- default:
- goto st16
- }
- goto tr6
- st16:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof16
- }
- stCase16:
- switch (m.data)[(m.p)] {
- case 45:
- goto st17
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st17
+ goto tr56
+ case 64:
+ if (m.data)[(m.p)] == 58 {
+ goto tr73
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st17
+ goto tr56
+ case 65:
+ switch (m.data)[(m.p)] {
+ case 97:
+ goto tr75
+ case 112:
+ goto tr76
+ case 115:
+ goto tr77
}
- default:
- goto st17
- }
- goto tr6
- st17:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof17
- }
- stCase17:
- switch (m.data)[(m.p)] {
- case 45:
- goto st18
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st18
+ goto tr74
+ case 66:
+ if (m.data)[(m.p)] == 112 {
+ goto tr78
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st18
+ goto tr74
+ case 67:
+ if (m.data)[(m.p)] == 105 {
+ goto tr79
}
- default:
- goto st18
- }
- goto tr6
- st18:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof18
- }
- stCase18:
- switch (m.data)[(m.p)] {
- case 45:
- goto st19
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st19
+ goto tr74
+ case 68:
+ if (m.data)[(m.p)] == 58 {
+ goto tr80
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st19
+ goto tr74
+ case 69:
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr82
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr82
+ }
+ default:
+ goto tr82
}
- default:
- goto st19
- }
- goto tr6
- st19:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof19
- }
- stCase19:
- switch (m.data)[(m.p)] {
- case 45:
- goto st20
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st20
+ goto tr81
+ case 174:
+ if (m.data)[(m.p)] == 58 {
+ goto tr215
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st20
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr214
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr214
+ }
+ default:
+ goto tr214
}
- default:
- goto st20
- }
- goto tr6
- st20:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof20
- }
- stCase20:
- switch (m.data)[(m.p)] {
- case 45:
- goto st21
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st21
+ goto tr81
+ case 70:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr84
+ case 36:
+ goto tr84
+ case 37:
+ goto tr85
+ case 61:
+ goto tr84
+ case 95:
+ goto tr84
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st21
+ switch {
+ case (m.data)[(m.p)] < 48:
+ if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 {
+ goto tr84
+ }
+ case (m.data)[(m.p)] > 59:
+ switch {
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr84
+ }
+ case (m.data)[(m.p)] >= 64:
+ goto tr84
+ }
+ default:
+ goto tr84
}
- default:
- goto st21
- }
- goto tr6
- st21:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof21
- }
- stCase21:
- switch (m.data)[(m.p)] {
- case 45:
- goto st22
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st22
+ goto tr83
+ case 175:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr216
+ case 36:
+ goto tr216
+ case 37:
+ goto tr217
+ case 61:
+ goto tr216
+ case 95:
+ goto tr216
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st22
+ switch {
+ case (m.data)[(m.p)] < 48:
+ if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 {
+ goto tr216
+ }
+ case (m.data)[(m.p)] > 59:
+ switch {
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr216
+ }
+ case (m.data)[(m.p)] >= 64:
+ goto tr216
+ }
+ default:
+ goto tr216
}
- default:
- goto st22
- }
- goto tr6
- st22:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof22
- }
- stCase22:
- switch (m.data)[(m.p)] {
- case 45:
- goto st23
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st23
+ goto tr83
+ case 71:
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr87
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr87
+ }
+ default:
+ goto tr88
+ }
+ goto tr86
+ case 72:
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr89
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr89
+ }
+ default:
+ goto tr90
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st23
+ goto tr86
+ case 176:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr216
+ case 36:
+ goto tr216
+ case 37:
+ goto tr217
+ case 61:
+ goto tr216
+ case 95:
+ goto tr216
}
- default:
- goto st23
- }
- goto tr6
- st23:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof23
- }
- stCase23:
- switch (m.data)[(m.p)] {
- case 45:
- goto st24
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st24
+ switch {
+ case (m.data)[(m.p)] < 48:
+ if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 {
+ goto tr216
+ }
+ case (m.data)[(m.p)] > 59:
+ switch {
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr216
+ }
+ case (m.data)[(m.p)] >= 64:
+ goto tr216
+ }
+ default:
+ goto tr216
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st24
+ goto tr86
+ case 73:
+ if (m.data)[(m.p)] == 97 {
+ goto tr91
}
- default:
- goto st24
- }
- goto tr6
- st24:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof24
- }
- stCase24:
- switch (m.data)[(m.p)] {
- case 45:
- goto st25
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st25
+ goto tr74
+ case 74:
+ if (m.data)[(m.p)] == 114 {
+ goto tr92
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st25
+ goto tr74
+ case 75:
+ if (m.data)[(m.p)] == 97 {
+ goto tr93
}
- default:
- goto st25
- }
- goto tr6
- st25:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof25
- }
- stCase25:
- switch (m.data)[(m.p)] {
- case 45:
- goto st26
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st26
+ goto tr74
+ case 76:
+ if (m.data)[(m.p)] == 109 {
+ goto tr79
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st26
+ goto tr74
+ case 77:
+ if (m.data)[(m.p)] == 99 {
+ goto tr94
}
- default:
- goto st26
- }
- goto tr6
- st26:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof26
- }
- stCase26:
- switch (m.data)[(m.p)] {
- case 45:
- goto st27
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st27
+ goto tr74
+ case 78:
+ if (m.data)[(m.p)] == 104 {
+ goto tr95
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st27
+ goto tr74
+ case 79:
+ if (m.data)[(m.p)] == 101 {
+ goto tr96
}
- default:
- goto st27
- }
- goto tr6
- st27:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof27
- }
- stCase27:
- switch (m.data)[(m.p)] {
- case 45:
- goto st28
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st28
+ goto tr74
+ case 80:
+ if (m.data)[(m.p)] == 109 {
+ goto tr97
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st28
+ goto tr74
+ case 81:
+ if (m.data)[(m.p)] == 97 {
+ goto tr98
}
- default:
- goto st28
- }
- goto tr6
- st28:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof28
- }
- stCase28:
- switch (m.data)[(m.p)] {
- case 45:
- goto st29
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st29
+ goto tr74
+ case 82:
+ if (m.data)[(m.p)] == 115 {
+ goto tr79
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st29
+ goto tr74
+ case 83:
+ switch (m.data)[(m.p)] {
+ case 85:
+ goto tr99
+ case 117:
+ goto tr99
}
- default:
- goto st29
- }
- goto tr6
- st29:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof29
- }
- stCase29:
- switch (m.data)[(m.p)] {
- case 45:
- goto st30
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st30
+ goto tr0
+ case 84:
+ switch (m.data)[(m.p)] {
+ case 82:
+ goto tr100
+ case 114:
+ goto tr100
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st30
+ goto tr0
+ case 85:
+ switch (m.data)[(m.p)] {
+ case 78:
+ goto tr101
+ case 110:
+ goto tr101
}
- default:
- goto st30
- }
- goto tr6
- st30:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof30
- }
- stCase30:
- switch (m.data)[(m.p)] {
- case 45:
- goto st31
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st31
+ goto tr0
+ case 86:
+ if (m.data)[(m.p)] == 58 {
+ goto tr102
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st31
+ goto tr0
+ case 87:
+ switch (m.data)[(m.p)] {
+ case 85:
+ goto tr105
+ case 117:
+ goto tr105
}
- default:
- goto st31
- }
- goto tr6
- st31:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof31
- }
- stCase31:
- switch (m.data)[(m.p)] {
- case 45:
- goto st32
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st32
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr104
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr104
+ }
+ default:
+ goto tr104
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st32
+ goto tr103
+ case 88:
+ if (m.data)[(m.p)] == 45 {
+ goto tr107
}
- default:
- goto st32
- }
- goto tr6
- st32:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof32
- }
- stCase32:
- switch (m.data)[(m.p)] {
- case 45:
- goto st33
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st33
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr108
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr108
+ }
+ default:
+ goto tr108
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st33
+ goto tr106
+ case 89:
+ if (m.data)[(m.p)] == 45 {
+ goto tr109
}
- default:
- goto st33
- }
- goto tr6
- st33:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof33
- }
- stCase33:
- switch (m.data)[(m.p)] {
- case 45:
- goto st34
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st34
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr110
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr110
+ }
+ default:
+ goto tr110
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st34
+ goto tr106
+ case 90:
+ if (m.data)[(m.p)] == 45 {
+ goto tr111
}
- default:
- goto st34
- }
- goto tr6
- st34:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof34
- }
- stCase34:
- switch (m.data)[(m.p)] {
- case 45:
- goto st35
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st35
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr112
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr112
+ }
+ default:
+ goto tr112
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st35
+ goto tr106
+ case 91:
+ if (m.data)[(m.p)] == 45 {
+ goto tr113
}
- default:
- goto st35
- }
- goto tr6
- st35:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof35
- }
- stCase35:
- switch (m.data)[(m.p)] {
- case 45:
- goto st36
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st36
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr114
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr114
+ }
+ default:
+ goto tr114
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st36
+ goto tr106
+ case 92:
+ if (m.data)[(m.p)] == 45 {
+ goto tr115
}
- default:
- goto st36
- }
- goto tr6
- st36:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof36
- }
- stCase36:
- switch (m.data)[(m.p)] {
- case 45:
- goto st37
- case 58:
- goto tr10
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st37
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr116
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr116
+ }
+ default:
+ goto tr116
}
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st37
+ goto tr106
+ case 93:
+ if (m.data)[(m.p)] == 45 {
+ goto tr117
}
- default:
- goto st37
- }
- goto tr6
- st37:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof37
- }
- stCase37:
- if (m.data)[(m.p)] == 58 {
- goto tr10
- }
- goto tr6
- tr10:
-
- output.ID = string(m.text())
-
- goto st38
- st38:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof38
- }
- stCase38:
- switch (m.data)[(m.p)] {
- case 33:
- goto tr42
- case 36:
- goto tr42
- case 37:
- goto tr43
- case 61:
- goto tr42
- case 95:
- goto tr42
- }
- switch {
- case (m.data)[(m.p)] < 48:
- if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 {
- goto tr42
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr118
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr118
+ }
+ default:
+ goto tr118
+ }
+ goto tr106
+ case 94:
+ if (m.data)[(m.p)] == 45 {
+ goto tr119
}
- case (m.data)[(m.p)] > 59:
switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr120
+ }
case (m.data)[(m.p)] > 90:
if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto tr42
+ goto tr120
}
- case (m.data)[(m.p)] >= 64:
- goto tr42
+ default:
+ goto tr120
}
- default:
- goto tr42
- }
- goto tr41
- tr42:
-
- m.pb = m.p
-
- goto st44
- st44:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof44
- }
- stCase44:
- switch (m.data)[(m.p)] {
- case 33:
- goto st44
- case 36:
- goto st44
- case 37:
- goto st39
- case 61:
- goto st44
+ goto tr106
case 95:
- goto st44
- }
- switch {
- case (m.data)[(m.p)] < 48:
- if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 {
- goto st44
+ if (m.data)[(m.p)] == 45 {
+ goto tr121
}
- case (m.data)[(m.p)] > 59:
switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr122
+ }
case (m.data)[(m.p)] > 90:
if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st44
+ goto tr122
}
- case (m.data)[(m.p)] >= 64:
- goto st44
+ default:
+ goto tr122
}
- default:
- goto st44
- }
- goto tr41
- tr43:
+ goto tr106
+ case 96:
+ if (m.data)[(m.p)] == 45 {
+ goto tr123
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr124
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr124
+ }
+ default:
+ goto tr124
+ }
+ goto tr106
+ case 97:
+ if (m.data)[(m.p)] == 45 {
+ goto tr125
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr126
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr126
+ }
+ default:
+ goto tr126
+ }
+ goto tr106
+ case 98:
+ if (m.data)[(m.p)] == 45 {
+ goto tr127
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr128
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr128
+ }
+ default:
+ goto tr128
+ }
+ goto tr106
+ case 99:
+ if (m.data)[(m.p)] == 45 {
+ goto tr129
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr130
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr130
+ }
+ default:
+ goto tr130
+ }
+ goto tr106
+ case 100:
+ if (m.data)[(m.p)] == 45 {
+ goto tr131
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr132
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr132
+ }
+ default:
+ goto tr132
+ }
+ goto tr106
+ case 101:
+ if (m.data)[(m.p)] == 45 {
+ goto tr133
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr134
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr134
+ }
+ default:
+ goto tr134
+ }
+ goto tr106
+ case 102:
+ if (m.data)[(m.p)] == 45 {
+ goto tr135
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr136
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr136
+ }
+ default:
+ goto tr136
+ }
+ goto tr106
+ case 103:
+ if (m.data)[(m.p)] == 45 {
+ goto tr137
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr138
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr138
+ }
+ default:
+ goto tr138
+ }
+ goto tr106
+ case 104:
+ if (m.data)[(m.p)] == 45 {
+ goto tr139
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr140
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr140
+ }
+ default:
+ goto tr140
+ }
+ goto tr106
+ case 105:
+ if (m.data)[(m.p)] == 45 {
+ goto tr141
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr142
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr142
+ }
+ default:
+ goto tr142
+ }
+ goto tr106
+ case 106:
+ if (m.data)[(m.p)] == 45 {
+ goto tr143
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr144
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr144
+ }
+ default:
+ goto tr144
+ }
+ goto tr106
+ case 107:
+ if (m.data)[(m.p)] == 45 {
+ goto tr145
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr146
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr146
+ }
+ default:
+ goto tr146
+ }
+ goto tr106
+ case 108:
+ if (m.data)[(m.p)] == 45 {
+ goto tr147
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr148
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr148
+ }
+ default:
+ goto tr148
+ }
+ goto tr106
+ case 109:
+ if (m.data)[(m.p)] == 45 {
+ goto tr149
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr150
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr150
+ }
+ default:
+ goto tr150
+ }
+ goto tr106
+ case 110:
+ if (m.data)[(m.p)] == 45 {
+ goto tr151
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr152
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr152
+ }
+ default:
+ goto tr152
+ }
+ goto tr106
+ case 111:
+ if (m.data)[(m.p)] == 45 {
+ goto tr153
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr154
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr154
+ }
+ default:
+ goto tr154
+ }
+ goto tr106
+ case 112:
+ if (m.data)[(m.p)] == 45 {
+ goto tr155
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr156
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr156
+ }
+ default:
+ goto tr156
+ }
+ goto tr106
+ case 113:
+ if (m.data)[(m.p)] == 45 {
+ goto tr157
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr158
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr158
+ }
+ default:
+ goto tr158
+ }
+ goto tr106
+ case 114:
+ if (m.data)[(m.p)] == 45 {
+ goto tr159
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr160
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr160
+ }
+ default:
+ goto tr160
+ }
+ goto tr106
+ case 115:
+ if (m.data)[(m.p)] == 45 {
+ goto tr161
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr162
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr162
+ }
+ default:
+ goto tr162
+ }
+ goto tr106
+ case 116:
+ if (m.data)[(m.p)] == 45 {
+ goto tr163
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr164
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr164
+ }
+ default:
+ goto tr164
+ }
+ goto tr106
+ case 117:
+ if (m.data)[(m.p)] == 45 {
+ goto tr165
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr166
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr166
+ }
+ default:
+ goto tr166
+ }
+ goto tr106
+ case 118:
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr167
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr167
+ }
+ default:
+ goto tr167
+ }
+ goto tr106
+ case 119:
+ if (m.data)[(m.p)] == 58 {
+ goto tr168
+ }
+ goto tr106
+ case 120:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr170
+ case 37:
+ goto tr171
+ case 61:
+ goto tr170
+ case 95:
+ goto tr170
+ case 126:
+ goto tr170
+ }
+ switch {
+ case (m.data)[(m.p)] < 48:
+ if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 {
+ goto tr170
+ }
+ case (m.data)[(m.p)] > 59:
+ switch {
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr170
+ }
+ case (m.data)[(m.p)] >= 64:
+ goto tr170
+ }
+ default:
+ goto tr170
+ }
+ goto tr169
+ case 177:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr218
+ case 35:
+ goto tr219
+ case 37:
+ goto tr220
+ case 61:
+ goto tr218
+ case 63:
+ goto tr221
+ case 95:
+ goto tr218
+ case 126:
+ goto tr218
+ }
+ switch {
+ case (m.data)[(m.p)] < 64:
+ if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 {
+ goto tr218
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr218
+ }
+ default:
+ goto tr218
+ }
+ goto tr169
+ case 178:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr222
+ case 37:
+ goto tr223
+ case 61:
+ goto tr222
+ case 95:
+ goto tr222
+ case 126:
+ goto tr222
+ }
+ switch {
+ case (m.data)[(m.p)] < 63:
+ if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 {
+ goto tr222
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr222
+ }
+ default:
+ goto tr222
+ }
+ goto tr183
+ case 179:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr224
+ case 37:
+ goto tr225
+ case 61:
+ goto tr224
+ case 95:
+ goto tr224
+ case 126:
+ goto tr224
+ }
+ switch {
+ case (m.data)[(m.p)] < 63:
+ if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 {
+ goto tr224
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr224
+ }
+ default:
+ goto tr224
+ }
+ goto tr183
+ case 121:
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr173
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr173
+ }
+ default:
+ goto tr174
+ }
+ goto tr172
+ case 122:
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr175
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr175
+ }
+ default:
+ goto tr176
+ }
+ goto tr172
+ case 180:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr224
+ case 37:
+ goto tr225
+ case 61:
+ goto tr224
+ case 95:
+ goto tr224
+ case 126:
+ goto tr224
+ }
+ switch {
+ case (m.data)[(m.p)] < 63:
+ if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 {
+ goto tr224
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr224
+ }
+ default:
+ goto tr224
+ }
+ goto tr172
+ case 123:
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr178
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr178
+ }
+ default:
+ goto tr179
+ }
+ goto tr177
+ case 124:
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr180
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr180
+ }
+ default:
+ goto tr181
+ }
+ goto tr177
+ case 181:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr218
+ case 35:
+ goto tr219
+ case 37:
+ goto tr220
+ case 61:
+ goto tr218
+ case 63:
+ goto tr221
+ case 95:
+ goto tr218
+ case 126:
+ goto tr218
+ }
+ switch {
+ case (m.data)[(m.p)] < 64:
+ if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 {
+ goto tr218
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr218
+ }
+ default:
+ goto tr218
+ }
+ goto tr177
+ case 125:
+ switch (m.data)[(m.p)] {
+ case 43:
+ goto tr182
+ case 61:
+ goto tr184
+ }
+ goto tr183
+ case 126:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr186
+ case 37:
+ goto tr187
+ case 61:
+ goto tr186
+ case 63:
+ goto tr188
+ case 95:
+ goto tr186
+ case 126:
+ goto tr186
+ }
+ switch {
+ case (m.data)[(m.p)] < 48:
+ if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 {
+ goto tr186
+ }
+ case (m.data)[(m.p)] > 59:
+ switch {
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr186
+ }
+ case (m.data)[(m.p)] >= 64:
+ goto tr186
+ }
+ default:
+ goto tr186
+ }
+ goto tr185
+ case 182:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr226
+ case 35:
+ goto tr227
+ case 37:
+ goto tr228
+ case 61:
+ goto tr226
+ case 63:
+ goto tr229
+ case 95:
+ goto tr226
+ case 126:
+ goto tr226
+ }
+ switch {
+ case (m.data)[(m.p)] < 64:
+ if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 {
+ goto tr226
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr226
+ }
+ default:
+ goto tr226
+ }
+ goto tr185
+ case 127:
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr190
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr190
+ }
+ default:
+ goto tr191
+ }
+ goto tr189
+ case 128:
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr192
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr192
+ }
+ default:
+ goto tr193
+ }
+ goto tr189
+ case 183:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr226
+ case 35:
+ goto tr227
+ case 37:
+ goto tr228
+ case 61:
+ goto tr226
+ case 63:
+ goto tr229
+ case 95:
+ goto tr226
+ case 126:
+ goto tr226
+ }
+ switch {
+ case (m.data)[(m.p)] < 64:
+ if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 {
+ goto tr226
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr226
+ }
+ default:
+ goto tr226
+ }
+ goto tr189
+ case 184:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr226
+ case 35:
+ goto tr227
+ case 37:
+ goto tr228
+ case 43:
+ goto tr230
+ case 61:
+ goto tr231
+ case 63:
+ goto tr229
+ case 95:
+ goto tr226
+ case 126:
+ goto tr226
+ }
+ switch {
+ case (m.data)[(m.p)] < 64:
+ if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 {
+ goto tr226
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr226
+ }
+ default:
+ goto tr226
+ }
+ goto tr185
+ case 185:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr232
+ case 35:
+ goto tr233
+ case 37:
+ goto tr234
+ case 47:
+ goto tr226
+ case 61:
+ goto tr232
+ case 63:
+ goto tr235
+ case 95:
+ goto tr232
+ case 126:
+ goto tr232
+ }
+ switch {
+ case (m.data)[(m.p)] < 64:
+ if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 {
+ goto tr232
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr232
+ }
+ default:
+ goto tr232
+ }
+ goto tr185
+ case 186:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr204
+ case 35:
+ goto tr227
+ case 37:
+ goto tr237
+ case 47:
+ goto tr226
+ case 61:
+ goto tr204
+ case 63:
+ goto tr229
+ case 95:
+ goto tr204
+ case 126:
+ goto tr204
+ }
+ switch {
+ case (m.data)[(m.p)] < 64:
+ if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 {
+ goto tr204
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr204
+ }
+ default:
+ goto tr204
+ }
+ goto tr236
+ case 187:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr238
+ case 35:
+ goto tr239
+ case 37:
+ goto tr240
+ case 61:
+ goto tr238
+ case 63:
+ goto tr241
+ case 95:
+ goto tr238
+ case 126:
+ goto tr238
+ }
+ switch {
+ case (m.data)[(m.p)] < 64:
+ if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 {
+ goto tr238
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr238
+ }
+ default:
+ goto tr238
+ }
+ goto tr203
+ case 129:
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr195
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr195
+ }
+ default:
+ goto tr196
+ }
+ goto tr194
+ case 130:
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr197
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr197
+ }
+ default:
+ goto tr198
+ }
+ goto tr194
+ case 188:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr238
+ case 35:
+ goto tr239
+ case 37:
+ goto tr240
+ case 61:
+ goto tr238
+ case 63:
+ goto tr241
+ case 95:
+ goto tr238
+ case 126:
+ goto tr238
+ }
+ switch {
+ case (m.data)[(m.p)] < 64:
+ if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 {
+ goto tr238
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr238
+ }
+ default:
+ goto tr238
+ }
+ goto tr194
+ case 189:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr238
+ case 35:
+ goto tr239
+ case 37:
+ goto tr240
+ case 61:
+ goto tr242
+ case 63:
+ goto tr241
+ case 95:
+ goto tr238
+ case 126:
+ goto tr238
+ }
+ switch {
+ case (m.data)[(m.p)] < 64:
+ if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 {
+ goto tr238
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr238
+ }
+ default:
+ goto tr238
+ }
+ goto tr203
+ case 190:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr243
+ case 35:
+ goto tr244
+ case 37:
+ goto tr245
+ case 47:
+ goto tr238
+ case 61:
+ goto tr243
+ case 63:
+ goto tr246
+ case 95:
+ goto tr243
+ case 126:
+ goto tr243
+ }
+ switch {
+ case (m.data)[(m.p)] < 64:
+ if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 {
+ goto tr243
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr243
+ }
+ default:
+ goto tr243
+ }
+ goto tr203
+ case 131:
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr200
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr200
+ }
+ default:
+ goto tr201
+ }
+ goto tr199
+ case 132:
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr197
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr197
+ }
+ default:
+ goto tr198
+ }
+ goto tr199
+ case 133:
+ if (m.data)[(m.p)] == 43 {
+ goto tr202
+ }
+ goto tr185
+ case 191:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr232
+ case 35:
+ goto tr233
+ case 37:
+ goto tr234
+ case 61:
+ goto tr232
+ case 63:
+ goto tr247
+ case 95:
+ goto tr232
+ case 126:
+ goto tr232
+ }
+ switch {
+ case (m.data)[(m.p)] < 48:
+ if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 {
+ goto tr232
+ }
+ case (m.data)[(m.p)] > 59:
+ switch {
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr232
+ }
+ case (m.data)[(m.p)] >= 64:
+ goto tr232
+ }
+ default:
+ goto tr232
+ }
+ goto tr185
+ case 134:
+ switch (m.data)[(m.p)] {
+ case 43:
+ goto tr202
+ case 61:
+ goto tr184
+ }
+ goto tr185
+ case 135:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr204
+ case 37:
+ goto tr205
+ case 61:
+ goto tr204
+ case 63:
+ goto tr206
+ case 95:
+ goto tr204
+ case 126:
+ goto tr204
+ }
+ switch {
+ case (m.data)[(m.p)] < 48:
+ if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 {
+ goto tr204
+ }
+ case (m.data)[(m.p)] > 59:
+ switch {
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr204
+ }
+ case (m.data)[(m.p)] >= 64:
+ goto tr204
+ }
+ default:
+ goto tr204
+ }
+ goto tr203
+ case 136:
+ if (m.data)[(m.p)] == 61 {
+ goto tr207
+ }
+ goto tr203
+ case 192:
+ switch (m.data)[(m.p)] {
+ case 33:
+ goto tr243
+ case 35:
+ goto tr244
+ case 37:
+ goto tr245
+ case 61:
+ goto tr243
+ case 63:
+ goto tr248
+ case 95:
+ goto tr243
+ case 126:
+ goto tr243
+ }
+ switch {
+ case (m.data)[(m.p)] < 48:
+ if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 {
+ goto tr243
+ }
+ case (m.data)[(m.p)] > 59:
+ switch {
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr243
+ }
+ case (m.data)[(m.p)] >= 64:
+ goto tr243
+ }
+ default:
+ goto tr243
+ }
+ goto tr203
+ case 137:
+ if (m.data)[(m.p)] == 58 {
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr167
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr167
+ }
+ default:
+ goto tr167
+ }
+ goto tr106
+ case 138:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr165
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr166
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr166
+ }
+ default:
+ goto tr166
+ }
+ goto tr106
+ case 139:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr163
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr164
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr164
+ }
+ default:
+ goto tr164
+ }
+ goto tr106
+ case 140:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr161
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr162
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr162
+ }
+ default:
+ goto tr162
+ }
+ goto tr106
+ case 141:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr159
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr160
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr160
+ }
+ default:
+ goto tr160
+ }
+ goto tr106
+ case 142:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr157
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr158
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr158
+ }
+ default:
+ goto tr158
+ }
+ goto tr106
+ case 143:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr155
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr156
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr156
+ }
+ default:
+ goto tr156
+ }
+ goto tr106
+ case 144:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr153
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr154
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr154
+ }
+ default:
+ goto tr154
+ }
+ goto tr106
+ case 145:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr151
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr152
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr152
+ }
+ default:
+ goto tr152
+ }
+ goto tr106
+ case 146:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr149
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr150
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr150
+ }
+ default:
+ goto tr150
+ }
+ goto tr106
+ case 147:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr147
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr148
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr148
+ }
+ default:
+ goto tr148
+ }
+ goto tr106
+ case 148:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr145
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr146
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr146
+ }
+ default:
+ goto tr146
+ }
+ goto tr106
+ case 149:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr143
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr144
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr144
+ }
+ default:
+ goto tr144
+ }
+ goto tr106
+ case 150:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr141
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr142
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr142
+ }
+ default:
+ goto tr142
+ }
+ goto tr106
+ case 151:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr139
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr140
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr140
+ }
+ default:
+ goto tr140
+ }
+ goto tr106
+ case 152:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr137
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr138
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr138
+ }
+ default:
+ goto tr138
+ }
+ goto tr106
+ case 153:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr135
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr136
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr136
+ }
+ default:
+ goto tr136
+ }
+ goto tr106
+ case 154:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr133
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr134
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr134
+ }
+ default:
+ goto tr134
+ }
+ goto tr106
+ case 155:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr131
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr132
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr132
+ }
+ default:
+ goto tr132
+ }
+ goto tr106
+ case 156:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr129
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr130
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr130
+ }
+ default:
+ goto tr130
+ }
+ goto tr106
+ case 157:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr127
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr128
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr128
+ }
+ default:
+ goto tr128
+ }
+ goto tr106
+ case 158:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr125
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr126
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr126
+ }
+ default:
+ goto tr126
+ }
+ goto tr106
+ case 159:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr123
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr124
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr124
+ }
+ default:
+ goto tr124
+ }
+ goto tr106
+ case 160:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr121
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr122
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr122
+ }
+ default:
+ goto tr122
+ }
+ goto tr106
+ case 161:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr119
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr120
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr120
+ }
+ default:
+ goto tr120
+ }
+ goto tr106
+ case 162:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr117
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr118
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr118
+ }
+ default:
+ goto tr118
+ }
+ goto tr106
+ case 163:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr115
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr116
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr116
+ }
+ default:
+ goto tr116
+ }
+ goto tr106
+ case 164:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr113
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr114
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr114
+ }
+ default:
+ goto tr114
+ }
+ goto tr106
+ case 165:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr111
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr112
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr112
+ }
+ default:
+ goto tr112
+ }
+ goto tr106
+ case 166:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr109
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr110
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr110
+ }
+ default:
+ goto tr110
+ }
+ goto tr106
+ case 167:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr107
+ case 82:
+ goto tr208
+ case 114:
+ goto tr208
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr108
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr108
+ }
+ default:
+ goto tr108
+ }
+ goto tr103
+ case 168:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr109
+ case 58:
+ goto tr168
+ case 78:
+ goto tr209
+ case 110:
+ goto tr209
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr110
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr110
+ }
+ default:
+ goto tr110
+ }
+ goto tr103
+ case 169:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr210
+ case 58:
+ goto tr168
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr112
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr112
+ }
+ default:
+ goto tr112
+ }
+ goto tr106
+ case 170:
+ switch (m.data)[(m.p)] {
+ case 45:
+ goto tr113
+ case 48:
+ goto tr211
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 49 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr114
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr211
+ }
+ default:
+ goto tr211
+ }
+ goto tr106
+ case 171:
+ if (m.data)[(m.p)] == 45 {
+ goto tr115
+ }
+ switch {
+ case (m.data)[(m.p)] < 65:
+ if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
+ goto tr116
+ }
+ case (m.data)[(m.p)] > 90:
+ if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
+ goto tr116
+ }
+ default:
+ goto tr116
+ }
+ goto tr106
+ case 193:
+ switch (m.data)[(m.p)] {
+ case 10:
+ goto tr183
+ case 13:
+ goto tr183
+ }
+ goto tr249
+ }
+
+ tr183:
+ m.cs = 0
+ goto _again
+ tr0:
+ m.cs = 0
+ goto f0
+ tr5:
+ m.cs = 0
+ goto f3
+ tr8:
+ m.cs = 0
+ goto f5
+ tr41:
+ m.cs = 0
+ goto f7
+ tr44:
+ m.cs = 0
+ goto f8
+ tr51:
+ m.cs = 0
+ goto f10
+ tr56:
+ m.cs = 0
+ goto f11
+ tr74:
+ m.cs = 0
+ goto f13
+ tr81:
+ m.cs = 0
+ goto f15
+ tr83:
+ m.cs = 0
+ goto f17
+ tr86:
+ m.cs = 0
+ goto f19
+ tr103:
+ m.cs = 0
+ goto f20
+ tr106:
+ m.cs = 0
+ goto f21
+ tr169:
+ m.cs = 0
+ goto f22
+ tr172:
+ m.cs = 0
+ goto f23
+ tr177:
+ m.cs = 0
+ goto f24
+ tr185:
+ m.cs = 0
+ goto f25
+ tr189:
+ m.cs = 0
+ goto f27
+ tr194:
+ m.cs = 0
+ goto f28
+ tr199:
+ m.cs = 0
+ goto f29
+ tr203:
+ m.cs = 0
+ goto f30
+ tr236:
+ m.cs = 0
+ goto f46
+ tr1:
+ m.cs = 2
+ goto f1
+ tr2:
+ m.cs = 3
+ goto _again
+ tr3:
+ m.cs = 4
+ goto _again
+ tr4:
+ m.cs = 5
+ goto f2
+ tr6:
+ m.cs = 6
+ goto f4
+ tr9:
+ m.cs = 7
+ goto _again
+ tr11:
+ m.cs = 8
+ goto _again
+ tr12:
+ m.cs = 9
+ goto _again
+ tr13:
+ m.cs = 10
+ goto _again
+ tr14:
+ m.cs = 11
+ goto _again
+ tr15:
+ m.cs = 12
+ goto _again
+ tr16:
+ m.cs = 13
+ goto _again
+ tr17:
+ m.cs = 14
+ goto _again
+ tr18:
+ m.cs = 15
+ goto _again
+ tr19:
+ m.cs = 16
+ goto _again
+ tr20:
+ m.cs = 17
+ goto _again
+ tr21:
+ m.cs = 18
+ goto _again
+ tr22:
+ m.cs = 19
+ goto _again
+ tr23:
+ m.cs = 20
+ goto _again
+ tr24:
+ m.cs = 21
+ goto _again
+ tr25:
+ m.cs = 22
+ goto _again
+ tr26:
+ m.cs = 23
+ goto _again
+ tr27:
+ m.cs = 24
+ goto _again
+ tr28:
+ m.cs = 25
+ goto _again
+ tr29:
+ m.cs = 26
+ goto _again
+ tr30:
+ m.cs = 27
+ goto _again
+ tr31:
+ m.cs = 28
+ goto _again
+ tr32:
+ m.cs = 29
+ goto _again
+ tr33:
+ m.cs = 30
+ goto _again
+ tr34:
+ m.cs = 31
+ goto _again
+ tr35:
+ m.cs = 32
+ goto _again
+ tr36:
+ m.cs = 33
+ goto _again
+ tr37:
+ m.cs = 34
+ goto _again
+ tr38:
+ m.cs = 35
+ goto _again
+ tr39:
+ m.cs = 36
+ goto _again
+ tr40:
+ m.cs = 37
+ goto _again
+ tr10:
+ m.cs = 38
+ goto f6
+ tr213:
+ m.cs = 39
+ goto _again
+ tr43:
+ m.cs = 39
+ goto f4
+ tr45:
+ m.cs = 40
+ goto _again
+ tr46:
+ m.cs = 40
+ goto f9
+ tr7:
+ m.cs = 41
+ goto f1
+ tr49:
+ m.cs = 42
+ goto _again
+ tr50:
+ m.cs = 43
+ goto _again
+ tr52:
+ m.cs = 45
+ goto f1
+ tr53:
+ m.cs = 46
+ goto _again
+ tr54:
+ m.cs = 47
+ goto _again
+ tr55:
+ m.cs = 48
+ goto f2
+ tr57:
+ m.cs = 49
+ goto f4
+ tr58:
+ m.cs = 50
+ goto _again
+ tr59:
+ m.cs = 51
+ goto _again
+ tr60:
+ m.cs = 52
+ goto _again
+ tr61:
+ m.cs = 53
+ goto _again
+ tr62:
+ m.cs = 54
+ goto _again
+ tr63:
+ m.cs = 55
+ goto _again
+ tr64:
+ m.cs = 56
+ goto _again
+ tr65:
+ m.cs = 57
+ goto _again
+ tr66:
+ m.cs = 58
+ goto _again
+ tr67:
+ m.cs = 59
+ goto _again
+ tr68:
+ m.cs = 60
+ goto _again
+ tr69:
+ m.cs = 61
+ goto _again
+ tr70:
+ m.cs = 62
+ goto _again
+ tr71:
+ m.cs = 63
+ goto _again
+ tr72:
+ m.cs = 64
+ goto _again
+ tr73:
+ m.cs = 65
+ goto f12
+ tr75:
+ m.cs = 66
+ goto f4
+ tr78:
+ m.cs = 67
+ goto _again
+ tr79:
+ m.cs = 68
+ goto _again
+ tr80:
+ m.cs = 69
+ goto f14
+ tr215:
+ m.cs = 70
+ goto f35
+ tr217:
+ m.cs = 71
+ goto _again
+ tr85:
+ m.cs = 71
+ goto f18
+ tr87:
+ m.cs = 72
+ goto _again
+ tr88:
+ m.cs = 72
+ goto f9
+ tr76:
+ m.cs = 73
+ goto f4
+ tr91:
+ m.cs = 74
+ goto _again
+ tr92:
+ m.cs = 75
+ goto _again
+ tr93:
+ m.cs = 76
+ goto _again
+ tr77:
+ m.cs = 77
+ goto f4
+ tr94:
+ m.cs = 78
+ goto _again
+ tr95:
+ m.cs = 79
+ goto _again
+ tr96:
+ m.cs = 80
+ goto _again
+ tr97:
+ m.cs = 81
+ goto _again
+ tr98:
+ m.cs = 82
+ goto _again
+ tr99:
+ m.cs = 84
+ goto f1
+ tr100:
+ m.cs = 85
+ goto _again
+ tr101:
+ m.cs = 86
+ goto _again
+ tr102:
+ m.cs = 87
+ goto f2
+ tr104:
+ m.cs = 88
+ goto f4
+ tr107:
+ m.cs = 89
+ goto _again
+ tr109:
+ m.cs = 90
+ goto _again
+ tr111:
+ m.cs = 91
+ goto _again
+ tr113:
+ m.cs = 92
+ goto _again
+ tr115:
+ m.cs = 93
+ goto _again
+ tr117:
+ m.cs = 94
+ goto _again
+ tr119:
+ m.cs = 95
+ goto _again
+ tr121:
+ m.cs = 96
+ goto _again
+ tr123:
+ m.cs = 97
+ goto _again
+ tr125:
+ m.cs = 98
+ goto _again
+ tr127:
+ m.cs = 99
+ goto _again
+ tr129:
+ m.cs = 100
+ goto _again
+ tr131:
+ m.cs = 101
+ goto _again
+ tr133:
+ m.cs = 102
+ goto _again
+ tr135:
+ m.cs = 103
+ goto _again
+ tr137:
+ m.cs = 104
+ goto _again
+ tr139:
+ m.cs = 105
+ goto _again
+ tr141:
+ m.cs = 106
+ goto _again
+ tr143:
+ m.cs = 107
+ goto _again
+ tr145:
+ m.cs = 108
+ goto _again
+ tr147:
+ m.cs = 109
+ goto _again
+ tr149:
+ m.cs = 110
+ goto _again
+ tr151:
+ m.cs = 111
+ goto _again
+ tr153:
+ m.cs = 112
+ goto _again
+ tr155:
+ m.cs = 113
+ goto _again
+ tr157:
+ m.cs = 114
+ goto _again
+ tr159:
+ m.cs = 115
+ goto _again
+ tr161:
+ m.cs = 116
+ goto _again
+ tr163:
+ m.cs = 117
+ goto _again
+ tr165:
+ m.cs = 118
+ goto _again
+ tr167:
+ m.cs = 119
+ goto _again
+ tr168:
+ m.cs = 120
+ goto f6
+ tr225:
+ m.cs = 121
+ goto _again
+ tr223:
+ m.cs = 121
+ goto f4
+ tr173:
+ m.cs = 122
+ goto _again
+ tr174:
+ m.cs = 122
+ goto f9
+ tr220:
+ m.cs = 123
+ goto _again
+ tr171:
+ m.cs = 123
+ goto f4
+ tr178:
+ m.cs = 124
+ goto _again
+ tr179:
+ m.cs = 124
+ goto f9
+ tr221:
+ m.cs = 125
+ goto f38
+ tr182:
+ m.cs = 126
+ goto _again
+ tr228:
+ m.cs = 127
+ goto _again
+ tr187:
+ m.cs = 127
+ goto f26
+ tr234:
+ m.cs = 127
+ goto f44
+ tr190:
+ m.cs = 128
+ goto _again
+ tr191:
+ m.cs = 128
+ goto f9
+ tr240:
+ m.cs = 129
+ goto _again
+ tr205:
+ m.cs = 129
+ goto f31
+ tr245:
+ m.cs = 129
+ goto f50
+ tr195:
+ m.cs = 130
+ goto _again
+ tr196:
+ m.cs = 130
+ goto f9
+ tr237:
+ m.cs = 131
+ goto f31
+ tr200:
+ m.cs = 132
+ goto _again
+ tr201:
+ m.cs = 132
+ goto f9
+ tr188:
+ m.cs = 133
+ goto f26
+ tr247:
+ m.cs = 134
+ goto f45
+ tr184:
+ m.cs = 135
+ goto _again
+ tr206:
+ m.cs = 136
+ goto f31
+ tr248:
+ m.cs = 136
+ goto f50
+ tr166:
+ m.cs = 137
+ goto _again
+ tr164:
+ m.cs = 138
+ goto _again
+ tr162:
+ m.cs = 139
+ goto _again
+ tr160:
+ m.cs = 140
+ goto _again
+ tr158:
+ m.cs = 141
+ goto _again
+ tr156:
+ m.cs = 142
+ goto _again
+ tr154:
+ m.cs = 143
+ goto _again
+ tr152:
+ m.cs = 144
+ goto _again
+ tr150:
+ m.cs = 145
+ goto _again
+ tr148:
+ m.cs = 146
+ goto _again
+ tr146:
+ m.cs = 147
+ goto _again
+ tr144:
+ m.cs = 148
+ goto _again
+ tr142:
+ m.cs = 149
+ goto _again
+ tr140:
+ m.cs = 150
+ goto _again
+ tr138:
+ m.cs = 151
+ goto _again
+ tr136:
+ m.cs = 152
+ goto _again
+ tr134:
+ m.cs = 153
+ goto _again
+ tr132:
+ m.cs = 154
+ goto _again
+ tr130:
+ m.cs = 155
+ goto _again
+ tr128:
+ m.cs = 156
+ goto _again
+ tr126:
+ m.cs = 157
+ goto _again
+ tr124:
+ m.cs = 158
+ goto _again
+ tr122:
+ m.cs = 159
+ goto _again
+ tr120:
+ m.cs = 160
+ goto _again
+ tr118:
+ m.cs = 161
+ goto _again
+ tr116:
+ m.cs = 162
+ goto _again
+ tr114:
+ m.cs = 163
+ goto _again
+ tr112:
+ m.cs = 164
+ goto _again
+ tr110:
+ m.cs = 165
+ goto _again
+ tr108:
+ m.cs = 166
+ goto _again
+ tr105:
+ m.cs = 167
+ goto f1
+ tr208:
+ m.cs = 168
+ goto _again
+ tr209:
+ m.cs = 169
+ goto _again
+ tr210:
+ m.cs = 170
+ goto f2
+ tr211:
+ m.cs = 171
+ goto _again
+ tr212:
+ m.cs = 172
+ goto _again
+ tr42:
+ m.cs = 172
+ goto f4
+ tr47:
+ m.cs = 173
+ goto _again
+ tr48:
+ m.cs = 173
+ goto f9
+ tr214:
+ m.cs = 174
+ goto _again
+ tr82:
+ m.cs = 174
+ goto f16
+ tr216:
+ m.cs = 175
+ goto _again
+ tr84:
+ m.cs = 175
+ goto f18
+ tr89:
+ m.cs = 176
+ goto _again
+ tr90:
+ m.cs = 176
+ goto f9
+ tr218:
+ m.cs = 177
+ goto _again
+ tr170:
+ m.cs = 177
+ goto f4
+ tr219:
+ m.cs = 178
+ goto f38
+ tr227:
+ m.cs = 178
+ goto f42
+ tr233:
+ m.cs = 178
+ goto f45
+ tr239:
+ m.cs = 178
+ goto f48
+ tr244:
+ m.cs = 178
+ goto f51
+ tr224:
+ m.cs = 179
+ goto _again
+ tr222:
+ m.cs = 179
+ goto f4
+ tr175:
+ m.cs = 180
+ goto _again
+ tr176:
+ m.cs = 180
+ goto f9
+ tr180:
+ m.cs = 181
+ goto _again
+ tr181:
+ m.cs = 181
+ goto f9
+ tr226:
+ m.cs = 182
+ goto _again
+ tr186:
+ m.cs = 182
+ goto f26
+ tr232:
+ m.cs = 182
+ goto f44
+ tr192:
+ m.cs = 183
+ goto _again
+ tr193:
+ m.cs = 183
+ goto f9
+ tr229:
+ m.cs = 184
+ goto f42
+ tr235:
+ m.cs = 184
+ goto f45
+ tr230:
+ m.cs = 185
+ goto _again
+ tr231:
+ m.cs = 186
+ goto _again
+ tr238:
+ m.cs = 187
+ goto _again
+ tr204:
+ m.cs = 187
+ goto f31
+ tr243:
+ m.cs = 187
+ goto f50
+ tr197:
+ m.cs = 188
+ goto _again
+ tr198:
+ m.cs = 188
+ goto f9
+ tr241:
+ m.cs = 189
+ goto _again
+ tr246:
+ m.cs = 189
+ goto f50
+ tr242:
+ m.cs = 190
+ goto _again
+ tr202:
+ m.cs = 191
+ goto _again
+ tr207:
+ m.cs = 192
+ goto _again
+ tr249:
+ m.cs = 193
+ goto _again
+
+ f4:
+
+ m.pb = m.p
+
+ goto _again
+ f9:
+
+ // List of positions in the buffer to later lowercase
+ output.tolower = append(output.tolower, m.p-m.pb)
+
+ goto _again
+ f2:
+
+ output.prefix = string(m.text())
+
+ goto _again
+ f6:
+
+ output.ID = string(m.text())
+
+ goto _again
+ f38:
+
+ output.SS = string(m.text())
+ // Iterate upper letters lowering them
+ for _, i := range output.tolower {
+ m.data[m.pb+i] = m.data[m.pb+i] + 32
+ }
+ output.norm = string(m.text())
+ // Revert the buffer to the original
+ for _, i := range output.tolower {
+ m.data[m.pb+i] = m.data[m.pb+i] - 32
+ }
+
+ goto _again
+ f0:
+
+ m.err = fmt.Errorf(errPrefix, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f5:
+
+ m.err = fmt.Errorf(errIdentifier, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f7:
+
+ m.err = fmt.Errorf(errSpecificString, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f23:
+
+ if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only {
+ m.err = fmt.Errorf(errHex, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ }
+
+ goto _again
+ f11:
+
+ m.err = fmt.Errorf(errSCIMNamespace, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f13:
+
+ m.err = fmt.Errorf(errSCIMType, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f15:
+
+ m.err = fmt.Errorf(errSCIMName, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f17:
+
+ if m.p == m.pe {
+ m.err = fmt.Errorf(errSCIMOtherIncomplete, m.p-1)
+ } else {
+ m.err = fmt.Errorf(errSCIMOther, m.p)
+ }
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f14:
+
+ output.scim.Type = scimschema.TypeFromString(string(m.text()))
+
+ goto _again
+ f16:
+
+ output.scim.pos = m.p
+
+ goto _again
+ f35:
+
+ output.scim.Name = string(m.data[output.scim.pos:m.p])
+
+ goto _again
+ f18:
+
+ output.scim.pos = m.p
+
+ goto _again
+ f22:
+
+ m.err = fmt.Errorf(err8141SpecificString, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f21:
+
+ m.err = fmt.Errorf(err8141Identifier, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f42:
+
+ output.rComponent = string(m.text())
+
+ goto _again
+ f48:
+
+ output.qComponent = string(m.text())
+
+ goto _again
+ f44:
+
+ if output.rStart {
+ m.err = fmt.Errorf(err8141RComponentStart, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ }
+ output.rStart = true
+
+ goto _again
+ f50:
+
+ if output.qStart {
+ m.err = fmt.Errorf(err8141QComponentStart, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ }
+ output.qStart = true
+
+ goto _again
+ f25:
+
+ m.err = fmt.Errorf(err8141MalformedRComp, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f30:
+
+ m.err = fmt.Errorf(err8141MalformedQComp, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f1:
+
+ m.pb = m.p
+
+ if m.parsingMode != RFC8141Only {
+ // Throw an error when:
+ // - we are entering here matching the the prefix in the namespace identifier part
+ // - looking ahead (3 chars) we find a colon
+ if pos := m.p + 3; pos < m.pe && m.data[pos] == 58 && output.prefix != "" {
+ m.err = fmt.Errorf(errNoUrnWithinID, pos)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ }
+ }
+
+ goto _again
+ f12:
+
+ output.ID = string(m.text())
+
+ output.scim = &SCIM{}
+
+ goto _again
+ f3:
+
+ m.err = fmt.Errorf(errIdentifier, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ m.err = fmt.Errorf(errPrefix, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f10:
+
+ m.err = fmt.Errorf(errIdentifier, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ m.err = fmt.Errorf(errNoUrnWithinID, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f8:
+
+ if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only {
+ m.err = fmt.Errorf(errHex, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ }
+
+ m.err = fmt.Errorf(errSpecificString, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f19:
+
+ if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only {
+ m.err = fmt.Errorf(errHex, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ }
+
+ if m.p == m.pe {
+ m.err = fmt.Errorf(errSCIMOtherIncomplete, m.p-1)
+ } else {
+ m.err = fmt.Errorf(errSCIMOther, m.p)
+ }
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f24:
+
+ if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only {
+ m.err = fmt.Errorf(errHex, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ }
+
+ m.err = fmt.Errorf(err8141SpecificString, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f27:
+
+ if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only {
+ m.err = fmt.Errorf(errHex, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ }
+
+ m.err = fmt.Errorf(err8141MalformedRComp, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f28:
+
+ if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only {
+ m.err = fmt.Errorf(errHex, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ }
+
+ m.err = fmt.Errorf(err8141MalformedQComp, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f20:
+
+ m.err = fmt.Errorf(err8141Identifier, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ m.err = fmt.Errorf(errPrefix, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f26:
+
+ if output.rStart {
+ m.err = fmt.Errorf(err8141RComponentStart, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ }
+ output.rStart = true
+
+ m.pb = m.p
+
+ goto _again
+ f45:
- m.pb = m.p
+ if output.rStart {
+ m.err = fmt.Errorf(err8141RComponentStart, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
- goto st39
- st39:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof39
- }
- stCase39:
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st40
- }
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st40
- }
- default:
- goto tr46
}
- goto tr44
- tr46:
+ output.rStart = true
- m.tolower = append(m.tolower, m.p-m.pb)
+ output.rComponent = string(m.text())
- goto st40
- st40:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof40
- }
- stCase40:
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st45
- }
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st45
- }
- default:
- goto tr48
- }
- goto tr44
- tr48:
+ goto _again
+ f31:
- m.tolower = append(m.tolower, m.p-m.pb)
+ if output.qStart {
+ m.err = fmt.Errorf(err8141QComponentStart, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
- goto st45
- st45:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof45
- }
- stCase45:
- switch (m.data)[(m.p)] {
- case 33:
- goto st44
- case 36:
- goto st44
- case 37:
- goto st39
- case 61:
- goto st44
- case 95:
- goto st44
- }
- switch {
- case (m.data)[(m.p)] < 48:
- if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 {
- goto st44
- }
- case (m.data)[(m.p)] > 59:
- switch {
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st44
- }
- case (m.data)[(m.p)] >= 64:
- goto st44
- }
- default:
- goto st44
}
- goto tr44
- tr8:
+ output.qStart = true
m.pb = m.p
- goto st41
- st41:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof41
- }
- stCase41:
- switch (m.data)[(m.p)] {
- case 45:
- goto st7
- case 58:
- goto tr10
- case 82:
- goto st42
- case 114:
- goto st42
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st7
- }
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st7
- }
- default:
- goto st7
- }
- goto tr6
- st42:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof42
- }
- stCase42:
- switch (m.data)[(m.p)] {
- case 45:
- goto st8
- case 58:
- goto tr10
- case 78:
- goto st43
- case 110:
- goto st43
- }
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st8
- }
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st8
- }
- default:
- goto st8
- }
- goto tr50
- st43:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof43
+ goto _again
+ f51:
+
+ if output.qStart {
+ m.err = fmt.Errorf(err8141QComponentStart, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
}
- stCase43:
- if (m.data)[(m.p)] == 45 {
- goto st9
+ output.qStart = true
+
+ output.qComponent = string(m.text())
+
+ goto _again
+ f46:
+
+ m.err = fmt.Errorf(err8141MalformedRComp, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ m.err = fmt.Errorf(err8141MalformedQComp, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+ f29:
+
+ if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only {
+ m.err = fmt.Errorf(errHex, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
}
- switch {
- case (m.data)[(m.p)] < 65:
- if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 {
- goto st9
- }
- case (m.data)[(m.p)] > 90:
- if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 {
- goto st9
- }
- default:
- goto st9
+
+ m.err = fmt.Errorf(err8141MalformedRComp, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ m.err = fmt.Errorf(err8141MalformedQComp, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ goto _again
+
+ _again:
+ switch _toStateActions[m.cs] {
+ case 33:
+
+ (m.p)--
+
+ m.err = fmt.Errorf(err8141InformalID, m.p)
+ m.cs = 193
+ goto _again
}
- goto tr52
- st46:
- if (m.p)++; (m.p) == (m.pe) {
- goto _testEof46
+
+ if m.cs == 0 {
+ goto _out
}
- stCase46:
- switch (m.data)[(m.p)] {
- case 10:
- goto st0
- case 13:
- goto st0
+ if (m.p)++; (m.p) != (m.pe) {
+ goto _resume
}
- goto st46
- stOut:
- _testEof2:
- m.cs = 2
- goto _testEof
- _testEof3:
- m.cs = 3
- goto _testEof
- _testEof4:
- m.cs = 4
- goto _testEof
- _testEof5:
- m.cs = 5
- goto _testEof
- _testEof6:
- m.cs = 6
- goto _testEof
- _testEof7:
- m.cs = 7
- goto _testEof
- _testEof8:
- m.cs = 8
- goto _testEof
- _testEof9:
- m.cs = 9
- goto _testEof
- _testEof10:
- m.cs = 10
- goto _testEof
- _testEof11:
- m.cs = 11
- goto _testEof
- _testEof12:
- m.cs = 12
- goto _testEof
- _testEof13:
- m.cs = 13
- goto _testEof
- _testEof14:
- m.cs = 14
- goto _testEof
- _testEof15:
- m.cs = 15
- goto _testEof
- _testEof16:
- m.cs = 16
- goto _testEof
- _testEof17:
- m.cs = 17
- goto _testEof
- _testEof18:
- m.cs = 18
- goto _testEof
- _testEof19:
- m.cs = 19
- goto _testEof
- _testEof20:
- m.cs = 20
- goto _testEof
- _testEof21:
- m.cs = 21
- goto _testEof
- _testEof22:
- m.cs = 22
- goto _testEof
- _testEof23:
- m.cs = 23
- goto _testEof
- _testEof24:
- m.cs = 24
- goto _testEof
- _testEof25:
- m.cs = 25
- goto _testEof
- _testEof26:
- m.cs = 26
- goto _testEof
- _testEof27:
- m.cs = 27
- goto _testEof
- _testEof28:
- m.cs = 28
- goto _testEof
- _testEof29:
- m.cs = 29
- goto _testEof
- _testEof30:
- m.cs = 30
- goto _testEof
- _testEof31:
- m.cs = 31
- goto _testEof
- _testEof32:
- m.cs = 32
- goto _testEof
- _testEof33:
- m.cs = 33
- goto _testEof
- _testEof34:
- m.cs = 34
- goto _testEof
- _testEof35:
- m.cs = 35
- goto _testEof
- _testEof36:
- m.cs = 36
- goto _testEof
- _testEof37:
- m.cs = 37
- goto _testEof
- _testEof38:
- m.cs = 38
- goto _testEof
- _testEof44:
- m.cs = 44
- goto _testEof
- _testEof39:
- m.cs = 39
- goto _testEof
- _testEof40:
- m.cs = 40
- goto _testEof
- _testEof45:
- m.cs = 45
- goto _testEof
- _testEof41:
- m.cs = 41
- goto _testEof
- _testEof42:
- m.cs = 42
- goto _testEof
- _testEof43:
- m.cs = 43
- goto _testEof
- _testEof46:
- m.cs = 46
- goto _testEof
-
_testEof:
{
}
if (m.p) == (m.eof) {
- switch m.cs {
- case 44, 45:
+ switch _eofActions[m.cs] {
+ case 1:
- raw := m.text()
- output.SS = string(raw)
- // Iterate upper letters lowering them
- for _, i := range m.tolower {
- raw[i] = raw[i] + 32
- }
- output.norm = string(raw)
+ m.err = fmt.Errorf(errPrefix, m.p)
+ (m.p)--
- case 1, 2, 4:
+ m.cs = 193
+ goto _again
- m.err = fmt.Errorf(errParse, m.p)
+ case 6:
+
+ m.err = fmt.Errorf(errIdentifier, m.p)
(m.p)--
- {
- goto st46
- }
+ m.cs = 193
+ goto _again
- case 3:
+ case 8:
- m.err = fmt.Errorf(errPrefix, m.p)
+ m.err = fmt.Errorf(errSpecificString, m.p)
(m.p)--
- {
- goto st46
+ m.cs = 193
+ goto _again
+
+ case 24:
+
+ if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only {
+ m.err = fmt.Errorf(errHex, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
}
- m.err = fmt.Errorf(errParse, m.p)
+ case 12:
+
+ m.err = fmt.Errorf(errSCIMNamespace, m.p)
(m.p)--
- {
- goto st46
- }
+ m.cs = 193
+ goto _again
- case 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 41:
+ case 14:
- m.err = fmt.Errorf(errIdentifier, m.p)
+ m.err = fmt.Errorf(errSCIMType, m.p)
(m.p)--
- {
- goto st46
- }
+ m.cs = 193
+ goto _again
+
+ case 16:
- m.err = fmt.Errorf(errParse, m.p)
+ m.err = fmt.Errorf(errSCIMName, m.p)
(m.p)--
- {
- goto st46
+ m.cs = 193
+ goto _again
+
+ case 18:
+
+ if m.p == m.pe {
+ m.err = fmt.Errorf(errSCIMOtherIncomplete, m.p-1)
+ } else {
+ m.err = fmt.Errorf(errSCIMOther, m.p)
}
+ (m.p)--
- case 38:
+ m.cs = 193
+ goto _again
- m.err = fmt.Errorf(errSpecificString, m.p)
+ case 23:
+
+ m.err = fmt.Errorf(err8141SpecificString, m.p)
(m.p)--
- {
- goto st46
- }
+ m.cs = 193
+ goto _again
+
+ case 22:
- m.err = fmt.Errorf(errParse, m.p)
+ m.err = fmt.Errorf(err8141Identifier, m.p)
(m.p)--
- {
- goto st46
- }
+ m.cs = 193
+ goto _again
- case 42:
+ case 26:
- m.err = fmt.Errorf(errPrefix, m.p)
+ m.err = fmt.Errorf(err8141MalformedRComp, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ case 31:
+
+ m.err = fmt.Errorf(err8141MalformedQComp, m.p)
(m.p)--
- {
- goto st46
+ m.cs = 193
+ goto _again
+
+ case 34:
+
+ output.SS = string(m.text())
+ // Iterate upper letters lowering them
+ for _, i := range output.tolower {
+ m.data[m.pb+i] = m.data[m.pb+i] + 32
+ }
+ output.norm = string(m.text())
+ // Revert the buffer to the original
+ for _, i := range output.tolower {
+ m.data[m.pb+i] = m.data[m.pb+i] - 32
+ }
+
+ output.kind = RFC2141
+
+ case 38:
+
+ output.SS = string(m.text())
+ // Iterate upper letters lowering them
+ for _, i := range output.tolower {
+ m.data[m.pb+i] = m.data[m.pb+i] + 32
+ }
+ output.norm = string(m.text())
+ // Revert the buffer to the original
+ for _, i := range output.tolower {
+ m.data[m.pb+i] = m.data[m.pb+i] - 32
}
+ output.kind = RFC8141
+
+ case 4:
+
m.err = fmt.Errorf(errIdentifier, m.p)
(m.p)--
- {
- goto st46
- }
+ m.cs = 193
+ goto _again
- m.err = fmt.Errorf(errParse, m.p)
+ m.err = fmt.Errorf(errPrefix, m.p)
(m.p)--
- {
- goto st46
- }
+ m.cs = 193
+ goto _again
- case 43:
+ case 11:
+
+ m.err = fmt.Errorf(errIdentifier, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
m.err = fmt.Errorf(errNoUrnWithinID, m.p)
(m.p)--
- {
- goto st46
+ m.cs = 193
+ goto _again
+
+ case 9:
+
+ if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only {
+ m.err = fmt.Errorf(errHex, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
}
- m.err = fmt.Errorf(errIdentifier, m.p)
+ m.err = fmt.Errorf(errSpecificString, m.p)
(m.p)--
- {
- goto st46
+ m.cs = 193
+ goto _again
+
+ case 20:
+
+ if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only {
+ m.err = fmt.Errorf(errHex, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
}
- m.err = fmt.Errorf(errParse, m.p)
+ if m.p == m.pe {
+ m.err = fmt.Errorf(errSCIMOtherIncomplete, m.p-1)
+ } else {
+ m.err = fmt.Errorf(errSCIMOther, m.p)
+ }
(m.p)--
- {
- goto st46
+ m.cs = 193
+ goto _again
+
+ case 25:
+
+ if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only {
+ m.err = fmt.Errorf(errHex, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
}
- case 39, 40:
+ m.err = fmt.Errorf(err8141SpecificString, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ case 28:
+
+ if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only {
+ m.err = fmt.Errorf(errHex, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ }
- m.err = fmt.Errorf(errHex, m.p)
+ m.err = fmt.Errorf(err8141MalformedRComp, m.p)
(m.p)--
- {
- goto st46
+ m.cs = 193
+ goto _again
+
+ case 29:
+
+ if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only {
+ m.err = fmt.Errorf(errHex, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
}
- m.err = fmt.Errorf(errSpecificString, m.p)
+ m.err = fmt.Errorf(err8141MalformedQComp, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ case 21:
+
+ m.err = fmt.Errorf(err8141Identifier, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ m.err = fmt.Errorf(errPrefix, m.p)
(m.p)--
- {
- goto st46
+ m.cs = 193
+ goto _again
+
+ case 42:
+
+ output.rComponent = string(m.text())
+
+ output.kind = RFC8141
+
+ case 48:
+
+ output.qComponent = string(m.text())
+
+ output.kind = RFC8141
+
+ case 41:
+
+ output.fComponent = string(m.text())
+
+ output.kind = RFC8141
+
+ case 40:
+
+ m.pb = m.p
+
+ output.fComponent = string(m.text())
+
+ output.kind = RFC8141
+
+ case 30:
+
+ if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only {
+ m.err = fmt.Errorf(errHex, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
}
- m.err = fmt.Errorf(errParse, m.p)
+ m.err = fmt.Errorf(err8141MalformedRComp, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ m.err = fmt.Errorf(err8141MalformedQComp, m.p)
(m.p)--
- {
- goto st46
+ m.cs = 193
+ goto _again
+
+ case 35:
+
+ output.scim.Name = string(m.data[output.scim.pos:m.p])
+
+ output.SS = string(m.text())
+ // Iterate upper letters lowering them
+ for _, i := range output.tolower {
+ m.data[m.pb+i] = m.data[m.pb+i] + 32
+ }
+ output.norm = string(m.text())
+ // Revert the buffer to the original
+ for _, i := range output.tolower {
+ m.data[m.pb+i] = m.data[m.pb+i] - 32
+ }
+
+ output.kind = RFC7643
+
+ case 37:
+
+ output.scim.Other = string(m.data[output.scim.pos:m.p])
+
+ output.SS = string(m.text())
+ // Iterate upper letters lowering them
+ for _, i := range output.tolower {
+ m.data[m.pb+i] = m.data[m.pb+i] + 32
+ }
+ output.norm = string(m.text())
+ // Revert the buffer to the original
+ for _, i := range output.tolower {
+ m.data[m.pb+i] = m.data[m.pb+i] - 32
+ }
+
+ output.kind = RFC7643
+
+ case 44:
+
+ if output.rStart {
+ m.err = fmt.Errorf(err8141RComponentStart, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
+ }
+ output.rStart = true
+
+ output.rComponent = string(m.text())
+
+ output.kind = RFC8141
+
+ case 50:
+
+ if output.qStart {
+ m.err = fmt.Errorf(err8141QComponentStart, m.p)
+ (m.p)--
+
+ m.cs = 193
+ goto _again
+
}
+ output.qStart = true
+
+ output.qComponent = string(m.text())
+
+ output.kind = RFC8141
}
}
@@ -1686,3 +5031,16 @@ func (m *machine) Parse(input []byte) (*URN, error) {
return output, nil
}
+
+func (m *machine) WithParsingMode(x ParsingMode) {
+ m.parsingMode = x
+ switch m.parsingMode {
+ case RFC2141Only:
+ m.startParsingAt = enMain
+ case RFC8141Only:
+ m.startParsingAt = enRfc8141Only
+ case RFC7643Only:
+ m.startParsingAt = enScimOnly
+ }
+ m.parsingModeSet = true
+}
diff --git a/vendor/github.com/leodido/go-urn/machine.go.rl b/vendor/github.com/leodido/go-urn/machine.go.rl
index 3bc05a65..0a174219 100644
--- a/vendor/github.com/leodido/go-urn/machine.go.rl
+++ b/vendor/github.com/leodido/go-urn/machine.go.rl
@@ -2,15 +2,28 @@ package urn
import (
"fmt"
+
+ scimschema "github.com/leodido/go-urn/scim/schema"
)
var (
- errPrefix = "expecting the prefix to be the \"urn\" string (whatever case) [col %d]"
- errIdentifier = "expecting the identifier to be string (1..31 alnum chars, also containing dashes but not at its start) [col %d]"
- errSpecificString = "expecting the specific string to be a string containing alnum, hex, or others ([()+,-.:=@;$_!*']) chars [col %d]"
- errNoUrnWithinID = "expecting the identifier to not contain the \"urn\" reserved string [col %d]"
- errHex = "expecting the specific string hex chars to be well-formed (%%alnum{2}) [col %d]"
- errParse = "parsing error [col %d]"
+ errPrefix = "expecting the prefix to be the \"urn\" string (whatever case) [col %d]"
+ errIdentifier = "expecting the identifier to be string (1..31 alnum chars, also containing dashes but not at its beginning) [col %d]"
+ errSpecificString = "expecting the specific string to be a string containing alnum, hex, or others ([()+,-.:=@;$_!*']) chars [col %d]"
+ errNoUrnWithinID = "expecting the identifier to not contain the \"urn\" reserved string [col %d]"
+ errHex = "expecting the percent encoded chars to be well-formed (%%alnum{2}) [col %d]"
+ errSCIMNamespace = "expecing the SCIM namespace identifier (ietf:params:scim) [col %d]"
+ errSCIMType = "expecting a correct SCIM type (schemas, api, param) [col %d]"
+ errSCIMName = "expecting one or more alnum char in the SCIM name part [col %d]"
+ errSCIMOther = "expecting a well-formed other SCIM part [col %d]"
+ errSCIMOtherIncomplete = "expecting a not empty SCIM other part after colon [col %d]"
+ err8141InformalID = "informal URN namespace must be in the form urn-[1-9][0-9] [col %d]"
+ err8141SpecificString = "expecting the specific string to contain alnum, hex, or others ([~&()+,-.:=@;$_!*'] or [/?] not in first position) chars [col %d]"
+ err8141Identifier = "expecting the indentifier to be a string with (length 2 to 32 chars) containing alnum (or dashes) not starting or ending with a dash [col %d]"
+ err8141RComponentStart = "expecting only one r-component (starting with the ?+ sequence) [col %d]"
+ err8141QComponentStart = "expecting only one q-component (starting with the ?= sequence) [col %d]"
+ err8141MalformedRComp = "expecting a non-empty r-component containing alnum, hex, or others ([~&()+,-.:=@;$_!*'] or [/?] but not at its beginning) [col %d]"
+ err8141MalformedQComp = "expecting a non-empty q-component containing alnum, hex, or others ([~&()+,-.:=@;$_!*'] or [/?] but not at its beginning) [col %d]"
)
%%{
@@ -24,25 +37,42 @@ action mark {
}
action tolower {
- m.tolower = append(m.tolower, m.p - m.pb)
+ // List of positions in the buffer to later lowercase
+ output.tolower = append(output.tolower, m.p - m.pb)
}
action set_pre {
output.prefix = string(m.text())
}
+action throw_pre_urn_err {
+ if m.parsingMode != RFC8141Only {
+ // Throw an error when:
+ // - we are entering here matching the the prefix in the namespace identifier part
+ // - looking ahead (3 chars) we find a colon
+ if pos := m.p + 3; pos < m.pe && m.data[pos] == 58 && output.prefix != "" {
+ m.err = fmt.Errorf(errNoUrnWithinID, pos)
+ fhold;
+ fgoto fail;
+ }
+ }
+}
+
action set_nid {
output.ID = string(m.text())
}
action set_nss {
- raw := m.text()
- output.SS = string(raw)
+ output.SS = string(m.text())
// Iterate upper letters lowering them
- for _, i := range m.tolower {
- raw[i] = raw[i] + 32
+ for _, i := range output.tolower {
+ m.data[m.pb+i] = m.data[m.pb+i] + 32
+ }
+ output.norm = string(m.text())
+ // Revert the buffer to the original
+ for _, i := range output.tolower {
+ m.data[m.pb+i] = m.data[m.pb+i] - 32
}
- output.norm = string(raw)
}
action err_pre {
@@ -70,30 +100,200 @@ action err_urn {
}
action err_hex {
- m.err = fmt.Errorf(errHex, m.p)
+ if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only {
+ m.err = fmt.Errorf(errHex, m.p)
+ fhold;
+ fgoto fail;
+ }
+}
+
+action base_type {
+ output.kind = RFC2141;
+}
+
+pre = ([uU] @err(err_pre) [rR] @err(err_pre) [nN] @err(err_pre)) >mark >throw_pre_urn_err %set_pre;
+
+nid = (alnum >mark (alnum | '-'){0,31}) $err(err_nid) %set_nid;
+
+hex = '%' (digit | lower | upper >tolower){2} $err(err_hex);
+
+sss = (alnum | [()+,\-.:=@;$_!*']);
+
+nss = (sss | hex)+ $err(err_nss);
+
+nid_not_urn = (nid - pre %err(err_urn));
+
+urn = pre ':' @err(err_pre) (nid_not_urn ':' nss >mark %set_nss) %eof(base_type);
+
+### SCIM BEG
+
+action err_scim_nid {
+ m.err = fmt.Errorf(errSCIMNamespace, m.p)
fhold;
fgoto fail;
}
-action err_parse {
- m.err = fmt.Errorf(errParse, m.p)
+action err_scim_type {
+ m.err = fmt.Errorf(errSCIMType, m.p)
fhold;
fgoto fail;
}
-pre = ([uU][rR][nN] @err(err_pre)) >mark %set_pre;
+action err_scim_name {
+ m.err = fmt.Errorf(errSCIMName, m.p)
+ fhold;
+ fgoto fail;
+}
-nid = (alnum >mark (alnum | '-'){0,31}) %set_nid;
+action err_scim_other {
+ if m.p == m.pe {
+ m.err = fmt.Errorf(errSCIMOtherIncomplete, m.p-1)
+ } else {
+ m.err = fmt.Errorf(errSCIMOther, m.p)
+ }
+ fhold;
+ fgoto fail;
+}
-hex = '%' (digit | lower | upper >tolower){2} $err(err_hex);
+action scim_type {
+ output.kind = RFC7643;
+}
-sss = (alnum | [()+,\-.:=@;$_!*']);
+action create_scim {
+ output.scim = &SCIM{};
+}
-nss = (sss | hex)+ $err(err_nss);
+action set_scim_type {
+ output.scim.Type = scimschema.TypeFromString(string(m.text()))
+}
+
+action mark_scim_name {
+ output.scim.pos = m.p
+}
+
+action set_scim_name {
+ output.scim.Name = string(m.data[output.scim.pos:m.p])
+}
+
+action mark_scim_other {
+ output.scim.pos = m.p
+}
+
+action set_scim_other {
+ output.scim.Other = string(m.data[output.scim.pos:m.p])
+}
+
+scim_nid = 'ietf:params:scim' >mark %set_nid %create_scim $err(err_scim_nid);
+
+scim_other = ':' (sss | hex)+ >mark_scim_other %set_scim_other $err(err_scim_other);
+
+scim_name = (alnum)+ >mark_scim_name %set_scim_name $err(err_scim_name);
+
+scim_type = ('schemas' | 'api' | 'param') >mark %set_scim_type $err(err_scim_type);
+
+scim_only := pre ':' @err(err_pre) (scim_nid ':' scim_type ':' scim_name scim_other? %set_nss) %eof(scim_type);
+
+### SCIM END
+
+### 8141 BEG
+
+action err_nss_8141 {
+ m.err = fmt.Errorf(err8141SpecificString, m.p)
+ fhold;
+ fgoto fail;
+}
+
+action err_nid_8141 {
+ m.err = fmt.Errorf(err8141Identifier, m.p)
+ fhold;
+ fgoto fail;
+}
+
+action rfc8141_type {
+ output.kind = RFC8141;
+}
+
+action set_r_component {
+ output.rComponent = string(m.text())
+}
+
+action set_q_component {
+ output.qComponent = string(m.text())
+}
+
+action set_f_component {
+ output.fComponent = string(m.text())
+}
+
+action informal_nid_match {
+ fhold;
+ m.err = fmt.Errorf(err8141InformalID, m.p);
+ fgoto fail;
+}
+
+action mark_r_start {
+ if output.rStart {
+ m.err = fmt.Errorf(err8141RComponentStart, m.p)
+ fhold;
+ fgoto fail;
+ }
+ output.rStart = true
+}
+
+action mark_q_start {
+ if output.qStart {
+ m.err = fmt.Errorf(err8141QComponentStart, m.p)
+ fhold;
+ fgoto fail;
+ }
+ output.qStart = true
+}
+
+action err_malformed_r_component {
+ m.err = fmt.Errorf(err8141MalformedRComp, m.p)
+ fhold;
+ fgoto fail;
+}
+
+action err_malformed_q_component {
+ m.err = fmt.Errorf(err8141MalformedQComp, m.p)
+ fhold;
+ fgoto fail;
+}
+
+pchar = (sss | '~' | '&' | hex);
+
+component = pchar (pchar | '/' | '?')*;
+
+r_start = ('?+') %mark_r_start;
+
+r_component = r_start <: (r_start | component)+ $err(err_malformed_r_component) >mark %set_r_component;
+
+q_start = ('?=') %mark_q_start;
+
+q_component = q_start <: (q_start | component)+ $err(err_malformed_q_component) >mark %set_q_component;
+
+rq_components = (r_component :>> q_component? | q_component);
+
+fragment = (pchar | '/' | '?')*;
+
+f_component = '#' fragment >mark %set_f_component;
+
+nss_rfc8141 = (pchar >mark (pchar | '/')*) $err(err_nss_8141) %set_nss;
+
+nid_rfc8141 = (alnum >mark (alnum | '-'){0,30} alnum) $err(err_nid_8141) %set_nid;
+
+informal_id = pre ('-' [a-zA-z0] %to(informal_nid_match));
+
+nid_rfc8141_not_urn = (nid_rfc8141 - informal_id?);
+
+rfc8141_only := pre ':' @err(err_pre) nid_rfc8141_not_urn ':' nss_rfc8141 rq_components? f_component? %eof(rfc8141_type);
+
+### 8141 END
fail := (any - [\n\r])* @err{ fgoto main; };
-main := (pre ':' (nid - pre %err(err_urn)) $err(err_nid) ':' nss >mark %set_nss) $err(err_parse);
+main := urn;
}%%
@@ -103,6 +303,7 @@ main := (pre ':' (nid - pre %err(err_urn)) $err(err_nid) ':' nss >mark %set_nss)
type Machine interface {
Error() error
Parse(input []byte) (*URN, error)
+ WithParsingMode(ParsingMode)
}
type machine struct {
@@ -110,12 +311,24 @@ type machine struct {
cs int
p, pe, eof, pb int
err error
- tolower []int
+ startParsingAt int
+ parsingMode ParsingMode
+ parsingModeSet bool
}
// NewMachine creates a new FSM able to parse RFC 2141 strings.
-func NewMachine() Machine {
- m := &machine{}
+func NewMachine(options ...Option) Machine {
+ m := &machine{
+ parsingModeSet: false,
+ }
+
+ for _, o := range options {
+ o(m)
+ }
+ // Set default parsing mode
+ if !m.parsingModeSet {
+ m.WithParsingMode(DefaultParsingMode)
+ }
%% access m.;
%% variable p m.p;
@@ -137,7 +350,7 @@ func (m *machine) text() []byte {
return m.data[m.pb:m.p]
}
-// Parse parses the input byte array as a RFC 2141 string.
+// Parse parses the input byte array as a RFC 2141 or RFC7643 string.
func (m *machine) Parse(input []byte) (*URN, error) {
m.data = input
m.p = 0
@@ -145,10 +358,11 @@ func (m *machine) Parse(input []byte) (*URN, error) {
m.pe = len(input)
m.eof = len(input)
m.err = nil
- m.tolower = []int{}
- output := &URN{}
+ m.cs = m.startParsingAt
+ output := &URN{
+ tolower: []int{},
+ }
- %% write init;
%% write exec;
if m.cs < first_final || m.cs == en_fail {
@@ -157,3 +371,16 @@ func (m *machine) Parse(input []byte) (*URN, error) {
return output, nil
}
+
+func (m *machine) WithParsingMode(x ParsingMode) {
+ m.parsingMode = x
+ switch m.parsingMode {
+ case RFC2141Only:
+ m.startParsingAt = en_main
+ case RFC8141Only:
+ m.startParsingAt = en_rfc8141_only
+ case RFC7643Only:
+ m.startParsingAt = en_scim_only
+ }
+ m.parsingModeSet = true
+}
\ No newline at end of file
diff --git a/vendor/github.com/leodido/go-urn/makefile b/vendor/github.com/leodido/go-urn/makefile
index df87cdc6..68d5dd0f 100644
--- a/vendor/github.com/leodido/go-urn/makefile
+++ b/vendor/github.com/leodido/go-urn/makefile
@@ -15,18 +15,24 @@ clean:
.PHONY: images
images: docs/urn.png
+.PHONY: snake2camel
+snake2camel:
+ @cd ./tools/snake2camel; go build -o ../../snake2camel .
+
.PHONY: removecomments
removecomments:
@cd ./tools/removecomments; go build -o ../../removecomments .
machine.go: machine.go.rl
+machine.go: snake2camel
+
machine.go: removecomments
machine.go:
- $(RAGEL) -Z -G2 -e -o $@ $<
+ $(RAGEL) -Z -G1 -e -o $@ $<
@./removecomments $@
- $(MAKE) -s file=$@ snake2camel
+ @./snake2camel $@
$(GOFMT) $@
docs/urn.dot: machine.go.rl
@@ -41,13 +47,5 @@ bench: *_test.go machine.go
go test -bench=. -benchmem -benchtime=5s ./...
.PHONY: tests
-tests: *_test.go
+tests: *_test.go
$(GO_TEST) ./...
-
-.PHONY: snake2camel
-snake2camel:
- @awk -i inplace '{ \
- while ( match($$0, /(.*)([a-z]+[0-9]*)_([a-zA-Z0-9])(.*)/, cap) ) \
- $$0 = cap[1] cap[2] toupper(cap[3]) cap[4]; \
- print \
- }' $(file)
diff --git a/vendor/github.com/leodido/go-urn/options.go b/vendor/github.com/leodido/go-urn/options.go
new file mode 100644
index 00000000..c543835a
--- /dev/null
+++ b/vendor/github.com/leodido/go-urn/options.go
@@ -0,0 +1,9 @@
+package urn
+
+type Option func(Machine)
+
+func WithParsingMode(mode ParsingMode) Option {
+ return func(m Machine) {
+ m.WithParsingMode(mode)
+ }
+}
diff --git a/vendor/github.com/leodido/go-urn/parsing_mode.go b/vendor/github.com/leodido/go-urn/parsing_mode.go
new file mode 100644
index 00000000..fce5aadc
--- /dev/null
+++ b/vendor/github.com/leodido/go-urn/parsing_mode.go
@@ -0,0 +1,12 @@
+package urn
+
+type ParsingMode int
+
+const (
+ Default ParsingMode = iota
+ RFC2141Only
+ RFC7643Only
+ RFC8141Only
+)
+
+const DefaultParsingMode = RFC2141Only
diff --git a/vendor/github.com/leodido/go-urn/scim.go b/vendor/github.com/leodido/go-urn/scim.go
new file mode 100644
index 00000000..f6b7aefb
--- /dev/null
+++ b/vendor/github.com/leodido/go-urn/scim.go
@@ -0,0 +1,48 @@
+package urn
+
+import (
+ "encoding/json"
+ "fmt"
+
+ scimschema "github.com/leodido/go-urn/scim/schema"
+)
+
+const errInvalidSCIMURN = "invalid SCIM URN: %s"
+
+type SCIM struct {
+ Type scimschema.Type
+ Name string
+ Other string
+ pos int
+}
+
+func (s SCIM) MarshalJSON() ([]byte, error) {
+ return json.Marshal(s.String())
+}
+
+func (s *SCIM) UnmarshalJSON(bytes []byte) error {
+ var str string
+ if err := json.Unmarshal(bytes, &str); err != nil {
+ return err
+ }
+ // Parse as SCIM
+ value, ok := Parse([]byte(str), WithParsingMode(RFC7643Only))
+ if !ok {
+ return fmt.Errorf(errInvalidSCIMURN, str)
+ }
+ if value.RFC() != RFC7643 {
+ return fmt.Errorf(errInvalidSCIMURN, str)
+ }
+ *s = *value.SCIM()
+
+ return nil
+}
+
+func (s *SCIM) String() string {
+ ret := fmt.Sprintf("urn:ietf:params:scim:%s:%s", s.Type.String(), s.Name)
+ if s.Other != "" {
+ ret += fmt.Sprintf(":%s", s.Other)
+ }
+
+ return ret
+}
diff --git a/vendor/github.com/leodido/go-urn/scim/schema/type.go b/vendor/github.com/leodido/go-urn/scim/schema/type.go
new file mode 100644
index 00000000..13491823
--- /dev/null
+++ b/vendor/github.com/leodido/go-urn/scim/schema/type.go
@@ -0,0 +1,36 @@
+package scimschema
+
+type Type int
+
+const (
+ Unsupported Type = iota
+ Schemas
+ API
+ Param
+)
+
+func (t Type) String() string {
+ switch t {
+ case Schemas:
+ return "schemas"
+ case API:
+ return "api"
+ case Param:
+ return "param"
+ }
+
+ return ""
+}
+
+func TypeFromString(input string) Type {
+ switch input {
+ case "schemas":
+ return Schemas
+ case "api":
+ return API
+ case "param":
+ return Param
+ }
+
+ return Unsupported
+}
diff --git a/vendor/github.com/leodido/go-urn/urn.go b/vendor/github.com/leodido/go-urn/urn.go
index d51a6c91..894d6258 100644
--- a/vendor/github.com/leodido/go-urn/urn.go
+++ b/vendor/github.com/leodido/go-urn/urn.go
@@ -16,10 +16,18 @@ const errInvalidURN = "invalid URN: %s"
//
// Details at https://tools.ietf.org/html/rfc2141.
type URN struct {
- prefix string // Static prefix. Equal to "urn" when empty.
- ID string // Namespace identifier
- SS string // Namespace specific string
- norm string // Normalized namespace specific string
+ prefix string // Static prefix. Equal to "urn" when empty.
+ ID string // Namespace identifier (NID)
+ SS string // Namespace specific string (NSS)
+ norm string // Normalized namespace specific string
+ kind Kind
+ scim *SCIM
+ rComponent string // RFC8141
+ qComponent string // RFC8141
+ fComponent string // RFC8141
+ rStart bool // RFC8141
+ qStart bool // RFC8141
+ tolower []int
}
// Normalize turns the receiving URN into its norm version.
@@ -30,12 +38,21 @@ func (u *URN) Normalize() *URN {
prefix: "urn",
ID: strings.ToLower(u.ID),
SS: u.norm,
+ // rComponent: u.rComponent,
+ // qComponent: u.qComponent,
+ // fComponent: u.fComponent,
}
}
// Equal checks the lexical equivalence of the current URN with another one.
func (u *URN) Equal(x *URN) bool {
- return *u.Normalize() == *x.Normalize()
+ if x == nil {
+ return false
+ }
+ nu := u.Normalize()
+ nx := x.Normalize()
+
+ return nu.prefix == nx.prefix && nu.ID == nx.ID && nu.SS == nx.SS
}
// String reassembles the URN into a valid URN string.
@@ -51,14 +68,23 @@ func (u *URN) String() string {
res += "urn"
}
res += u.prefix + ":" + u.ID + ":" + u.SS
+ if u.rComponent != "" {
+ res += "?+" + u.rComponent
+ }
+ if u.qComponent != "" {
+ res += "?=" + u.qComponent
+ }
+ if u.fComponent != "" {
+ res += "#" + u.fComponent
+ }
}
return res
}
-// Parse is responsible to create an URN instance from a byte array matching the correct URN syntax.
-func Parse(u []byte) (*URN, bool) {
- urn, err := NewMachine().Parse(u)
+// Parse is responsible to create an URN instance from a byte array matching the correct URN syntax (RFC 2141).
+func Parse(u []byte, options ...Option) (*URN, bool) {
+ urn, err := NewMachine(options...).Parse(u)
if err != nil {
return nil, false
}
@@ -71,7 +97,7 @@ func (u URN) MarshalJSON() ([]byte, error) {
return json.Marshal(u.String())
}
-// MarshalJSON unmarshals a URN from JSON string form (e.g. `"urn:oid:1.2.3.4"`).
+// UnmarshalJSON unmarshals a URN from JSON string form (e.g. `"urn:oid:1.2.3.4"`).
func (u *URN) UnmarshalJSON(bytes []byte) error {
var str string
if err := json.Unmarshal(bytes, &str); err != nil {
@@ -82,5 +108,34 @@ func (u *URN) UnmarshalJSON(bytes []byte) error {
} else {
*u = *value
}
+
return nil
-}
\ No newline at end of file
+}
+
+func (u *URN) IsSCIM() bool {
+ return u.kind == RFC7643
+}
+
+func (u *URN) SCIM() *SCIM {
+ if u.kind != RFC7643 {
+ return nil
+ }
+
+ return u.scim
+}
+
+func (u *URN) RFC() Kind {
+ return u.kind
+}
+
+func (u *URN) FComponent() string {
+ return u.fComponent
+}
+
+func (u *URN) QComponent() string {
+ return u.qComponent
+}
+
+func (u *URN) RComponent() string {
+ return u.rComponent
+}
diff --git a/vendor/github.com/leodido/go-urn/urn8141.go b/vendor/github.com/leodido/go-urn/urn8141.go
new file mode 100644
index 00000000..da4dd062
--- /dev/null
+++ b/vendor/github.com/leodido/go-urn/urn8141.go
@@ -0,0 +1,30 @@
+package urn
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+const errInvalidURN8141 = "invalid URN per RFC 8141: %s"
+
+type URN8141 struct {
+ *URN
+}
+
+func (u URN8141) MarshalJSON() ([]byte, error) {
+ return json.Marshal(u.String())
+}
+
+func (u *URN8141) UnmarshalJSON(bytes []byte) error {
+ var str string
+ if err := json.Unmarshal(bytes, &str); err != nil {
+ return err
+ }
+ if value, ok := Parse([]byte(str), WithParsingMode(RFC8141Only)); !ok {
+ return fmt.Errorf(errInvalidURN8141, str)
+ } else {
+ *u = URN8141{value}
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/mattn/go-isatty/isatty_bsd.go b/vendor/github.com/mattn/go-isatty/isatty_bsd.go
index d569c0c9..d0ea68f4 100644
--- a/vendor/github.com/mattn/go-isatty/isatty_bsd.go
+++ b/vendor/github.com/mattn/go-isatty/isatty_bsd.go
@@ -1,6 +1,7 @@
-//go:build (darwin || freebsd || openbsd || netbsd || dragonfly || hurd) && !appengine
+//go:build (darwin || freebsd || openbsd || netbsd || dragonfly || hurd) && !appengine && !tinygo
// +build darwin freebsd openbsd netbsd dragonfly hurd
// +build !appengine
+// +build !tinygo
package isatty
diff --git a/vendor/github.com/mattn/go-isatty/isatty_others.go b/vendor/github.com/mattn/go-isatty/isatty_others.go
index 31503226..7402e061 100644
--- a/vendor/github.com/mattn/go-isatty/isatty_others.go
+++ b/vendor/github.com/mattn/go-isatty/isatty_others.go
@@ -1,5 +1,6 @@
-//go:build appengine || js || nacl || wasm
-// +build appengine js nacl wasm
+//go:build (appengine || js || nacl || tinygo || wasm) && !windows
+// +build appengine js nacl tinygo wasm
+// +build !windows
package isatty
diff --git a/vendor/github.com/mattn/go-isatty/isatty_tcgets.go b/vendor/github.com/mattn/go-isatty/isatty_tcgets.go
index 67787657..0337d8cf 100644
--- a/vendor/github.com/mattn/go-isatty/isatty_tcgets.go
+++ b/vendor/github.com/mattn/go-isatty/isatty_tcgets.go
@@ -1,6 +1,7 @@
-//go:build (linux || aix || zos) && !appengine
+//go:build (linux || aix || zos) && !appengine && !tinygo
// +build linux aix zos
// +build !appengine
+// +build !tinygo
package isatty
diff --git a/vendor/github.com/pelletier/go-toml/v2/.gitignore b/vendor/github.com/pelletier/go-toml/v2/.gitignore
index a69e2b0e..4b7c4eda 100644
--- a/vendor/github.com/pelletier/go-toml/v2/.gitignore
+++ b/vendor/github.com/pelletier/go-toml/v2/.gitignore
@@ -3,4 +3,5 @@ fuzz/
cmd/tomll/tomll
cmd/tomljson/tomljson
cmd/tomltestgen/tomltestgen
-dist
\ No newline at end of file
+dist
+tests/
diff --git a/vendor/github.com/pelletier/go-toml/v2/README.md b/vendor/github.com/pelletier/go-toml/v2/README.md
index 63b92f3b..b10f97f0 100644
--- a/vendor/github.com/pelletier/go-toml/v2/README.md
+++ b/vendor/github.com/pelletier/go-toml/v2/README.md
@@ -179,12 +179,12 @@ Execution time speedup compared to other Go TOML libraries:
- Benchmark go-toml v1 BurntSushi/toml
- Marshal/HugoFrontMatter-2 1.9x 1.9x
- Marshal/ReferenceFile/map-2 1.7x 1.8x
- Marshal/ReferenceFile/struct-2 2.2x 2.5x
- Unmarshal/HugoFrontMatter-2 2.9x 2.9x
- Unmarshal/ReferenceFile/map-2 2.6x 2.9x
+ Unmarshal/ReferenceFile/struct-2 4.4x 5.3x
+ Marshal/HugoFrontMatter-2 1.9x 2.2x
+ Marshal/ReferenceFile/map-2 1.7x 2.1x
+ Marshal/ReferenceFile/struct-2 2.2x 3.0x
+ Unmarshal/HugoFrontMatter-2 2.9x 2.7x
+ Unmarshal/ReferenceFile/map-2 2.6x 2.7x Unmarshal/ReferenceFile/struct-2 4.6x 5.1x See more
@@ -197,17 +197,17 @@ provided for completeness.
This table can be generated with ./ci.sh benchmark -a -html
.