Wed Aug 28 09:36:13 UTC 2024 I: starting to build yaramod/unstable/armhf on jenkins on '2024-08-28 09:36' Wed Aug 28 09:36:13 UTC 2024 I: The jenkins build log is/was available at https://jenkins.debian.net/userContent/reproducible/debian/build_service/armhf_6/9861/console.log Wed Aug 28 09:36:13 UTC 2024 I: Downloading source for unstable/yaramod=3.21.0-1.1 --2024-08-28 09:36:13-- http://deb.debian.org/debian/pool/main/y/yaramod/yaramod_3.21.0-1.1.dsc Connecting to 46.16.76.132:3128... connected. Proxy request sent, awaiting response... 200 OK Length: 2205 (2.2K) [text/prs.lines.tag] Saving to: ‘yaramod_3.21.0-1.1.dsc’ 0K .. 100% 336M=0s 2024-08-28 09:36:13 (336 MB/s) - ‘yaramod_3.21.0-1.1.dsc’ saved [2205/2205] Wed Aug 28 09:36:13 UTC 2024 I: yaramod_3.21.0-1.1.dsc -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Format: 3.0 (quilt) Source: yaramod Binary: libyaramod-dev, libyaramod0, python3-yaramod Architecture: any Version: 3.21.0-1.1 Maintainer: Yangfl Homepage: https://github.com/avast/yaramod Standards-Version: 4.7.0 Vcs-Browser: https://salsa.debian.org/yangfl-guest/yaramod Vcs-Git: https://salsa.debian.org/yangfl-guest/yaramod.git Testsuite: autopkgtest Testsuite-Triggers: @builddeps@ Build-Depends: debhelper-compat (= 13) Build-Depends-Arch: pkg-kde-tools, cmake, pkgconf, libpog-dev, libgtest-dev, dh-sequence-python3, pybind11-dev, python3-dev:native, libpython3-dev, python3-setuptools, nlohmann-json3-dev Package-List: libyaramod-dev deb libdevel optional arch=any libyaramod0 deb libs optional arch=any python3-yaramod deb python optional arch=any Checksums-Sha1: 508763377b8b918e80760797e4a30c28e3f3d47d 965418 yaramod_3.21.0.orig.tar.gz c91be1a5d5678f2e75705110e087f134541d358f 6360 yaramod_3.21.0-1.1.debian.tar.xz Checksums-Sha256: 095aee2946f1636b01653a1b67f84973eeb7ce733b17350dfb911bc74fa4cb9e 965418 yaramod_3.21.0.orig.tar.gz 07f88a705ab951273e865dad08732f09cd589230f56ea414bb63a599986678bc 6360 yaramod_3.21.0-1.1.debian.tar.xz Files: 47828b5fe255c853f83f049b911816f4 965418 yaramod_3.21.0.orig.tar.gz 291dfd1e13753ee9d8e56d12919173f8 6360 yaramod_3.21.0-1.1.debian.tar.xz -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfncpR22H1vEdkazLwpPntGGCWs4FAmaFwdoACgkQwpPntGGC Ws7kSRAAvgqPWtSE9XlusN96P2X3rjZ6KIGakP2ppiBROTnZXWXWPrMYp7tsxPlL nFCtwPX7qkUXrx/1UURzDir0M1vjAMlkMQiVQoiGV1IXVPOAdLUHj14lup6yLoFx JSyAWSRBlLxFHWobtaA/kVWfEybVD1RBikD65GXjrx9/pByndSUStpyykLiD7/Pu YTQHXws6W3Q2Lam1GZF2kgV3D49EHYoEqVoLmNsk5MOWdvm6Tp+FydG2KQdzmDXl lHRMqNNeKTUXPESkhQ878B/nmUn5EwJydCZm05Di4KdMa7WlgLc/9PXtybOIV9Ui 7CSsQAGFpiffK71z6aHNHyhVx3mBKUVLPV9lPVotuCr7SqqOy5H5g8BmVLmdpPVW jnhr+JkxYVYTGNf3IphMYWtPM5Zae16JsebDbw2hMId1GQ1xd/0hgrbStA1Z0fBF avOGHtCmuK5tGz12SgjnoShRe44NTvfVCbMbNp6lS6XDBLK4HBrEWJ4WyAUbI9jk Zf3KP9PxVS2pIRiwj6XGo8QxF1LzDeGYBq+XGpabCYvaCKx9HI7ruxW9letv2xVn i4slyMFRPXvrQ6XVqlI8mq4fahkto77RLskXF1K/vqmCkcmFWzAPiN/S6yIfCYYh 5IQX6SnhecaY7cGdztqZ+acw0NwvJxqVRUHtPEjSnX9Qvb8Rv7g= =SRjq -----END PGP SIGNATURE----- Wed Aug 28 09:36:13 UTC 2024 I: Checking whether the package is not for us Wed Aug 28 09:36:13 UTC 2024 I: Starting 1st build on remote node virt64b-armhf-rb.debian.net. Wed Aug 28 09:36:13 UTC 2024 I: Preparing to do remote build '1' on virt64b-armhf-rb.debian.net. Wed Aug 28 09:52:22 UTC 2024 I: Deleting $TMPDIR on virt64b-armhf-rb.debian.net. I: pbuilder: network access will be disabled during build I: Current time: Tue Aug 27 21:36:21 -12 2024 I: pbuilder-time-stamp: 1724837781 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/unstable-reproducible-base.tgz] I: copying local configuration W: --override-config is not set; not updating apt.conf Read the manpage for details. I: mounting /proc filesystem I: mounting /sys filesystem I: creating /{dev,run}/shm I: mounting /dev/pts filesystem I: redirecting /dev/ptmx to /dev/pts/ptmx I: policy-rc.d already exists I: Copying source file I: copying [yaramod_3.21.0-1.1.dsc] I: copying [./yaramod_3.21.0.orig.tar.gz] I: copying [./yaramod_3.21.0-1.1.debian.tar.xz] I: Extracting source gpgv: Signature made Wed Jul 3 21:25:46 2024 gpgv: using RSA key 7E7729476D87D6F11D91ACCBC293E7B461825ACE gpgv: Can't check signature: No public key dpkg-source: warning: cannot verify inline signature for ./yaramod_3.21.0-1.1.dsc: no acceptable signature found dpkg-source: info: extracting yaramod in yaramod-3.21.0 dpkg-source: info: unpacking yaramod_3.21.0.orig.tar.gz dpkg-source: info: unpacking yaramod_3.21.0-1.1.debian.tar.xz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying 0001-Build-Python-module-together.patch dpkg-source: info: applying 0002-Build-shared-library.patch dpkg-source: info: applying 0003-Use-system-packages.patch I: Not using root during the build. I: Installing the build-deps I: user script /srv/workspace/pbuilder/4857/tmp/hooks/D02_print_environment starting I: set BUILDDIR='/build/reproducible-path' BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' BUILDUSERNAME='pbuilder1' BUILD_ARCH='armhf' DEBIAN_FRONTEND='noninteractive' DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=3 ' DISTRIBUTION='unstable' HOME='/root' HOST_ARCH='armhf' IFS=' ' INVOCATION_ID='81d27e0338c64beb9f4c8d3329dd3f7e' LANG='C' LANGUAGE='en_US:en' LC_ALL='C' MAIL='/var/mail/root' OPTIND='1' PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' PBCURRENTCOMMANDLINEOPERATION='build' PBUILDER_OPERATION='build' PBUILDER_PKGDATADIR='/usr/share/pbuilder' PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' PBUILDER_SYSCONFDIR='/etc' PPID='4857' PS1='# ' PS2='> ' PS4='+ ' PWD='/' SHELL='/bin/bash' SHLVL='2' SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.iKJtymfj/pbuilderrc_qMDy --distribution unstable --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.iKJtymfj/b1 --logfile b1/build.log yaramod_3.21.0-1.1.dsc' SUDO_GID='113' SUDO_UID='107' SUDO_USER='jenkins' TERM='unknown' TZ='/usr/share/zoneinfo/Etc/GMT+12' USER='root' _='/usr/bin/systemd-run' http_proxy='http://10.0.0.15:3142/' I: uname -a Linux virt64b 6.1.0-23-arm64 #1 SMP Debian 6.1.99-1 (2024-07-15) aarch64 GNU/Linux I: ls -l /bin lrwxrwxrwx 1 root root 7 Aug 4 21:30 /bin -> usr/bin I: user script /srv/workspace/pbuilder/4857/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy Version: 0.invalid.0 Architecture: armhf Maintainer: Debian Pbuilder Team Description: Dummy package to satisfy dependencies with aptitude - created by pbuilder This package was created automatically by pbuilder to satisfy the build-dependencies of the package being currently built. Depends: debhelper-compat (= 13), pkg-kde-tools, cmake, pkgconf, libpog-dev, libgtest-dev, dh-sequence-python3, pybind11-dev, python3-dev:native, libpython3-dev, python3-setuptools, nlohmann-json3-dev dpkg-deb: building package 'pbuilder-satisfydepends-dummy' in '/tmp/satisfydepends-aptitude/pbuilder-satisfydepends-dummy.deb'. Selecting previously unselected package pbuilder-satisfydepends-dummy. (Reading database ... 19491 files and directories currently installed.) Preparing to unpack .../pbuilder-satisfydepends-dummy.deb ... Unpacking pbuilder-satisfydepends-dummy (0.invalid.0) ... dpkg: pbuilder-satisfydepends-dummy: dependency problems, but configuring anyway as you requested: pbuilder-satisfydepends-dummy depends on debhelper-compat (= 13); however: Package debhelper-compat is not installed. pbuilder-satisfydepends-dummy depends on pkg-kde-tools; however: Package pkg-kde-tools is not installed. pbuilder-satisfydepends-dummy depends on cmake; however: Package cmake is not installed. pbuilder-satisfydepends-dummy depends on pkgconf; however: Package pkgconf is not installed. pbuilder-satisfydepends-dummy depends on libpog-dev; however: Package libpog-dev is not installed. pbuilder-satisfydepends-dummy depends on libgtest-dev; however: Package libgtest-dev is not installed. pbuilder-satisfydepends-dummy depends on dh-sequence-python3; however: Package dh-sequence-python3 is not installed. pbuilder-satisfydepends-dummy depends on pybind11-dev; however: Package pybind11-dev is not installed. pbuilder-satisfydepends-dummy depends on python3-dev:native. pbuilder-satisfydepends-dummy depends on libpython3-dev; however: Package libpython3-dev is not installed. pbuilder-satisfydepends-dummy depends on python3-setuptools; however: Package python3-setuptools is not installed. pbuilder-satisfydepends-dummy depends on nlohmann-json3-dev; however: Package nlohmann-json3-dev is not installed. Setting up pbuilder-satisfydepends-dummy (0.invalid.0) ... Reading package lists... Building dependency tree... Reading state information... Initializing package states... Writing extended state information... Building tag database... pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0) pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0) The following NEW packages will be installed: autoconf{a} automake{a} autopoint{a} autotools-dev{a} bsdextrautils{a} cmake{a} cmake-data{a} debhelper{a} dh-autoreconf{a} dh-python{a} dh-strip-nondeterminism{a} dwz{a} file{a} gettext{a} gettext-base{a} googletest{a} groff-base{a} intltool-debian{a} libabsl-dev{a} libabsl20230802{a} libarchive-zip-perl{a} libarchive13t64{a} libbrotli1{a} libcom-err2{a} libcurl4t64{a} libdebhelper-perl{a} libelf1t64{a} libexpat1{a} libexpat1-dev{a} libfile-stripnondeterminism-perl{a} libfmt-dev{a} libfmt9{a} libgssapi-krb5-2{a} libgtest-dev{a} libicu72{a} libjs-jquery{a} libjs-sphinxdoc{a} libjs-underscore{a} libjsoncpp25{a} libk5crypto3{a} libkeyutils1{a} libkrb5-3{a} libkrb5support0{a} libldap-2.5-0{a} libmagic-mgc{a} libmagic1t64{a} libnghttp2-14{a} libnsl2{a} libpipeline1{a} libpkgconf3{a} libpog-dev{a} libproc2-0{a} libpsl5t64{a} libpython3-dev{a} libpython3-stdlib{a} libpython3.12-dev{a} libpython3.12-minimal{a} libpython3.12-stdlib{a} libpython3.12t64{a} libre2-11{a} libre2-dev{a} libreadline8t64{a} librhash0{a} librtmp1{a} libsasl2-2{a} libsasl2-modules-db{a} libssh2-1t64{a} libtirpc-common{a} libtirpc3t64{a} libtool{a} libuchardet0{a} libuv1t64{a} libxml2{a} libyaml-0-2{a} m4{a} man-db{a} media-types{a} netbase{a} nlohmann-json3-dev{a} pkg-kde-tools{a} pkgconf{a} pkgconf-bin{a} po-debconf{a} procps{a} pybind11-dev{a} python3{a} python3-autocommand{a} python3-chardet{a} python3-debian{a} python3-dev{a} python3-inflect{a} python3-jaraco.context{a} python3-jaraco.functools{a} python3-minimal{a} python3-more-itertools{a} python3-pkg-resources{a} python3-setuptools{a} python3-typeguard{a} python3-typing-extensions{a} python3-yaml{a} python3-zipp{a} python3.12{a} python3.12-dev{a} python3.12-minimal{a} readline-common{a} sensible-utils{a} tzdata{a} zlib1g-dev{a} The following packages are RECOMMENDED but will NOT be installed: ca-certificates curl javascript-common krb5-locales libarchive-cpio-perl libeigen3-dev libgmock-dev libldap-common libltdl-dev libmail-sendmail-perl libsasl2-modules libssl3 libwww-perl linux-sysctl-defaults lynx psmisc publicsuffix python3-apt wget zstd 0 packages upgraded, 108 newly installed, 0 to remove and 0 not upgraded. Need to get 49.2 MB of archives. After unpacking 191 MB will be used. Writing extended state information... Get: 1 http://deb.debian.org/debian unstable/main armhf libpython3.12-minimal armhf 3.12.5-4 [798 kB] Get: 2 http://deb.debian.org/debian unstable/main armhf libexpat1 armhf 2.6.2-1 [83.5 kB] Get: 3 http://deb.debian.org/debian unstable/main armhf python3.12-minimal armhf 3.12.5-4 [1812 kB] Get: 4 http://deb.debian.org/debian unstable/main armhf python3-minimal armhf 3.12.5-1 [26.7 kB] Get: 5 http://deb.debian.org/debian unstable/main armhf media-types all 10.1.0 [26.9 kB] Get: 6 http://deb.debian.org/debian unstable/main armhf netbase all 6.4 [12.8 kB] Get: 7 http://deb.debian.org/debian unstable/main armhf tzdata all 2024a-4 [255 kB] Get: 8 http://deb.debian.org/debian unstable/main armhf libkrb5support0 armhf 1.21.3-3 [30.0 kB] Get: 9 http://deb.debian.org/debian unstable/main armhf libcom-err2 armhf 1.47.1-1 [22.1 kB] Get: 10 http://deb.debian.org/debian unstable/main armhf libk5crypto3 armhf 1.21.3-3 [75.8 kB] Get: 11 http://deb.debian.org/debian unstable/main armhf libkeyutils1 armhf 1.6.3-3 [7908 B] Get: 12 http://deb.debian.org/debian unstable/main armhf libkrb5-3 armhf 1.21.3-3 [283 kB] Get: 13 http://deb.debian.org/debian unstable/main armhf libgssapi-krb5-2 armhf 1.21.3-3 [114 kB] Get: 14 http://deb.debian.org/debian unstable/main armhf libtirpc-common all 1.3.4+ds-1.3 [10.9 kB] Get: 15 http://deb.debian.org/debian unstable/main armhf libtirpc3t64 armhf 1.3.4+ds-1.3 [71.1 kB] Get: 16 http://deb.debian.org/debian unstable/main armhf libnsl2 armhf 1.3.0-3+b2 [34.9 kB] Get: 17 http://deb.debian.org/debian unstable/main armhf readline-common all 8.2-5 [69.3 kB] Get: 18 http://deb.debian.org/debian unstable/main armhf libreadline8t64 armhf 8.2-5 [146 kB] Get: 19 http://deb.debian.org/debian unstable/main armhf libpython3.12-stdlib armhf 3.12.5-4 [1814 kB] Get: 20 http://deb.debian.org/debian unstable/main armhf python3.12 armhf 3.12.5-4 [667 kB] Get: 21 http://deb.debian.org/debian unstable/main armhf libpython3-stdlib armhf 3.12.5-1 [9584 B] Get: 22 http://deb.debian.org/debian unstable/main armhf python3 armhf 3.12.5-1 [27.6 kB] Get: 23 http://deb.debian.org/debian unstable/main armhf libproc2-0 armhf 2:4.0.4-5 [55.8 kB] Get: 24 http://deb.debian.org/debian unstable/main armhf procps armhf 2:4.0.4-5 [863 kB] Get: 25 http://deb.debian.org/debian unstable/main armhf sensible-utils all 0.0.24 [24.8 kB] Get: 26 http://deb.debian.org/debian unstable/main armhf libmagic-mgc armhf 1:5.45-3 [314 kB] Get: 27 http://deb.debian.org/debian unstable/main armhf libmagic1t64 armhf 1:5.45-3 [98.1 kB] Get: 28 http://deb.debian.org/debian unstable/main armhf file armhf 1:5.45-3 [42.0 kB] Get: 29 http://deb.debian.org/debian unstable/main armhf gettext-base armhf 0.22.5-2 [195 kB] Get: 30 http://deb.debian.org/debian unstable/main armhf libuchardet0 armhf 0.0.8-1+b1 [65.7 kB] Get: 31 http://deb.debian.org/debian unstable/main armhf groff-base armhf 1.23.0-5 [1091 kB] Get: 32 http://deb.debian.org/debian unstable/main armhf bsdextrautils armhf 2.40.2-7 [88.6 kB] Get: 33 http://deb.debian.org/debian unstable/main armhf libpipeline1 armhf 1.5.8-1 [35.0 kB] Get: 34 http://deb.debian.org/debian unstable/main armhf man-db armhf 2.12.1-3 [1376 kB] Get: 35 http://deb.debian.org/debian unstable/main armhf m4 armhf 1.4.19-4 [264 kB] Get: 36 http://deb.debian.org/debian unstable/main armhf autoconf all 2.72-3 [493 kB] Get: 37 http://deb.debian.org/debian unstable/main armhf autotools-dev all 20220109.1 [51.6 kB] Get: 38 http://deb.debian.org/debian unstable/main armhf automake all 1:1.16.5-1.3 [823 kB] Get: 39 http://deb.debian.org/debian unstable/main armhf autopoint all 0.22.5-2 [723 kB] Get: 40 http://deb.debian.org/debian unstable/main armhf libicu72 armhf 72.1-5 [9075 kB] Get: 41 http://deb.debian.org/debian unstable/main armhf libxml2 armhf 2.12.7+dfsg-3+b1 [583 kB] Get: 42 http://deb.debian.org/debian unstable/main armhf libarchive13t64 armhf 3.7.4-1 [305 kB] Get: 43 http://deb.debian.org/debian unstable/main armhf libbrotli1 armhf 1.1.0-2+b4 [293 kB] Get: 44 http://deb.debian.org/debian unstable/main armhf libsasl2-modules-db armhf 2.1.28+dfsg1-7 [18.1 kB] Get: 45 http://deb.debian.org/debian unstable/main armhf libsasl2-2 armhf 2.1.28+dfsg1-7 [50.2 kB] Get: 46 http://deb.debian.org/debian unstable/main armhf libldap-2.5-0 armhf 2.5.18+dfsg-3 [163 kB] Get: 47 http://deb.debian.org/debian unstable/main armhf libnghttp2-14 armhf 1.62.1-2 [63.7 kB] Get: 48 http://deb.debian.org/debian unstable/main armhf libpsl5t64 armhf 0.21.2-1.1 [55.6 kB] Get: 49 http://deb.debian.org/debian unstable/main armhf librtmp1 armhf 2.4+20151223.gitfa8646d.1-2+b4 [53.2 kB] Get: 50 http://deb.debian.org/debian unstable/main armhf libssh2-1t64 armhf 1.11.0-7 [199 kB] Get: 51 http://deb.debian.org/debian unstable/main armhf libcurl4t64 armhf 8.9.1-2 [416 kB] Get: 52 http://deb.debian.org/debian unstable/main armhf libjsoncpp25 armhf 1.9.5-6+b2 [69.9 kB] Get: 53 http://deb.debian.org/debian unstable/main armhf librhash0 armhf 1.4.3-3+b1 [143 kB] Get: 54 http://deb.debian.org/debian unstable/main armhf libuv1t64 armhf 1.48.0-5 [134 kB] Get: 55 http://deb.debian.org/debian unstable/main armhf cmake-data all 3.30.2-2 [2221 kB] Get: 56 http://deb.debian.org/debian unstable/main armhf cmake armhf 3.30.2-2 [5349 kB] Get: 57 http://deb.debian.org/debian unstable/main armhf libdebhelper-perl all 13.20 [89.7 kB] Get: 58 http://deb.debian.org/debian unstable/main armhf libtool all 2.4.7-7 [517 kB] Get: 59 http://deb.debian.org/debian unstable/main armhf dh-autoreconf all 20 [17.1 kB] Get: 60 http://deb.debian.org/debian unstable/main armhf libarchive-zip-perl all 1.68-1 [104 kB] Get: 61 http://deb.debian.org/debian unstable/main armhf libfile-stripnondeterminism-perl all 1.14.0-1 [19.5 kB] Get: 62 http://deb.debian.org/debian unstable/main armhf dh-strip-nondeterminism all 1.14.0-1 [8448 B] Get: 63 http://deb.debian.org/debian unstable/main armhf libelf1t64 armhf 0.191-2 [183 kB] Get: 64 http://deb.debian.org/debian unstable/main armhf dwz armhf 0.15-1+b2 [106 kB] Get: 65 http://deb.debian.org/debian unstable/main armhf gettext armhf 0.22.5-2 [1485 kB] Get: 66 http://deb.debian.org/debian unstable/main armhf intltool-debian all 0.35.0+20060710.6 [22.9 kB] Get: 67 http://deb.debian.org/debian unstable/main armhf po-debconf all 1.0.21+nmu1 [248 kB] Get: 68 http://deb.debian.org/debian unstable/main armhf debhelper all 13.20 [915 kB] Get: 69 http://deb.debian.org/debian unstable/main armhf python3-autocommand all 2.2.2-3 [13.6 kB] Get: 70 http://deb.debian.org/debian unstable/main armhf python3-more-itertools all 10.3.0-1 [62.0 kB] Get: 71 http://deb.debian.org/debian unstable/main armhf python3-typing-extensions all 4.12.2-2 [73.0 kB] Get: 72 http://deb.debian.org/debian unstable/main armhf python3-typeguard all 4.3.0-1 [36.5 kB] Get: 73 http://deb.debian.org/debian unstable/main armhf python3-inflect all 7.3.1-1 [42.2 kB] Get: 74 http://deb.debian.org/debian unstable/main armhf python3-jaraco.context all 6.0.0-1 [7984 B] Get: 75 http://deb.debian.org/debian unstable/main armhf python3-jaraco.functools all 4.0.2-1 [11.7 kB] Get: 76 http://deb.debian.org/debian unstable/main armhf python3-pkg-resources all 73.0.1-1 [212 kB] Get: 77 http://deb.debian.org/debian unstable/main armhf python3-zipp all 3.20.0-1 [10.5 kB] Get: 78 http://deb.debian.org/debian unstable/main armhf python3-setuptools all 73.0.1-1 [748 kB] Get: 79 http://deb.debian.org/debian unstable/main armhf dh-python all 6.20240824 [109 kB] Get: 80 http://deb.debian.org/debian unstable/main armhf googletest all 1.15.2-1 [514 kB] Get: 81 http://deb.debian.org/debian unstable/main armhf libabsl20230802 armhf 20230802.1-4 [432 kB] Get: 82 http://deb.debian.org/debian unstable/main armhf libabsl-dev armhf 20230802.1-4 [1210 kB] Get: 83 http://deb.debian.org/debian unstable/main armhf libexpat1-dev armhf 2.6.2-1 [140 kB] Get: 84 http://deb.debian.org/debian unstable/main armhf libfmt9 armhf 9.1.0+ds1-2 [105 kB] Get: 85 http://deb.debian.org/debian unstable/main armhf libfmt-dev armhf 9.1.0+ds1-2 [171 kB] Get: 86 http://deb.debian.org/debian unstable/main armhf libgtest-dev armhf 1.15.2-1 [246 kB] Get: 87 http://deb.debian.org/debian unstable/main armhf libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [326 kB] Get: 88 http://deb.debian.org/debian unstable/main armhf libjs-underscore all 1.13.4~dfsg+~1.11.4-3 [116 kB] Get: 89 http://deb.debian.org/debian unstable/main armhf libjs-sphinxdoc all 7.4.7-3 [158 kB] Get: 90 http://deb.debian.org/debian unstable/main armhf libpkgconf3 armhf 1.8.1-3 [31.7 kB] Get: 91 http://deb.debian.org/debian unstable/main armhf libre2-11 armhf 20240501-3 [163 kB] Get: 92 http://deb.debian.org/debian unstable/main armhf libre2-dev armhf 20240501-3 [228 kB] Get: 93 http://deb.debian.org/debian unstable/main armhf libpog-dev all 0.5.3-3 [29.7 kB] Get: 94 http://deb.debian.org/debian unstable/main armhf libpython3.12t64 armhf 3.12.5-4 [1847 kB] Get: 95 http://deb.debian.org/debian unstable/main armhf zlib1g-dev armhf 1:1.3.dfsg+really1.3.1-1 [904 kB] Get: 96 http://deb.debian.org/debian unstable/main armhf libpython3.12-dev armhf 3.12.5-4 [3807 kB] Get: 97 http://deb.debian.org/debian unstable/main armhf libpython3-dev armhf 3.12.5-1 [9824 B] Get: 98 http://deb.debian.org/debian unstable/main armhf libyaml-0-2 armhf 0.2.5-1+b1 [45.5 kB] Get: 99 http://deb.debian.org/debian unstable/main armhf nlohmann-json3-dev all 3.11.3-1 [261 kB] Get: 100 http://deb.debian.org/debian unstable/main armhf python3-chardet all 5.2.0+dfsg-1 [107 kB] Get: 101 http://deb.debian.org/debian unstable/main armhf python3-debian all 0.1.49 [115 kB] Get: 102 http://deb.debian.org/debian unstable/main armhf python3-yaml armhf 6.0.2-1 [123 kB] Get: 103 http://deb.debian.org/debian unstable/main armhf pkg-kde-tools all 0.17.4 [84.8 kB] Get: 104 http://deb.debian.org/debian unstable/main armhf pkgconf-bin armhf 1.8.1-3 [29.1 kB] Get: 105 http://deb.debian.org/debian unstable/main armhf pkgconf armhf 1.8.1-3 [26.1 kB] Get: 106 http://deb.debian.org/debian unstable/main armhf pybind11-dev all 2.12.0-1 [198 kB] Get: 107 http://deb.debian.org/debian unstable/main armhf python3.12-dev armhf 3.12.5-4 [499 kB] Get: 108 http://deb.debian.org/debian unstable/main armhf python3-dev armhf 3.12.5-1 [26.2 kB] Fetched 49.2 MB in 1s (44.2 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libpython3.12-minimal:armhf. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19491 files and directories currently installed.) Preparing to unpack .../libpython3.12-minimal_3.12.5-4_armhf.deb ... Unpacking libpython3.12-minimal:armhf (3.12.5-4) ... Selecting previously unselected package libexpat1:armhf. Preparing to unpack .../libexpat1_2.6.2-1_armhf.deb ... Unpacking libexpat1:armhf (2.6.2-1) ... Selecting previously unselected package python3.12-minimal. Preparing to unpack .../python3.12-minimal_3.12.5-4_armhf.deb ... Unpacking python3.12-minimal (3.12.5-4) ... Setting up libpython3.12-minimal:armhf (3.12.5-4) ... Setting up libexpat1:armhf (2.6.2-1) ... Setting up python3.12-minimal (3.12.5-4) ... Selecting previously unselected package python3-minimal. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19811 files and directories currently installed.) Preparing to unpack .../00-python3-minimal_3.12.5-1_armhf.deb ... Unpacking python3-minimal (3.12.5-1) ... Selecting previously unselected package media-types. Preparing to unpack .../01-media-types_10.1.0_all.deb ... Unpacking media-types (10.1.0) ... Selecting previously unselected package netbase. Preparing to unpack .../02-netbase_6.4_all.deb ... Unpacking netbase (6.4) ... Selecting previously unselected package tzdata. Preparing to unpack .../03-tzdata_2024a-4_all.deb ... Unpacking tzdata (2024a-4) ... Selecting previously unselected package libkrb5support0:armhf. Preparing to unpack .../04-libkrb5support0_1.21.3-3_armhf.deb ... Unpacking libkrb5support0:armhf (1.21.3-3) ... Selecting previously unselected package libcom-err2:armhf. Preparing to unpack .../05-libcom-err2_1.47.1-1_armhf.deb ... Unpacking libcom-err2:armhf (1.47.1-1) ... Selecting previously unselected package libk5crypto3:armhf. Preparing to unpack .../06-libk5crypto3_1.21.3-3_armhf.deb ... Unpacking libk5crypto3:armhf (1.21.3-3) ... Selecting previously unselected package libkeyutils1:armhf. Preparing to unpack .../07-libkeyutils1_1.6.3-3_armhf.deb ... Unpacking libkeyutils1:armhf (1.6.3-3) ... Selecting previously unselected package libkrb5-3:armhf. Preparing to unpack .../08-libkrb5-3_1.21.3-3_armhf.deb ... Unpacking libkrb5-3:armhf (1.21.3-3) ... Selecting previously unselected package libgssapi-krb5-2:armhf. Preparing to unpack .../09-libgssapi-krb5-2_1.21.3-3_armhf.deb ... Unpacking libgssapi-krb5-2:armhf (1.21.3-3) ... Selecting previously unselected package libtirpc-common. Preparing to unpack .../10-libtirpc-common_1.3.4+ds-1.3_all.deb ... Unpacking libtirpc-common (1.3.4+ds-1.3) ... Selecting previously unselected package libtirpc3t64:armhf. Preparing to unpack .../11-libtirpc3t64_1.3.4+ds-1.3_armhf.deb ... Adding 'diversion of /lib/arm-linux-gnueabihf/libtirpc.so.3 to /lib/arm-linux-gnueabihf/libtirpc.so.3.usr-is-merged by libtirpc3t64' Adding 'diversion of /lib/arm-linux-gnueabihf/libtirpc.so.3.0.0 to /lib/arm-linux-gnueabihf/libtirpc.so.3.0.0.usr-is-merged by libtirpc3t64' Unpacking libtirpc3t64:armhf (1.3.4+ds-1.3) ... Selecting previously unselected package libnsl2:armhf. Preparing to unpack .../12-libnsl2_1.3.0-3+b2_armhf.deb ... Unpacking libnsl2:armhf (1.3.0-3+b2) ... Selecting previously unselected package readline-common. Preparing to unpack .../13-readline-common_8.2-5_all.deb ... Unpacking readline-common (8.2-5) ... Selecting previously unselected package libreadline8t64:armhf. Preparing to unpack .../14-libreadline8t64_8.2-5_armhf.deb ... Adding 'diversion of /lib/arm-linux-gnueabihf/libhistory.so.8 to /lib/arm-linux-gnueabihf/libhistory.so.8.usr-is-merged by libreadline8t64' Adding 'diversion of /lib/arm-linux-gnueabihf/libhistory.so.8.2 to /lib/arm-linux-gnueabihf/libhistory.so.8.2.usr-is-merged by libreadline8t64' Adding 'diversion of /lib/arm-linux-gnueabihf/libreadline.so.8 to /lib/arm-linux-gnueabihf/libreadline.so.8.usr-is-merged by libreadline8t64' Adding 'diversion of /lib/arm-linux-gnueabihf/libreadline.so.8.2 to /lib/arm-linux-gnueabihf/libreadline.so.8.2.usr-is-merged by libreadline8t64' Unpacking libreadline8t64:armhf (8.2-5) ... Selecting previously unselected package libpython3.12-stdlib:armhf. Preparing to unpack .../15-libpython3.12-stdlib_3.12.5-4_armhf.deb ... Unpacking libpython3.12-stdlib:armhf (3.12.5-4) ... Selecting previously unselected package python3.12. Preparing to unpack .../16-python3.12_3.12.5-4_armhf.deb ... Unpacking python3.12 (3.12.5-4) ... Selecting previously unselected package libpython3-stdlib:armhf. Preparing to unpack .../17-libpython3-stdlib_3.12.5-1_armhf.deb ... Unpacking libpython3-stdlib:armhf (3.12.5-1) ... Setting up python3-minimal (3.12.5-1) ... Selecting previously unselected package python3. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 20883 files and directories currently installed.) Preparing to unpack .../00-python3_3.12.5-1_armhf.deb ... Unpacking python3 (3.12.5-1) ... Selecting previously unselected package libproc2-0:armhf. Preparing to unpack .../01-libproc2-0_2%3a4.0.4-5_armhf.deb ... Unpacking libproc2-0:armhf (2:4.0.4-5) ... Selecting previously unselected package procps. Preparing to unpack .../02-procps_2%3a4.0.4-5_armhf.deb ... Unpacking procps (2:4.0.4-5) ... Selecting previously unselected package sensible-utils. Preparing to unpack .../03-sensible-utils_0.0.24_all.deb ... Unpacking sensible-utils (0.0.24) ... Selecting previously unselected package libmagic-mgc. Preparing to unpack .../04-libmagic-mgc_1%3a5.45-3_armhf.deb ... Unpacking libmagic-mgc (1:5.45-3) ... Selecting previously unselected package libmagic1t64:armhf. Preparing to unpack .../05-libmagic1t64_1%3a5.45-3_armhf.deb ... Unpacking libmagic1t64:armhf (1:5.45-3) ... Selecting previously unselected package file. Preparing to unpack .../06-file_1%3a5.45-3_armhf.deb ... Unpacking file (1:5.45-3) ... Selecting previously unselected package gettext-base. Preparing to unpack .../07-gettext-base_0.22.5-2_armhf.deb ... Unpacking gettext-base (0.22.5-2) ... Selecting previously unselected package libuchardet0:armhf. Preparing to unpack .../08-libuchardet0_0.0.8-1+b1_armhf.deb ... Unpacking libuchardet0:armhf (0.0.8-1+b1) ... Selecting previously unselected package groff-base. Preparing to unpack .../09-groff-base_1.23.0-5_armhf.deb ... Unpacking groff-base (1.23.0-5) ... Selecting previously unselected package bsdextrautils. Preparing to unpack .../10-bsdextrautils_2.40.2-7_armhf.deb ... Unpacking bsdextrautils (2.40.2-7) ... Selecting previously unselected package libpipeline1:armhf. Preparing to unpack .../11-libpipeline1_1.5.8-1_armhf.deb ... Unpacking libpipeline1:armhf (1.5.8-1) ... Selecting previously unselected package man-db. Preparing to unpack .../12-man-db_2.12.1-3_armhf.deb ... Unpacking man-db (2.12.1-3) ... Selecting previously unselected package m4. Preparing to unpack .../13-m4_1.4.19-4_armhf.deb ... Unpacking m4 (1.4.19-4) ... Selecting previously unselected package autoconf. Preparing to unpack .../14-autoconf_2.72-3_all.deb ... Unpacking autoconf (2.72-3) ... Selecting previously unselected package autotools-dev. Preparing to unpack .../15-autotools-dev_20220109.1_all.deb ... Unpacking autotools-dev (20220109.1) ... Selecting previously unselected package automake. Preparing to unpack .../16-automake_1%3a1.16.5-1.3_all.deb ... Unpacking automake (1:1.16.5-1.3) ... Selecting previously unselected package autopoint. Preparing to unpack .../17-autopoint_0.22.5-2_all.deb ... Unpacking autopoint (0.22.5-2) ... Selecting previously unselected package libicu72:armhf. Preparing to unpack .../18-libicu72_72.1-5_armhf.deb ... Unpacking libicu72:armhf (72.1-5) ... Selecting previously unselected package libxml2:armhf. Preparing to unpack .../19-libxml2_2.12.7+dfsg-3+b1_armhf.deb ... Unpacking libxml2:armhf (2.12.7+dfsg-3+b1) ... Selecting previously unselected package libarchive13t64:armhf. Preparing to unpack .../20-libarchive13t64_3.7.4-1_armhf.deb ... Unpacking libarchive13t64:armhf (3.7.4-1) ... Selecting previously unselected package libbrotli1:armhf. Preparing to unpack .../21-libbrotli1_1.1.0-2+b4_armhf.deb ... Unpacking libbrotli1:armhf (1.1.0-2+b4) ... Selecting previously unselected package libsasl2-modules-db:armhf. Preparing to unpack .../22-libsasl2-modules-db_2.1.28+dfsg1-7_armhf.deb ... Unpacking libsasl2-modules-db:armhf (2.1.28+dfsg1-7) ... Selecting previously unselected package libsasl2-2:armhf. Preparing to unpack .../23-libsasl2-2_2.1.28+dfsg1-7_armhf.deb ... Unpacking libsasl2-2:armhf (2.1.28+dfsg1-7) ... Selecting previously unselected package libldap-2.5-0:armhf. Preparing to unpack .../24-libldap-2.5-0_2.5.18+dfsg-3_armhf.deb ... Unpacking libldap-2.5-0:armhf (2.5.18+dfsg-3) ... Selecting previously unselected package libnghttp2-14:armhf. Preparing to unpack .../25-libnghttp2-14_1.62.1-2_armhf.deb ... Unpacking libnghttp2-14:armhf (1.62.1-2) ... Selecting previously unselected package libpsl5t64:armhf. Preparing to unpack .../26-libpsl5t64_0.21.2-1.1_armhf.deb ... Unpacking libpsl5t64:armhf (0.21.2-1.1) ... Selecting previously unselected package librtmp1:armhf. Preparing to unpack .../27-librtmp1_2.4+20151223.gitfa8646d.1-2+b4_armhf.deb ... Unpacking librtmp1:armhf (2.4+20151223.gitfa8646d.1-2+b4) ... Selecting previously unselected package libssh2-1t64:armhf. Preparing to unpack .../28-libssh2-1t64_1.11.0-7_armhf.deb ... Unpacking libssh2-1t64:armhf (1.11.0-7) ... Selecting previously unselected package libcurl4t64:armhf. Preparing to unpack .../29-libcurl4t64_8.9.1-2_armhf.deb ... Unpacking libcurl4t64:armhf (8.9.1-2) ... Selecting previously unselected package libjsoncpp25:armhf. Preparing to unpack .../30-libjsoncpp25_1.9.5-6+b2_armhf.deb ... Unpacking libjsoncpp25:armhf (1.9.5-6+b2) ... Selecting previously unselected package librhash0:armhf. Preparing to unpack .../31-librhash0_1.4.3-3+b1_armhf.deb ... Unpacking librhash0:armhf (1.4.3-3+b1) ... Selecting previously unselected package libuv1t64:armhf. Preparing to unpack .../32-libuv1t64_1.48.0-5_armhf.deb ... Unpacking libuv1t64:armhf (1.48.0-5) ... Selecting previously unselected package cmake-data. Preparing to unpack .../33-cmake-data_3.30.2-2_all.deb ... Unpacking cmake-data (3.30.2-2) ... Selecting previously unselected package cmake. Preparing to unpack .../34-cmake_3.30.2-2_armhf.deb ... Unpacking cmake (3.30.2-2) ... Selecting previously unselected package libdebhelper-perl. Preparing to unpack .../35-libdebhelper-perl_13.20_all.deb ... Unpacking libdebhelper-perl (13.20) ... Selecting previously unselected package libtool. Preparing to unpack .../36-libtool_2.4.7-7_all.deb ... Unpacking libtool (2.4.7-7) ... Selecting previously unselected package dh-autoreconf. Preparing to unpack .../37-dh-autoreconf_20_all.deb ... Unpacking dh-autoreconf (20) ... Selecting previously unselected package libarchive-zip-perl. Preparing to unpack .../38-libarchive-zip-perl_1.68-1_all.deb ... Unpacking libarchive-zip-perl (1.68-1) ... Selecting previously unselected package libfile-stripnondeterminism-perl. Preparing to unpack .../39-libfile-stripnondeterminism-perl_1.14.0-1_all.deb ... Unpacking libfile-stripnondeterminism-perl (1.14.0-1) ... Selecting previously unselected package dh-strip-nondeterminism. Preparing to unpack .../40-dh-strip-nondeterminism_1.14.0-1_all.deb ... Unpacking dh-strip-nondeterminism (1.14.0-1) ... Selecting previously unselected package libelf1t64:armhf. Preparing to unpack .../41-libelf1t64_0.191-2_armhf.deb ... Unpacking libelf1t64:armhf (0.191-2) ... Selecting previously unselected package dwz. Preparing to unpack .../42-dwz_0.15-1+b2_armhf.deb ... Unpacking dwz (0.15-1+b2) ... Selecting previously unselected package gettext. Preparing to unpack .../43-gettext_0.22.5-2_armhf.deb ... Unpacking gettext (0.22.5-2) ... Selecting previously unselected package intltool-debian. Preparing to unpack .../44-intltool-debian_0.35.0+20060710.6_all.deb ... Unpacking intltool-debian (0.35.0+20060710.6) ... Selecting previously unselected package po-debconf. Preparing to unpack .../45-po-debconf_1.0.21+nmu1_all.deb ... Unpacking po-debconf (1.0.21+nmu1) ... Selecting previously unselected package debhelper. Preparing to unpack .../46-debhelper_13.20_all.deb ... Unpacking debhelper (13.20) ... Selecting previously unselected package python3-autocommand. Preparing to unpack .../47-python3-autocommand_2.2.2-3_all.deb ... Unpacking python3-autocommand (2.2.2-3) ... Selecting previously unselected package python3-more-itertools. Preparing to unpack .../48-python3-more-itertools_10.3.0-1_all.deb ... Unpacking python3-more-itertools (10.3.0-1) ... Selecting previously unselected package python3-typing-extensions. Preparing to unpack .../49-python3-typing-extensions_4.12.2-2_all.deb ... Unpacking python3-typing-extensions (4.12.2-2) ... Selecting previously unselected package python3-typeguard. Preparing to unpack .../50-python3-typeguard_4.3.0-1_all.deb ... Unpacking python3-typeguard (4.3.0-1) ... Selecting previously unselected package python3-inflect. Preparing to unpack .../51-python3-inflect_7.3.1-1_all.deb ... Unpacking python3-inflect (7.3.1-1) ... Selecting previously unselected package python3-jaraco.context. Preparing to unpack .../52-python3-jaraco.context_6.0.0-1_all.deb ... Unpacking python3-jaraco.context (6.0.0-1) ... Selecting previously unselected package python3-jaraco.functools. Preparing to unpack .../53-python3-jaraco.functools_4.0.2-1_all.deb ... Unpacking python3-jaraco.functools (4.0.2-1) ... Selecting previously unselected package python3-pkg-resources. Preparing to unpack .../54-python3-pkg-resources_73.0.1-1_all.deb ... Unpacking python3-pkg-resources (73.0.1-1) ... Selecting previously unselected package python3-zipp. Preparing to unpack .../55-python3-zipp_3.20.0-1_all.deb ... Unpacking python3-zipp (3.20.0-1) ... Selecting previously unselected package python3-setuptools. Preparing to unpack .../56-python3-setuptools_73.0.1-1_all.deb ... Unpacking python3-setuptools (73.0.1-1) ... Selecting previously unselected package dh-python. Preparing to unpack .../57-dh-python_6.20240824_all.deb ... Unpacking dh-python (6.20240824) ... Selecting previously unselected package googletest. Preparing to unpack .../58-googletest_1.15.2-1_all.deb ... Unpacking googletest (1.15.2-1) ... Selecting previously unselected package libabsl20230802:armhf. Preparing to unpack .../59-libabsl20230802_20230802.1-4_armhf.deb ... Unpacking libabsl20230802:armhf (20230802.1-4) ... Selecting previously unselected package libabsl-dev:armhf. Preparing to unpack .../60-libabsl-dev_20230802.1-4_armhf.deb ... Unpacking libabsl-dev:armhf (20230802.1-4) ... Selecting previously unselected package libexpat1-dev:armhf. Preparing to unpack .../61-libexpat1-dev_2.6.2-1_armhf.deb ... Unpacking libexpat1-dev:armhf (2.6.2-1) ... Selecting previously unselected package libfmt9:armhf. Preparing to unpack .../62-libfmt9_9.1.0+ds1-2_armhf.deb ... Unpacking libfmt9:armhf (9.1.0+ds1-2) ... Selecting previously unselected package libfmt-dev:armhf. Preparing to unpack .../63-libfmt-dev_9.1.0+ds1-2_armhf.deb ... Unpacking libfmt-dev:armhf (9.1.0+ds1-2) ... Selecting previously unselected package libgtest-dev:armhf. Preparing to unpack .../64-libgtest-dev_1.15.2-1_armhf.deb ... Unpacking libgtest-dev:armhf (1.15.2-1) ... Selecting previously unselected package libjs-jquery. Preparing to unpack .../65-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... Selecting previously unselected package libjs-underscore. Preparing to unpack .../66-libjs-underscore_1.13.4~dfsg+~1.11.4-3_all.deb ... Unpacking libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... Selecting previously unselected package libjs-sphinxdoc. Preparing to unpack .../67-libjs-sphinxdoc_7.4.7-3_all.deb ... Unpacking libjs-sphinxdoc (7.4.7-3) ... Selecting previously unselected package libpkgconf3:armhf. Preparing to unpack .../68-libpkgconf3_1.8.1-3_armhf.deb ... Unpacking libpkgconf3:armhf (1.8.1-3) ... Selecting previously unselected package libre2-11:armhf. Preparing to unpack .../69-libre2-11_20240501-3_armhf.deb ... Unpacking libre2-11:armhf (20240501-3) ... Selecting previously unselected package libre2-dev:armhf. Preparing to unpack .../70-libre2-dev_20240501-3_armhf.deb ... Unpacking libre2-dev:armhf (20240501-3) ... Selecting previously unselected package libpog-dev. Preparing to unpack .../71-libpog-dev_0.5.3-3_all.deb ... Unpacking libpog-dev (0.5.3-3) ... Selecting previously unselected package libpython3.12t64:armhf. Preparing to unpack .../72-libpython3.12t64_3.12.5-4_armhf.deb ... Unpacking libpython3.12t64:armhf (3.12.5-4) ... Selecting previously unselected package zlib1g-dev:armhf. Preparing to unpack .../73-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1_armhf.deb ... Unpacking zlib1g-dev:armhf (1:1.3.dfsg+really1.3.1-1) ... Selecting previously unselected package libpython3.12-dev:armhf. Preparing to unpack .../74-libpython3.12-dev_3.12.5-4_armhf.deb ... Unpacking libpython3.12-dev:armhf (3.12.5-4) ... Selecting previously unselected package libpython3-dev:armhf. Preparing to unpack .../75-libpython3-dev_3.12.5-1_armhf.deb ... Unpacking libpython3-dev:armhf (3.12.5-1) ... Selecting previously unselected package libyaml-0-2:armhf. Preparing to unpack .../76-libyaml-0-2_0.2.5-1+b1_armhf.deb ... Unpacking libyaml-0-2:armhf (0.2.5-1+b1) ... Selecting previously unselected package nlohmann-json3-dev. Preparing to unpack .../77-nlohmann-json3-dev_3.11.3-1_all.deb ... Unpacking nlohmann-json3-dev (3.11.3-1) ... Selecting previously unselected package python3-chardet. Preparing to unpack .../78-python3-chardet_5.2.0+dfsg-1_all.deb ... Unpacking python3-chardet (5.2.0+dfsg-1) ... Selecting previously unselected package python3-debian. Preparing to unpack .../79-python3-debian_0.1.49_all.deb ... Unpacking python3-debian (0.1.49) ... Selecting previously unselected package python3-yaml. Preparing to unpack .../80-python3-yaml_6.0.2-1_armhf.deb ... Unpacking python3-yaml (6.0.2-1) ... Selecting previously unselected package pkg-kde-tools. Preparing to unpack .../81-pkg-kde-tools_0.17.4_all.deb ... Unpacking pkg-kde-tools (0.17.4) ... Selecting previously unselected package pkgconf-bin. Preparing to unpack .../82-pkgconf-bin_1.8.1-3_armhf.deb ... Unpacking pkgconf-bin (1.8.1-3) ... Selecting previously unselected package pkgconf:armhf. Preparing to unpack .../83-pkgconf_1.8.1-3_armhf.deb ... Unpacking pkgconf:armhf (1.8.1-3) ... Selecting previously unselected package pybind11-dev. Preparing to unpack .../84-pybind11-dev_2.12.0-1_all.deb ... Unpacking pybind11-dev (2.12.0-1) ... Selecting previously unselected package python3.12-dev. Preparing to unpack .../85-python3.12-dev_3.12.5-4_armhf.deb ... Unpacking python3.12-dev (3.12.5-4) ... Selecting previously unselected package python3-dev. Preparing to unpack .../86-python3-dev_3.12.5-1_armhf.deb ... Unpacking python3-dev (3.12.5-1) ... Setting up media-types (10.1.0) ... Setting up libpipeline1:armhf (1.5.8-1) ... Setting up libkeyutils1:armhf (1.6.3-3) ... Setting up libicu72:armhf (72.1-5) ... Setting up bsdextrautils (2.40.2-7) ... Setting up libmagic-mgc (1:5.45-3) ... Setting up libarchive-zip-perl (1.68-1) ... Setting up libyaml-0-2:armhf (0.2.5-1+b1) ... Setting up libtirpc-common (1.3.4+ds-1.3) ... Setting up libdebhelper-perl (13.20) ... Setting up libbrotli1:armhf (1.1.0-2+b4) ... Setting up libuv1t64:armhf (1.48.0-5) ... Setting up libmagic1t64:armhf (1:5.45-3) ... Setting up libpsl5t64:armhf (0.21.2-1.1) ... Setting up libnghttp2-14:armhf (1.62.1-2) ... Setting up gettext-base (0.22.5-2) ... Setting up m4 (1.4.19-4) ... Setting up libcom-err2:armhf (1.47.1-1) ... Setting up file (1:5.45-3) ... Setting up googletest (1.15.2-1) ... Setting up libelf1t64:armhf (0.191-2) ... Setting up libkrb5support0:armhf (1.21.3-3) ... Setting up libsasl2-modules-db:armhf (2.1.28+dfsg1-7) ... Setting up tzdata (2024a-4) ... Current default time zone: 'Etc/UTC' Local time is now: Wed Aug 28 09:37:36 UTC 2024. Universal Time is now: Wed Aug 28 09:37:36 UTC 2024. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up autotools-dev (20220109.1) ... Setting up libpkgconf3:armhf (1.8.1-3) ... Setting up libexpat1-dev:armhf (2.6.2-1) ... Setting up librtmp1:armhf (2.4+20151223.gitfa8646d.1-2+b4) ... Setting up libproc2-0:armhf (2:4.0.4-5) ... Setting up autopoint (0.22.5-2) ... Setting up libjsoncpp25:armhf (1.9.5-6+b2) ... Setting up pkgconf-bin (1.8.1-3) ... Setting up libk5crypto3:armhf (1.21.3-3) ... Setting up libsasl2-2:armhf (2.1.28+dfsg1-7) ... Setting up autoconf (2.72-3) ... Setting up libfmt9:armhf (9.1.0+ds1-2) ... Setting up zlib1g-dev:armhf (1:1.3.dfsg+really1.3.1-1) ... Setting up dwz (0.15-1+b2) ... Setting up sensible-utils (0.0.24) ... Setting up librhash0:armhf (1.4.3-3+b1) ... Setting up libuchardet0:armhf (0.0.8-1+b1) ... Setting up procps (2:4.0.4-5) ... Setting up netbase (6.4) ... Setting up libabsl20230802:armhf (20230802.1-4) ... Setting up cmake-data (3.30.2-2) ... Setting up libkrb5-3:armhf (1.21.3-3) ... Setting up libssh2-1t64:armhf (1.11.0-7) ... Setting up nlohmann-json3-dev (3.11.3-1) ... Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... Setting up readline-common (8.2-5) ... Setting up libxml2:armhf (2.12.7+dfsg-3+b1) ... Setting up libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... Setting up automake (1:1.16.5-1.3) ... update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode Setting up libfile-stripnondeterminism-perl (1.14.0-1) ... Setting up libre2-11:armhf (20240501-3) ... Setting up gettext (0.22.5-2) ... Setting up libgtest-dev:armhf (1.15.2-1) ... Setting up libtool (2.4.7-7) ... Setting up libldap-2.5-0:armhf (2.5.18+dfsg-3) ... Setting up pkgconf:armhf (1.8.1-3) ... Setting up intltool-debian (0.35.0+20060710.6) ... Setting up dh-autoreconf (20) ... Setting up libgssapi-krb5-2:armhf (1.21.3-3) ... Setting up libfmt-dev:armhf (9.1.0+ds1-2) ... Setting up libabsl-dev:armhf (20230802.1-4) ... Setting up libjs-sphinxdoc (7.4.7-3) ... Setting up libreadline8t64:armhf (8.2-5) ... Setting up dh-strip-nondeterminism (1.14.0-1) ... Setting up groff-base (1.23.0-5) ... Setting up libre2-dev:armhf (20240501-3) ... Setting up libarchive13t64:armhf (3.7.4-1) ... Setting up libcurl4t64:armhf (8.9.1-2) ... Setting up libtirpc3t64:armhf (1.3.4+ds-1.3) ... Setting up po-debconf (1.0.21+nmu1) ... Setting up man-db (2.12.1-3) ... Not building database; man-db/auto-update is not 'true'. Setting up libpog-dev (0.5.3-3) ... Setting up libnsl2:armhf (1.3.0-3+b2) ... Setting up cmake (3.30.2-2) ... Setting up libpython3.12-stdlib:armhf (3.12.5-4) ... Setting up python3.12 (3.12.5-4) ... Setting up debhelper (13.20) ... Setting up libpython3.12t64:armhf (3.12.5-4) ... Setting up libpython3-stdlib:armhf (3.12.5-1) ... Setting up python3 (3.12.5-1) ... Setting up libpython3.12-dev:armhf (3.12.5-4) ... Setting up python3-zipp (3.20.0-1) ... Setting up python3-autocommand (2.2.2-3) ... Setting up python3.12-dev (3.12.5-4) ... Setting up python3-typing-extensions (4.12.2-2) ... Setting up python3-more-itertools (10.3.0-1) ... Setting up libpython3-dev:armhf (3.12.5-1) ... Setting up python3-jaraco.functools (4.0.2-1) ... Setting up python3-jaraco.context (6.0.0-1) ... Setting up python3-typeguard (4.3.0-1) ... Setting up python3-yaml (6.0.2-1) ... Setting up pybind11-dev (2.12.0-1) ... Setting up python3-inflect (7.3.1-1) ... Setting up python3-dev (3.12.5-1) ... Setting up python3-pkg-resources (73.0.1-1) ... Setting up python3-setuptools (73.0.1-1) ... Setting up python3-chardet (5.2.0+dfsg-1) ... Setting up python3-debian (0.1.49) ... Setting up pkg-kde-tools (0.17.4) ... Setting up dh-python (6.20240824) ... Processing triggers for libc-bin (2.40-2) ... Reading package lists... Building dependency tree... Reading state information... Reading extended state information... Initializing package states... Writing extended state information... Building tag database... -> Finished parsing the build-deps I: Building the package I: Running cd /build/reproducible-path/yaramod-3.21.0/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../yaramod_3.21.0-1.1_source.changes dpkg-buildpackage: info: source package yaramod dpkg-buildpackage: info: source version 3.21.0-1.1 dpkg-buildpackage: info: source distribution unstable dpkg-buildpackage: info: source changed by Boyuan Yang dpkg-source --before-build . dpkg-buildpackage: info: host architecture armhf debian/rules clean dh clean debian/rules override_dh_auto_clean-arch make[1]: Entering directory '/build/reproducible-path/yaramod-3.21.0' dh_auto_clean -a -O--buildsystem=cmake dh_auto_clean -a -O--buildsystem=pybuild I: pybuild base:311: python3.12 setup.py clean /usr/lib/python3/dist-packages/setuptools/dist.py:450: SetuptoolsDeprecationWarning: Invalid dash-separated options !! ******************************************************************************** Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead. By 2024-Sep-26, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details. ******************************************************************************** !! opt = self.warn_dash_deprecation(opt, section) running clean removing '/build/reproducible-path/yaramod-3.21.0/.pybuild/cpython3_3.12/build' (and everything under it) 'build/bdist.linux-armv7l' does not exist -- can't clean it 'build/scripts-3.12' does not exist -- can't clean it rm -rf yaramod.egg-info make[1]: Leaving directory '/build/reproducible-path/yaramod-3.21.0' dh_clean debian/rules binary dh binary dh_update_autotools_config dh_autoreconf debian/rules override_dh_auto_configure-arch make[1]: Entering directory '/build/reproducible-path/yaramod-3.21.0' dh_auto_configure -a -O--buildsystem=cmake -- \ -DYARAMOD_VERSION=3.21.0 \ -DPYTHON_EXECUTABLE=/usr/bin/python3 \ -DYARAMOD_TESTS=ON -DYARAMOD_PYTHON=ON -DCMAKE_STRIP=OFF cd obj-arm-linux-gnueabihf && DEB_PYTHON_INSTALL_LAYOUT=deb PKG_CONFIG=/usr/bin/pkg-config cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DFETCHCONTENT_FULLY_DISCONNECTED=ON -DCMAKE_INSTALL_RUNSTATEDIR=/run -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON "-GUnix Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_LIBDIR=lib/arm-linux-gnueabihf -DYARAMOD_VERSION=3.21.0 -DPYTHON_EXECUTABLE=/usr/bin/python3 -DYARAMOD_TESTS=ON -DYARAMOD_PYTHON=ON -DCMAKE_STRIP=OFF .. -- The CXX compiler identification is GNU 14.2.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1") -- Checking for module 're2' -- Found re2, version 11.0.0 CMake Warning (dev) at /usr/lib/cmake/pybind11/FindPythonLibsNew.cmake:101 (message): Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules are removed. Run "cmake --help-policy CMP0148" for policy details. Use the cmake_policy command to set the policy and suppress this warning, or preferably upgrade to using FindPython, either by calling it explicitly before pybind11, or by setting PYBIND11_FINDPYTHON ON before pybind11. Call Stack (most recent call first): /usr/lib/cmake/pybind11/pybind11Tools.cmake:50 (find_package) /usr/lib/cmake/pybind11/pybind11Common.cmake:192 (include) /usr/lib/cmake/pybind11/pybind11Config.cmake:250 (include) src/python/CMakeLists.txt:1 (find_package) This warning is for project developers. Use -Wno-dev to suppress it. -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.12.5", minimum required is "3.6") -- Found PythonLibs: /usr/lib/arm-linux-gnueabihf/libpython3.12.so -- Performing Test HAS_FLTO -- Performing Test HAS_FLTO - Success -- Found pybind11: /usr/include (found version "2.12.0") -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Found GTest: /usr/lib/arm-linux-gnueabihf/cmake/GTest/GTestConfig.cmake (found version "1.15.0") -- Found Python: /usr/bin/python3 (found version "3.12.5") found components: Interpreter -- Configuring done (39.0s) -- Generating done (0.2s) CMake Warning: Manually-specified variables were not used by the project: CMAKE_EXPORT_NO_PACKAGE_REGISTRY CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY FETCHCONTENT_FULLY_DISCONNECTED -- Build files have been written to: /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf dh_auto_configure -a -O--buildsystem=pybuild I: pybuild base:311: python3.12 setup.py config /usr/lib/python3/dist-packages/setuptools/dist.py:450: SetuptoolsDeprecationWarning: Invalid dash-separated options !! ******************************************************************************** Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead. By 2024-Sep-26, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details. ******************************************************************************** !! opt = self.warn_dash_deprecation(opt, section) running config make[1]: Leaving directory '/build/reproducible-path/yaramod-3.21.0' debian/rules override_dh_auto_build-arch make[1]: Entering directory '/build/reproducible-path/yaramod-3.21.0' dh_auto_build -a -O--buildsystem=cmake cd obj-arm-linux-gnueabihf && make -j3 "INSTALL=install --strip-program=true" VERBOSE=1 make[2]: Entering directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' /usr/bin/cmake -S/build/reproducible-path/yaramod-3.21.0 -B/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf --check-build-system CMakeFiles/Makefile.cmake 0 /usr/bin/cmake -E cmake_progress_start /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/CMakeFiles /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf//CMakeFiles/progress.marks make -f CMakeFiles/Makefile2 all make[3]: Entering directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' make -f CMakeFiles/modules_wrapping.dir/build.make CMakeFiles/modules_wrapping.dir/depend make -f src/CMakeFiles/yaramod-obj.dir/build.make src/CMakeFiles/yaramod-obj.dir/depend make[4]: Entering directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /build/reproducible-path/yaramod-3.21.0 /build/reproducible-path/yaramod-3.21.0 /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/CMakeFiles/modules_wrapping.dir/DependInfo.cmake "--color=" make[4]: Entering directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /build/reproducible-path/yaramod-3.21.0 /build/reproducible-path/yaramod-3.21.0/src /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src/CMakeFiles/yaramod-obj.dir/DependInfo.cmake "--color=" make[4]: Leaving directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' make -f CMakeFiles/modules_wrapping.dir/build.make CMakeFiles/modules_wrapping.dir/build make[4]: Leaving directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' make -f src/CMakeFiles/yaramod-obj.dir/build.make src/CMakeFiles/yaramod-obj.dir/build make[4]: Entering directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' make[4]: Entering directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' [ 8%] Converting yaramod modules from JSON to byte arrays in .cpp files [ 8%] Building CXX object src/CMakeFiles/yaramod-obj.dir/builder/yara_file_builder.cpp.o [ 8%] Building CXX object src/CMakeFiles/yaramod-obj.dir/builder/yara_expression_builder.cpp.o /usr/bin/python3 /build/reproducible-path/yaramod-3.21.0/scripts/json_to_array.py -i /build/reproducible-path/yaramod-3.21.0/modules -o /build/reproducible-path/yaramod-3.21.0/include/yaramod/types/modules/generated cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/builder/yara_expression_builder.cpp.o -MF CMakeFiles/yaramod-obj.dir/builder/yara_expression_builder.cpp.o.d -o CMakeFiles/yaramod-obj.dir/builder/yara_expression_builder.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/builder/yara_expression_builder.cpp cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/builder/yara_file_builder.cpp.o -MF CMakeFiles/yaramod-obj.dir/builder/yara_file_builder.cpp.o.d -o CMakeFiles/yaramod-obj.dir/builder/yara_file_builder.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/builder/yara_file_builder.cpp Created ModuleContent /build/reproducible-path/yaramod-3.21.0/include/yaramod/types/modules/generated/module_math_generated.h from module_math Created ModuleContent /build/reproducible-path/yaramod-3.21.0/include/yaramod/types/modules/generated/module_string_generated.h from module_string Created ModuleContent /build/reproducible-path/yaramod-3.21.0/include/yaramod/types/modules/generated/module_elf_generated.h from module_elf Created ModuleContent /build/reproducible-path/yaramod-3.21.0/include/yaramod/types/modules/generated/module_hash_generated.h from module_hash Created ModuleContent /build/reproducible-path/yaramod-3.21.0/include/yaramod/types/modules/generated/module_magic_generated.h from module_magic Created ModuleContent /build/reproducible-path/yaramod-3.21.0/include/yaramod/types/modules/generated/module_cuckoo_generated.h from module_cuckoo Created ModuleContent /build/reproducible-path/yaramod-3.21.0/include/yaramod/types/modules/generated/module_pe_generated.h from module_pe Created ModuleContent /build/reproducible-path/yaramod-3.21.0/include/yaramod/types/modules/generated/module_console_generated.h from module_console Created ModuleContent /build/reproducible-path/yaramod-3.21.0/include/yaramod/types/modules/generated/module_dotnet_generated.h from module_dotnet Created ModuleContent /build/reproducible-path/yaramod-3.21.0/include/yaramod/types/modules/generated/module_time_generated.h from module_time Created ModuleContent /build/reproducible-path/yaramod-3.21.0/include/yaramod/types/modules/generated/module_cuckoo_deprecated_generated.h from module_cuckoo_deprecated Created ModuleContent /build/reproducible-path/yaramod-3.21.0/include/yaramod/types/modules/generated/module_macho_generated.h from module_macho Created ModuleContent /build/reproducible-path/yaramod-3.21.0/include/yaramod/types/modules/generated/module_dex_generated.h from module_dex make[4]: Leaving directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' [ 8%] Built target modules_wrapping [ 10%] Building CXX object src/CMakeFiles/yaramod-obj.dir/builder/yara_hex_string_builder.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/builder/yara_hex_string_builder.cpp.o -MF CMakeFiles/yaramod-obj.dir/builder/yara_hex_string_builder.cpp.o.d -o CMakeFiles/yaramod-obj.dir/builder/yara_hex_string_builder.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/builder/yara_hex_string_builder.cpp [ 13%] Building CXX object src/CMakeFiles/yaramod-obj.dir/builder/yara_rule_builder.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/builder/yara_rule_builder.cpp.o -MF CMakeFiles/yaramod-obj.dir/builder/yara_rule_builder.cpp.o.d -o CMakeFiles/yaramod-obj.dir/builder/yara_rule_builder.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/builder/yara_rule_builder.cpp [ 16%] Building CXX object src/CMakeFiles/yaramod-obj.dir/parser/parser_driver.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/parser/parser_driver.cpp.o -MF CMakeFiles/yaramod-obj.dir/parser/parser_driver.cpp.o.d -o CMakeFiles/yaramod-obj.dir/parser/parser_driver.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp [ 18%] Building CXX object src/CMakeFiles/yaramod-obj.dir/types/hex_string.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/types/hex_string.cpp.o -MF CMakeFiles/yaramod-obj.dir/types/hex_string.cpp.o.d -o CMakeFiles/yaramod-obj.dir/types/hex_string.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/types/hex_string.cpp [ 21%] Building CXX object src/CMakeFiles/yaramod-obj.dir/types/literal.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/types/literal.cpp.o -MF CMakeFiles/yaramod-obj.dir/types/literal.cpp.o.d -o CMakeFiles/yaramod-obj.dir/types/literal.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/types/literal.cpp [ 24%] Building CXX object src/CMakeFiles/yaramod-obj.dir/types/meta.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/types/meta.cpp.o -MF CMakeFiles/yaramod-obj.dir/types/meta.cpp.o.d -o CMakeFiles/yaramod-obj.dir/types/meta.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/types/meta.cpp [ 27%] Building CXX object src/CMakeFiles/yaramod-obj.dir/types/variable.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/types/variable.cpp.o -MF CMakeFiles/yaramod-obj.dir/types/variable.cpp.o.d -o CMakeFiles/yaramod-obj.dir/types/variable.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/types/variable.cpp [ 29%] Building CXX object src/CMakeFiles/yaramod-obj.dir/types/modules/module.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/types/modules/module.cpp.o -MF CMakeFiles/yaramod-obj.dir/types/modules/module.cpp.o.d -o CMakeFiles/yaramod-obj.dir/types/modules/module.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/types/modules/module.cpp [ 32%] Building CXX object src/CMakeFiles/yaramod-obj.dir/types/modules/module_pool.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/types/modules/module_pool.cpp.o -MF CMakeFiles/yaramod-obj.dir/types/modules/module_pool.cpp.o.d -o CMakeFiles/yaramod-obj.dir/types/modules/module_pool.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/types/modules/module_pool.cpp /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:196 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[11], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[4], const char (&)[11], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1391:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ 1391 | .production("NOT", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1392 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1396 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1397 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | return output; | ~~~~~~~~~~~~~~ 1399 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1393:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1393 | auto expr = std::move(args[1].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1393:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:197 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[11], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[8], const char (&)[11], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1400:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ 1391 | .production("NOT", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1392 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1396 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1397 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | return output; | ~~~~~~~~~~~~~~ 1399 | }) | ~~ 1400 | .production("DEFINED", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1401 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1402 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1403 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1404 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1405 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1406 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1407 | return output; | ~~~~~~~~~~~~~~ 1408 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1402:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1402 | auto expr = std::move(args[1].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1402:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:191 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[11], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[11], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[15], const char (&)[3], const char (&)[11], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1317:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1318:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1318 | auto for_expr = std::move(args[0].getExpression()); | ^~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1318:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1320:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1320 | auto set = std::move(args[2].getExpression()); | ^~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1320:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:192 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[9], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[9], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[15], const char (&)[3], const char (&)[9], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1327:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1328:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1328 | auto for_expr = std::move(args[0].getExpression()); | ^~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1328:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1330:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1330 | auto set = std::move(args[2].getExpression()); | ^~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1330:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:198 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[11], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[4], const char (&)[11], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[11], const char (&)[4], const char (&)[11], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1409:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ 1391 | .production("NOT", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1392 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1396 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1397 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | return output; | ~~~~~~~~~~~~~~ 1399 | }) | ~~ 1400 | .production("DEFINED", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1401 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1402 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1403 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1404 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1405 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1406 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1407 | return output; | ~~~~~~~~~~~~~~ 1408 | }) | ~~ 1409 | .production("expression", "AND", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1410 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1411 | TokenIt and_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1412 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1413 | auto output = std::make_shared(std::move(left), and_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1414 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1415 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1416 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1417 | return output; | ~~~~~~~~~~~~~~ 1418 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1410:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1410 | auto left = std::move(args[0].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1410:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1412:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1412 | auto right = std::move(args[2].getExpression()); | ^~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1412:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:199 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[11], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[11], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[11], const char (&)[3], const char (&)[11], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1419:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ 1391 | .production("NOT", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1392 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1396 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1397 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | return output; | ~~~~~~~~~~~~~~ 1399 | }) | ~~ 1400 | .production("DEFINED", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1401 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1402 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1403 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1404 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1405 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1406 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1407 | return output; | ~~~~~~~~~~~~~~ 1408 | }) | ~~ 1409 | .production("expression", "AND", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1410 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1411 | TokenIt and_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1412 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1413 | auto output = std::make_shared(std::move(left), and_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1414 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1415 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1416 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1417 | return output; | ~~~~~~~~~~~~~~ 1418 | }) | ~~ 1419 | .production("expression", "OR", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1420 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1421 | TokenIt or_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1422 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1423 | auto output = std::make_shared(std::move(left), or_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1424 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1425 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1426 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1427 | return output; | ~~~~~~~~~~~~~~ 1428 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1420:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1420 | auto left = std::move(args[0].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1420:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1422:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1422 | auto right = std::move(args[2].getExpression()); | ^~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1422:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:200 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[19], const char (&)[3], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1429:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ 1391 | .production("NOT", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1392 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1396 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1397 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | return output; | ~~~~~~~~~~~~~~ 1399 | }) | ~~ 1400 | .production("DEFINED", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1401 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1402 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1403 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1404 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1405 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1406 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1407 | return output; | ~~~~~~~~~~~~~~ 1408 | }) | ~~ 1409 | .production("expression", "AND", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1410 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1411 | TokenIt and_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1412 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1413 | auto output = std::make_shared(std::move(left), and_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1414 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1415 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1416 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1417 | return output; | ~~~~~~~~~~~~~~ 1418 | }) | ~~ 1419 | .production("expression", "OR", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1420 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1421 | TokenIt or_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1422 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1423 | auto output = std::make_shared(std::move(left), or_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1424 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1425 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1426 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1427 | return output; | ~~~~~~~~~~~~~~ 1428 | }) | ~~ 1429 | .production("primary_expression", "LT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1430 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1431 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1432 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1433 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1434 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1435 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1436 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1437 | return output; | ~~~~~~~~~~~~~~ 1438 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1430:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1430 | auto left = std::move(args[0].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1430:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1432:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1432 | auto right = std::move(args[2].getExpression()); | ^~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1432:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:201 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[19], const char (&)[3], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1439:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ 1391 | .production("NOT", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1392 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1396 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1397 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | return output; | ~~~~~~~~~~~~~~ 1399 | }) | ~~ 1400 | .production("DEFINED", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1401 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1402 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1403 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1404 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1405 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1406 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1407 | return output; | ~~~~~~~~~~~~~~ 1408 | }) | ~~ 1409 | .production("expression", "AND", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1410 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1411 | TokenIt and_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1412 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1413 | auto output = std::make_shared(std::move(left), and_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1414 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1415 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1416 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1417 | return output; | ~~~~~~~~~~~~~~ 1418 | }) | ~~ 1419 | .production("expression", "OR", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1420 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1421 | TokenIt or_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1422 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1423 | auto output = std::make_shared(std::move(left), or_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1424 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1425 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1426 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1427 | return output; | ~~~~~~~~~~~~~~ 1428 | }) | ~~ 1429 | .production("primary_expression", "LT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1430 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1431 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1432 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1433 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1434 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1435 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1436 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1437 | return output; | ~~~~~~~~~~~~~~ 1438 | }) | ~~ 1439 | .production("primary_expression", "GT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1440 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1441 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1442 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1443 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1444 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1445 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1446 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1447 | return output; | ~~~~~~~~~~~~~~ 1448 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1440:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1440 | auto left = std::move(args[0].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1440:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1442:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1442 | auto right = std::move(args[2].getExpression()); | ^~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1442:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:202 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[19], const char (&)[3], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1449:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ 1391 | .production("NOT", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1392 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1396 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1397 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | return output; | ~~~~~~~~~~~~~~ 1399 | }) | ~~ 1400 | .production("DEFINED", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1401 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1402 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1403 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1404 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1405 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1406 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1407 | return output; | ~~~~~~~~~~~~~~ 1408 | }) | ~~ 1409 | .production("expression", "AND", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1410 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1411 | TokenIt and_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1412 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1413 | auto output = std::make_shared(std::move(left), and_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1414 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1415 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1416 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1417 | return output; | ~~~~~~~~~~~~~~ 1418 | }) | ~~ 1419 | .production("expression", "OR", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1420 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1421 | TokenIt or_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1422 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1423 | auto output = std::make_shared(std::move(left), or_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1424 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1425 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1426 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1427 | return output; | ~~~~~~~~~~~~~~ 1428 | }) | ~~ 1429 | .production("primary_expression", "LT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1430 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1431 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1432 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1433 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1434 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1435 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1436 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1437 | return output; | ~~~~~~~~~~~~~~ 1438 | }) | ~~ 1439 | .production("primary_expression", "GT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1440 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1441 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1442 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1443 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1444 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1445 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1446 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1447 | return output; | ~~~~~~~~~~~~~~ 1448 | }) | ~~ 1449 | .production("primary_expression", "LE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1450 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1451 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1452 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1453 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1454 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1455 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1456 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1457 | return output; | ~~~~~~~~~~~~~~ 1458 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1450:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1450 | auto left = std::move(args[0].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1450:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1452:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1452 | auto right = std::move(args[2].getExpression()); | ^~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1452:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:203 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[19], const char (&)[3], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1459:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ 1391 | .production("NOT", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1392 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1396 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1397 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | return output; | ~~~~~~~~~~~~~~ 1399 | }) | ~~ 1400 | .production("DEFINED", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1401 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1402 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1403 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1404 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1405 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1406 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1407 | return output; | ~~~~~~~~~~~~~~ 1408 | }) | ~~ 1409 | .production("expression", "AND", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1410 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1411 | TokenIt and_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1412 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1413 | auto output = std::make_shared(std::move(left), and_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1414 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1415 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1416 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1417 | return output; | ~~~~~~~~~~~~~~ 1418 | }) | ~~ 1419 | .production("expression", "OR", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1420 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1421 | TokenIt or_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1422 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1423 | auto output = std::make_shared(std::move(left), or_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1424 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1425 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1426 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1427 | return output; | ~~~~~~~~~~~~~~ 1428 | }) | ~~ 1429 | .production("primary_expression", "LT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1430 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1431 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1432 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1433 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1434 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1435 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1436 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1437 | return output; | ~~~~~~~~~~~~~~ 1438 | }) | ~~ 1439 | .production("primary_expression", "GT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1440 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1441 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1442 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1443 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1444 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1445 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1446 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1447 | return output; | ~~~~~~~~~~~~~~ 1448 | }) | ~~ 1449 | .production("primary_expression", "LE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1450 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1451 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1452 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1453 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1454 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1455 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1456 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1457 | return output; | ~~~~~~~~~~~~~~ 1458 | }) | ~~ 1459 | .production("primary_expression", "GE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1460 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1461 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1462 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1463 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1464 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1465 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1466 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1467 | return output; | ~~~~~~~~~~~~~~ 1468 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1460:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1460 | auto left = std::move(args[0].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1460:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1462:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1462 | auto right = std::move(args[2].getExpression()); | ^~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1462:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:204 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[19], const char (&)[3], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1469:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ 1391 | .production("NOT", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1392 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1396 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1397 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | return output; | ~~~~~~~~~~~~~~ 1399 | }) | ~~ 1400 | .production("DEFINED", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1401 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1402 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1403 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1404 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1405 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1406 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1407 | return output; | ~~~~~~~~~~~~~~ 1408 | }) | ~~ 1409 | .production("expression", "AND", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1410 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1411 | TokenIt and_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1412 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1413 | auto output = std::make_shared(std::move(left), and_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1414 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1415 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1416 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1417 | return output; | ~~~~~~~~~~~~~~ 1418 | }) | ~~ 1419 | .production("expression", "OR", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1420 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1421 | TokenIt or_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1422 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1423 | auto output = std::make_shared(std::move(left), or_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1424 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1425 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1426 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1427 | return output; | ~~~~~~~~~~~~~~ 1428 | }) | ~~ 1429 | .production("primary_expression", "LT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1430 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1431 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1432 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1433 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1434 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1435 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1436 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1437 | return output; | ~~~~~~~~~~~~~~ 1438 | }) | ~~ 1439 | .production("primary_expression", "GT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1440 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1441 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1442 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1443 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1444 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1445 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1446 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1447 | return output; | ~~~~~~~~~~~~~~ 1448 | }) | ~~ 1449 | .production("primary_expression", "LE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1450 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1451 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1452 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1453 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1454 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1455 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1456 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1457 | return output; | ~~~~~~~~~~~~~~ 1458 | }) | ~~ 1459 | .production("primary_expression", "GE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1460 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1461 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1462 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1463 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1464 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1465 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1466 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1467 | return output; | ~~~~~~~~~~~~~~ 1468 | }) | ~~ 1469 | .production("primary_expression", "EQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1470 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1471 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1472 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1473 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1474 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1475 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1476 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1477 | return output; | ~~~~~~~~~~~~~~ 1478 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1470:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1470 | auto left = std::move(args[0].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1470:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1472:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1472 | auto right = std::move(args[2].getExpression()); | ^~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1472:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:205 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[4], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[19], const char (&)[4], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1479:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ 1391 | .production("NOT", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1392 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1396 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1397 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | return output; | ~~~~~~~~~~~~~~ 1399 | }) | ~~ 1400 | .production("DEFINED", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1401 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1402 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1403 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1404 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1405 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1406 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1407 | return output; | ~~~~~~~~~~~~~~ 1408 | }) | ~~ 1409 | .production("expression", "AND", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1410 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1411 | TokenIt and_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1412 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1413 | auto output = std::make_shared(std::move(left), and_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1414 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1415 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1416 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1417 | return output; | ~~~~~~~~~~~~~~ 1418 | }) | ~~ 1419 | .production("expression", "OR", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1420 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1421 | TokenIt or_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1422 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1423 | auto output = std::make_shared(std::move(left), or_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1424 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1425 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1426 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1427 | return output; | ~~~~~~~~~~~~~~ 1428 | }) | ~~ 1429 | .production("primary_expression", "LT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1430 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1431 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1432 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1433 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1434 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1435 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1436 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1437 | return output; | ~~~~~~~~~~~~~~ 1438 | }) | ~~ 1439 | .production("primary_expression", "GT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1440 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1441 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1442 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1443 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1444 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1445 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1446 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1447 | return output; | ~~~~~~~~~~~~~~ 1448 | }) | ~~ 1449 | .production("primary_expression", "LE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1450 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1451 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1452 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1453 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1454 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1455 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1456 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1457 | return output; | ~~~~~~~~~~~~~~ 1458 | }) | ~~ 1459 | .production("primary_expression", "GE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1460 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1461 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1462 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1463 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1464 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1465 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1466 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1467 | return output; | ~~~~~~~~~~~~~~ 1468 | }) | ~~ 1469 | .production("primary_expression", "EQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1470 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1471 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1472 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1473 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1474 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1475 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1476 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1477 | return output; | ~~~~~~~~~~~~~~ 1478 | }) | ~~ 1479 | .production("primary_expression", "NEQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1480 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1481 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1482 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1483 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1484 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1485 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1486 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1487 | return output; | ~~~~~~~~~~~~~~ 1488 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1480:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1480 | auto left = std::move(args[0].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1480:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1482:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1482 | auto right = std::move(args[2].getExpression()); | ^~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1482:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:206 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[9], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[19], const char (&)[9], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1489:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ 1391 | .production("NOT", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1392 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1396 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1397 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | return output; | ~~~~~~~~~~~~~~ 1399 | }) | ~~ 1400 | .production("DEFINED", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1401 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1402 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1403 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1404 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1405 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1406 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1407 | return output; | ~~~~~~~~~~~~~~ 1408 | }) | ~~ 1409 | .production("expression", "AND", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1410 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1411 | TokenIt and_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1412 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1413 | auto output = std::make_shared(std::move(left), and_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1414 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1415 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1416 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1417 | return output; | ~~~~~~~~~~~~~~ 1418 | }) | ~~ 1419 | .production("expression", "OR", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1420 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1421 | TokenIt or_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1422 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1423 | auto output = std::make_shared(std::move(left), or_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1424 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1425 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1426 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1427 | return output; | ~~~~~~~~~~~~~~ 1428 | }) | ~~ 1429 | .production("primary_expression", "LT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1430 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1431 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1432 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1433 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1434 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1435 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1436 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1437 | return output; | ~~~~~~~~~~~~~~ 1438 | }) | ~~ 1439 | .production("primary_expression", "GT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1440 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1441 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1442 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1443 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1444 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1445 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1446 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1447 | return output; | ~~~~~~~~~~~~~~ 1448 | }) | ~~ 1449 | .production("primary_expression", "LE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1450 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1451 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1452 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1453 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1454 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1455 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1456 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1457 | return output; | ~~~~~~~~~~~~~~ 1458 | }) | ~~ 1459 | .production("primary_expression", "GE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1460 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1461 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1462 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1463 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1464 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1465 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1466 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1467 | return output; | ~~~~~~~~~~~~~~ 1468 | }) | ~~ 1469 | .production("primary_expression", "EQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1470 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1471 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1472 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1473 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1474 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1475 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1476 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1477 | return output; | ~~~~~~~~~~~~~~ 1478 | }) | ~~ 1479 | .production("primary_expression", "NEQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1480 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1481 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1482 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1483 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1484 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1485 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1486 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1487 | return output; | ~~~~~~~~~~~~~~ 1488 | }) | ~~ 1489 | .production("primary_expression", "CONTAINS", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1490 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1491 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1492 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1493 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1494 | error_handle(op_token->getLocation(), "operator 'contains' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1495 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1496 | error_handle(op_token->getLocation(), "operator 'contains' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1497 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1498 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1499 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1500 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1501 | return output; | ~~~~~~~~~~~~~~ 1502 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1490:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1490 | auto left = std::move(args[0].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1490:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1492:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1492 | auto right = std::move(args[2].getExpression()); | ^~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1492:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:207 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[10], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[19], const char (&)[10], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1503:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ 1391 | .production("NOT", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1392 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1396 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1397 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | return output; | ~~~~~~~~~~~~~~ 1399 | }) | ~~ 1400 | .production("DEFINED", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1401 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1402 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1403 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1404 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1405 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1406 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1407 | return output; | ~~~~~~~~~~~~~~ 1408 | }) | ~~ 1409 | .production("expression", "AND", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1410 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1411 | TokenIt and_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1412 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1413 | auto output = std::make_shared(std::move(left), and_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1414 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1415 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1416 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1417 | return output; | ~~~~~~~~~~~~~~ 1418 | }) | ~~ 1419 | .production("expression", "OR", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1420 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1421 | TokenIt or_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1422 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1423 | auto output = std::make_shared(std::move(left), or_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1424 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1425 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1426 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1427 | return output; | ~~~~~~~~~~~~~~ 1428 | }) | ~~ 1429 | .production("primary_expression", "LT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1430 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1431 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1432 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1433 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1434 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1435 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1436 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1437 | return output; | ~~~~~~~~~~~~~~ 1438 | }) | ~~ 1439 | .production("primary_expression", "GT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1440 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1441 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1442 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1443 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1444 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1445 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1446 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1447 | return output; | ~~~~~~~~~~~~~~ 1448 | }) | ~~ 1449 | .production("primary_expression", "LE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1450 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1451 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1452 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1453 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1454 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1455 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1456 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1457 | return output; | ~~~~~~~~~~~~~~ 1458 | }) | ~~ 1459 | .production("primary_expression", "GE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1460 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1461 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1462 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1463 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1464 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1465 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1466 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1467 | return output; | ~~~~~~~~~~~~~~ 1468 | }) | ~~ 1469 | .production("primary_expression", "EQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1470 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1471 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1472 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1473 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1474 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1475 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1476 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1477 | return output; | ~~~~~~~~~~~~~~ 1478 | }) | ~~ 1479 | .production("primary_expression", "NEQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1480 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1481 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1482 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1483 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1484 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1485 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1486 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1487 | return output; | ~~~~~~~~~~~~~~ 1488 | }) | ~~ 1489 | .production("primary_expression", "CONTAINS", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1490 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1491 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1492 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1493 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1494 | error_handle(op_token->getLocation(), "operator 'contains' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1495 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1496 | error_handle(op_token->getLocation(), "operator 'contains' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1497 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1498 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1499 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1500 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1501 | return output; | ~~~~~~~~~~~~~~ 1502 | }) | ~~ 1503 | .production("primary_expression", "ICONTAINS", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1504 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1505 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1506 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1507 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1508 | error_handle(op_token->getLocation(), "operator 'icontains' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1509 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1510 | error_handle(op_token->getLocation(), "operator 'icontains' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1511 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1512 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1513 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1514 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1515 | return output; | ~~~~~~~~~~~~~~ 1516 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1504:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1504 | auto left = std::move(args[0].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1504:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1506:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1506 | auto right = std::move(args[2].getExpression()); | ^~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1506:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:208 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[7], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[8], const char (&)[7], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[19], const char (&)[8], const char (&)[7], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1517:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ 1391 | .production("NOT", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1392 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1396 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1397 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | return output; | ~~~~~~~~~~~~~~ 1399 | }) | ~~ 1400 | .production("DEFINED", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1401 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1402 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1403 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1404 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1405 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1406 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1407 | return output; | ~~~~~~~~~~~~~~ 1408 | }) | ~~ 1409 | .production("expression", "AND", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1410 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1411 | TokenIt and_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1412 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1413 | auto output = std::make_shared(std::move(left), and_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1414 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1415 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1416 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1417 | return output; | ~~~~~~~~~~~~~~ 1418 | }) | ~~ 1419 | .production("expression", "OR", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1420 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1421 | TokenIt or_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1422 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1423 | auto output = std::make_shared(std::move(left), or_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1424 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1425 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1426 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1427 | return output; | ~~~~~~~~~~~~~~ 1428 | }) | ~~ 1429 | .production("primary_expression", "LT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1430 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1431 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1432 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1433 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1434 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1435 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1436 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1437 | return output; | ~~~~~~~~~~~~~~ 1438 | }) | ~~ 1439 | .production("primary_expression", "GT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1440 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1441 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1442 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1443 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1444 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1445 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1446 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1447 | return output; | ~~~~~~~~~~~~~~ 1448 | }) | ~~ 1449 | .production("primary_expression", "LE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1450 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1451 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1452 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1453 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1454 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1455 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1456 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1457 | return output; | ~~~~~~~~~~~~~~ 1458 | }) | ~~ 1459 | .production("primary_expression", "GE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1460 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1461 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1462 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1463 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1464 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1465 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1466 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1467 | return output; | ~~~~~~~~~~~~~~ 1468 | }) | ~~ 1469 | .production("primary_expression", "EQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1470 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1471 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1472 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1473 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1474 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1475 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1476 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1477 | return output; | ~~~~~~~~~~~~~~ 1478 | }) | ~~ 1479 | .production("primary_expression", "NEQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1480 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1481 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1482 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1483 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1484 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1485 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1486 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1487 | return output; | ~~~~~~~~~~~~~~ 1488 | }) | ~~ 1489 | .production("primary_expression", "CONTAINS", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1490 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1491 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1492 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1493 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1494 | error_handle(op_token->getLocation(), "operator 'contains' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1495 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1496 | error_handle(op_token->getLocation(), "operator 'contains' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1497 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1498 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1499 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1500 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1501 | return output; | ~~~~~~~~~~~~~~ 1502 | }) | ~~ 1503 | .production("primary_expression", "ICONTAINS", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1504 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1505 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1506 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1507 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1508 | error_handle(op_token->getLocation(), "operator 'icontains' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1509 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1510 | error_handle(op_token->getLocation(), "operator 'icontains' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1511 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1512 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1513 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1514 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1515 | return output; | ~~~~~~~~~~~~~~ 1516 | }) | ~~ 1517 | .production("primary_expression", "MATCHES", "regexp", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1518 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1519 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1520 | auto right = std::move(args[2].getYaramodString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1521 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1522 | error_handle(op_token->getLocation(), "operator 'matches' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1523 | auto regexp_expression = std::make_shared(std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1524 | auto output = std::make_shared(std::move(left), op_token, std::move(regexp_expression)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1525 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1526 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1527 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1528 | return output; | ~~~~~~~~~~~~~~ 1529 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1518:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1518 | auto left = std::move(args[0].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1518:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:209 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[11], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[19], const char (&)[11], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1530:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ 1391 | .production("NOT", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1392 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1396 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1397 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | return output; | ~~~~~~~~~~~~~~ 1399 | }) | ~~ 1400 | .production("DEFINED", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1401 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1402 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1403 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1404 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1405 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1406 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1407 | return output; | ~~~~~~~~~~~~~~ 1408 | }) | ~~ 1409 | .production("expression", "AND", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1410 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1411 | TokenIt and_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1412 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1413 | auto output = std::make_shared(std::move(left), and_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1414 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1415 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1416 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1417 | return output; | ~~~~~~~~~~~~~~ 1418 | }) | ~~ 1419 | .production("expression", "OR", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1420 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1421 | TokenIt or_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1422 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1423 | auto output = std::make_shared(std::move(left), or_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1424 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1425 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1426 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1427 | return output; | ~~~~~~~~~~~~~~ 1428 | }) | ~~ 1429 | .production("primary_expression", "LT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1430 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1431 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1432 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1433 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1434 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1435 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1436 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1437 | return output; | ~~~~~~~~~~~~~~ 1438 | }) | ~~ 1439 | .production("primary_expression", "GT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1440 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1441 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1442 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1443 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1444 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1445 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1446 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1447 | return output; | ~~~~~~~~~~~~~~ 1448 | }) | ~~ 1449 | .production("primary_expression", "LE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1450 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1451 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1452 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1453 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1454 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1455 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1456 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1457 | return output; | ~~~~~~~~~~~~~~ 1458 | }) | ~~ 1459 | .production("primary_expression", "GE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1460 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1461 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1462 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1463 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1464 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1465 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1466 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1467 | return output; | ~~~~~~~~~~~~~~ 1468 | }) | ~~ 1469 | .production("primary_expression", "EQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1470 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1471 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1472 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1473 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1474 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1475 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1476 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1477 | return output; | ~~~~~~~~~~~~~~ 1478 | }) | ~~ 1479 | .production("primary_expression", "NEQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1480 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1481 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1482 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1483 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1484 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1485 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1486 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1487 | return output; | ~~~~~~~~~~~~~~ 1488 | }) | ~~ 1489 | .production("primary_expression", "CONTAINS", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1490 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1491 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1492 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1493 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1494 | error_handle(op_token->getLocation(), "operator 'contains' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1495 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1496 | error_handle(op_token->getLocation(), "operator 'contains' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1497 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1498 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1499 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1500 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1501 | return output; | ~~~~~~~~~~~~~~ 1502 | }) | ~~ 1503 | .production("primary_expression", "ICONTAINS", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1504 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1505 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1506 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1507 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1508 | error_handle(op_token->getLocation(), "operator 'icontains' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1509 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1510 | error_handle(op_token->getLocation(), "operator 'icontains' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1511 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1512 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1513 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1514 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1515 | return output; | ~~~~~~~~~~~~~~ 1516 | }) | ~~ 1517 | .production("primary_expression", "MATCHES", "regexp", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1518 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1519 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1520 | auto right = std::move(args[2].getYaramodString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1521 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1522 | error_handle(op_token->getLocation(), "operator 'matches' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1523 | auto regexp_expression = std::make_shared(std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1524 | auto output = std::make_shared(std::move(left), op_token, std::move(regexp_expression)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1525 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1526 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1527 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1528 | return output; | ~~~~~~~~~~~~~~ 1529 | }) | ~~ 1530 | .production("primary_expression", "STARTSWITH", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1531 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1532 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1533 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1534 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1535 | error_handle(op_token->getLocation(), "operator 'startswith' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1536 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1537 | error_handle(op_token->getLocation(), "operator 'startswith' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1538 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1539 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1540 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1541 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1542 | return output; | ~~~~~~~~~~~~~~ 1543 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1531:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1531 | auto left = std::move(args[0].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1531:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1533:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1533 | auto right = std::move(args[2].getExpression()); | ^~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1533:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:210 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[12], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[19], const char (&)[12], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1544:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ 1391 | .production("NOT", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1392 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1396 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1397 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | return output; | ~~~~~~~~~~~~~~ 1399 | }) | ~~ 1400 | .production("DEFINED", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1401 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1402 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1403 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1404 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1405 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1406 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1407 | return output; | ~~~~~~~~~~~~~~ 1408 | }) | ~~ 1409 | .production("expression", "AND", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1410 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1411 | TokenIt and_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1412 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1413 | auto output = std::make_shared(std::move(left), and_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1414 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1415 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1416 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1417 | return output; | ~~~~~~~~~~~~~~ 1418 | }) | ~~ 1419 | .production("expression", "OR", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1420 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1421 | TokenIt or_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1422 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1423 | auto output = std::make_shared(std::move(left), or_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1424 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1425 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1426 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1427 | return output; | ~~~~~~~~~~~~~~ 1428 | }) | ~~ 1429 | .production("primary_expression", "LT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1430 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1431 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1432 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1433 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1434 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1435 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1436 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1437 | return output; | ~~~~~~~~~~~~~~ 1438 | }) | ~~ 1439 | .production("primary_expression", "GT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1440 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1441 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1442 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1443 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1444 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1445 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1446 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1447 | return output; | ~~~~~~~~~~~~~~ 1448 | }) | ~~ 1449 | .production("primary_expression", "LE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1450 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1451 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1452 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1453 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1454 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1455 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1456 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1457 | return output; | ~~~~~~~~~~~~~~ 1458 | }) | ~~ 1459 | .production("primary_expression", "GE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1460 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1461 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1462 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1463 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1464 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1465 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1466 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1467 | return output; | ~~~~~~~~~~~~~~ 1468 | }) | ~~ 1469 | .production("primary_expression", "EQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1470 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1471 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1472 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1473 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1474 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1475 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1476 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1477 | return output; | ~~~~~~~~~~~~~~ 1478 | }) | ~~ 1479 | .production("primary_expression", "NEQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1480 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1481 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1482 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1483 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1484 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1485 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1486 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1487 | return output; | ~~~~~~~~~~~~~~ 1488 | }) | ~~ 1489 | .production("primary_expression", "CONTAINS", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1490 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1491 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1492 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1493 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1494 | error_handle(op_token->getLocation(), "operator 'contains' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1495 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1496 | error_handle(op_token->getLocation(), "operator 'contains' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1497 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1498 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1499 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1500 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1501 | return output; | ~~~~~~~~~~~~~~ 1502 | }) | ~~ 1503 | .production("primary_expression", "ICONTAINS", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1504 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1505 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1506 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1507 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1508 | error_handle(op_token->getLocation(), "operator 'icontains' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1509 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1510 | error_handle(op_token->getLocation(), "operator 'icontains' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1511 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1512 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1513 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1514 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1515 | return output; | ~~~~~~~~~~~~~~ 1516 | }) | ~~ 1517 | .production("primary_expression", "MATCHES", "regexp", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1518 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1519 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1520 | auto right = std::move(args[2].getYaramodString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1521 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1522 | error_handle(op_token->getLocation(), "operator 'matches' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1523 | auto regexp_expression = std::make_shared(std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1524 | auto output = std::make_shared(std::move(left), op_token, std::move(regexp_expression)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1525 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1526 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1527 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1528 | return output; | ~~~~~~~~~~~~~~ 1529 | }) | ~~ 1530 | .production("primary_expression", "STARTSWITH", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1531 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1532 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1533 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1534 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1535 | error_handle(op_token->getLocation(), "operator 'startswith' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1536 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1537 | error_handle(op_token->getLocation(), "operator 'startswith' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1538 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1539 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1540 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1541 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1542 | return output; | ~~~~~~~~~~~~~~ 1543 | }) | ~~ 1544 | .production("primary_expression", "ISTARTSWITH", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1545 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1546 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1547 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1548 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1549 | error_handle(op_token->getLocation(), "operator 'istartswith' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1550 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1551 | error_handle(op_token->getLocation(), "operator 'istartswith' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1552 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1553 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1554 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1555 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1556 | return output; | ~~~~~~~~~~~~~~ 1557 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1545:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1545 | auto left = std::move(args[0].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1545:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1547:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1547 | auto right = std::move(args[2].getExpression()); | ^~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1547:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:211 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[9], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[19], const char (&)[9], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1558:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ 1391 | .production("NOT", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1392 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1396 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1397 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | return output; | ~~~~~~~~~~~~~~ 1399 | }) | ~~ 1400 | .production("DEFINED", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1401 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1402 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1403 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1404 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1405 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1406 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1407 | return output; | ~~~~~~~~~~~~~~ 1408 | }) | ~~ 1409 | .production("expression", "AND", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1410 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1411 | TokenIt and_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1412 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1413 | auto output = std::make_shared(std::move(left), and_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1414 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1415 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1416 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1417 | return output; | ~~~~~~~~~~~~~~ 1418 | }) | ~~ 1419 | .production("expression", "OR", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1420 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1421 | TokenIt or_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1422 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1423 | auto output = std::make_shared(std::move(left), or_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1424 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1425 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1426 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1427 | return output; | ~~~~~~~~~~~~~~ 1428 | }) | ~~ 1429 | .production("primary_expression", "LT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1430 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1431 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1432 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1433 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1434 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1435 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1436 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1437 | return output; | ~~~~~~~~~~~~~~ 1438 | }) | ~~ 1439 | .production("primary_expression", "GT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1440 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1441 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1442 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1443 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1444 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1445 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1446 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1447 | return output; | ~~~~~~~~~~~~~~ 1448 | }) | ~~ 1449 | .production("primary_expression", "LE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1450 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1451 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1452 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1453 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1454 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1455 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1456 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1457 | return output; | ~~~~~~~~~~~~~~ 1458 | }) | ~~ 1459 | .production("primary_expression", "GE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1460 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1461 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1462 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1463 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1464 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1465 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1466 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1467 | return output; | ~~~~~~~~~~~~~~ 1468 | }) | ~~ 1469 | .production("primary_expression", "EQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1470 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1471 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1472 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1473 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1474 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1475 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1476 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1477 | return output; | ~~~~~~~~~~~~~~ 1478 | }) | ~~ 1479 | .production("primary_expression", "NEQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1480 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1481 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1482 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1483 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1484 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1485 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1486 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1487 | return output; | ~~~~~~~~~~~~~~ 1488 | }) | ~~ 1489 | .production("primary_expression", "CONTAINS", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1490 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1491 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1492 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1493 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1494 | error_handle(op_token->getLocation(), "operator 'contains' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1495 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1496 | error_handle(op_token->getLocation(), "operator 'contains' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1497 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1498 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1499 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1500 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1501 | return output; | ~~~~~~~~~~~~~~ 1502 | }) | ~~ 1503 | .production("primary_expression", "ICONTAINS", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1504 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1505 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1506 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1507 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1508 | error_handle(op_token->getLocation(), "operator 'icontains' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1509 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1510 | error_handle(op_token->getLocation(), "operator 'icontains' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1511 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1512 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1513 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1514 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1515 | return output; | ~~~~~~~~~~~~~~ 1516 | }) | ~~ 1517 | .production("primary_expression", "MATCHES", "regexp", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1518 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1519 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1520 | auto right = std::move(args[2].getYaramodString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1521 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1522 | error_handle(op_token->getLocation(), "operator 'matches' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1523 | auto regexp_expression = std::make_shared(std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1524 | auto output = std::make_shared(std::move(left), op_token, std::move(regexp_expression)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1525 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1526 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1527 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1528 | return output; | ~~~~~~~~~~~~~~ 1529 | }) | ~~ 1530 | .production("primary_expression", "STARTSWITH", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1531 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1532 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1533 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1534 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1535 | error_handle(op_token->getLocation(), "operator 'startswith' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1536 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1537 | error_handle(op_token->getLocation(), "operator 'startswith' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1538 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1539 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1540 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1541 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1542 | return output; | ~~~~~~~~~~~~~~ 1543 | }) | ~~ 1544 | .production("primary_expression", "ISTARTSWITH", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1545 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1546 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1547 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1548 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1549 | error_handle(op_token->getLocation(), "operator 'istartswith' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1550 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1551 | error_handle(op_token->getLocation(), "operator 'istartswith' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1552 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1553 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1554 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1555 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1556 | return output; | ~~~~~~~~~~~~~~ 1557 | }) | ~~ 1558 | .production("primary_expression", "ENDSWITH", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1559 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1560 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1561 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1562 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1563 | error_handle(op_token->getLocation(), "operator 'endswith' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1564 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1565 | error_handle(op_token->getLocation(), "operator 'endswith' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1566 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1567 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1568 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1569 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1570 | return output; | ~~~~~~~~~~~~~~ 1571 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1559:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1559 | auto left = std::move(args[0].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1559:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1561:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1561 | auto right = std::move(args[2].getExpression()); | ^~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1561:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:212 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[10], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[19], const char (&)[10], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1572:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ 1391 | .production("NOT", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1392 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1396 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1397 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | return output; | ~~~~~~~~~~~~~~ 1399 | }) | ~~ 1400 | .production("DEFINED", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1401 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1402 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1403 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1404 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1405 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1406 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1407 | return output; | ~~~~~~~~~~~~~~ 1408 | }) | ~~ 1409 | .production("expression", "AND", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1410 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1411 | TokenIt and_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1412 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1413 | auto output = std::make_shared(std::move(left), and_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1414 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1415 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1416 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1417 | return output; | ~~~~~~~~~~~~~~ 1418 | }) | ~~ 1419 | .production("expression", "OR", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1420 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1421 | TokenIt or_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1422 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1423 | auto output = std::make_shared(std::move(left), or_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1424 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1425 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1426 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1427 | return output; | ~~~~~~~~~~~~~~ 1428 | }) | ~~ 1429 | .production("primary_expression", "LT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1430 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1431 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1432 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1433 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1434 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1435 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1436 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1437 | return output; | ~~~~~~~~~~~~~~ 1438 | }) | ~~ 1439 | .production("primary_expression", "GT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1440 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1441 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1442 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1443 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1444 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1445 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1446 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1447 | return output; | ~~~~~~~~~~~~~~ 1448 | }) | ~~ 1449 | .production("primary_expression", "LE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1450 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1451 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1452 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1453 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1454 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1455 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1456 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1457 | return output; | ~~~~~~~~~~~~~~ 1458 | }) | ~~ 1459 | .production("primary_expression", "GE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1460 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1461 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1462 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1463 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1464 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1465 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1466 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1467 | return output; | ~~~~~~~~~~~~~~ 1468 | }) | ~~ 1469 | .production("primary_expression", "EQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1470 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1471 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1472 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1473 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1474 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1475 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1476 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1477 | return output; | ~~~~~~~~~~~~~~ 1478 | }) | ~~ 1479 | .production("primary_expression", "NEQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1480 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1481 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1482 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1483 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1484 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1485 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1486 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1487 | return output; | ~~~~~~~~~~~~~~ 1488 | }) | ~~ 1489 | .production("primary_expression", "CONTAINS", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1490 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1491 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1492 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1493 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1494 | error_handle(op_token->getLocation(), "operator 'contains' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1495 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1496 | error_handle(op_token->getLocation(), "operator 'contains' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1497 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1498 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1499 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1500 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1501 | return output; | ~~~~~~~~~~~~~~ 1502 | }) | ~~ 1503 | .production("primary_expression", "ICONTAINS", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1504 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1505 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1506 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1507 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1508 | error_handle(op_token->getLocation(), "operator 'icontains' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1509 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1510 | error_handle(op_token->getLocation(), "operator 'icontains' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1511 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1512 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1513 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1514 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1515 | return output; | ~~~~~~~~~~~~~~ 1516 | }) | ~~ 1517 | .production("primary_expression", "MATCHES", "regexp", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1518 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1519 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1520 | auto right = std::move(args[2].getYaramodString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1521 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1522 | error_handle(op_token->getLocation(), "operator 'matches' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1523 | auto regexp_expression = std::make_shared(std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1524 | auto output = std::make_shared(std::move(left), op_token, std::move(regexp_expression)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1525 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1526 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1527 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1528 | return output; | ~~~~~~~~~~~~~~ 1529 | }) | ~~ 1530 | .production("primary_expression", "STARTSWITH", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1531 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1532 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1533 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1534 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1535 | error_handle(op_token->getLocation(), "operator 'startswith' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1536 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1537 | error_handle(op_token->getLocation(), "operator 'startswith' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1538 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1539 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1540 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1541 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1542 | return output; | ~~~~~~~~~~~~~~ 1543 | }) | ~~ 1544 | .production("primary_expression", "ISTARTSWITH", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1545 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1546 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1547 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1548 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1549 | error_handle(op_token->getLocation(), "operator 'istartswith' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1550 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1551 | error_handle(op_token->getLocation(), "operator 'istartswith' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1552 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1553 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1554 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1555 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1556 | return output; | ~~~~~~~~~~~~~~ 1557 | }) | ~~ 1558 | .production("primary_expression", "ENDSWITH", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1559 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1560 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1561 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1562 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1563 | error_handle(op_token->getLocation(), "operator 'endswith' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1564 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1565 | error_handle(op_token->getLocation(), "operator 'endswith' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1566 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1567 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1568 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1569 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1570 | return output; | ~~~~~~~~~~~~~~ 1571 | }) | ~~ 1572 | .production("primary_expression", "IENDSWITH", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1573 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1574 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1575 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1576 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1577 | error_handle(op_token->getLocation(), "operator 'iendswith' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1578 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1579 | error_handle(op_token->getLocation(), "operator 'iendswith' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1580 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1581 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1582 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1583 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1584 | return output; | ~~~~~~~~~~~~~~ 1585 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1573:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1573 | auto left = std::move(args[0].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1573:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1575:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1575 | auto right = std::move(args[2].getExpression()); | ^~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1575:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:213 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[8], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[19], const char (&)[8], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1586:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ 1391 | .production("NOT", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1392 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1396 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1397 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | return output; | ~~~~~~~~~~~~~~ 1399 | }) | ~~ 1400 | .production("DEFINED", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1401 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1402 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1403 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1404 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1405 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1406 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1407 | return output; | ~~~~~~~~~~~~~~ 1408 | }) | ~~ 1409 | .production("expression", "AND", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1410 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1411 | TokenIt and_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1412 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1413 | auto output = std::make_shared(std::move(left), and_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1414 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1415 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1416 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1417 | return output; | ~~~~~~~~~~~~~~ 1418 | }) | ~~ 1419 | .production("expression", "OR", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1420 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1421 | TokenIt or_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1422 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1423 | auto output = std::make_shared(std::move(left), or_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1424 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1425 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1426 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1427 | return output; | ~~~~~~~~~~~~~~ 1428 | }) | ~~ 1429 | .production("primary_expression", "LT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1430 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1431 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1432 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1433 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1434 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1435 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1436 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1437 | return output; | ~~~~~~~~~~~~~~ 1438 | }) | ~~ 1439 | .production("primary_expression", "GT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1440 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1441 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1442 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1443 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1444 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1445 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1446 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1447 | return output; | ~~~~~~~~~~~~~~ 1448 | }) | ~~ 1449 | .production("primary_expression", "LE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1450 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1451 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1452 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1453 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1454 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1455 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1456 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1457 | return output; | ~~~~~~~~~~~~~~ 1458 | }) | ~~ 1459 | .production("primary_expression", "GE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1460 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1461 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1462 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1463 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1464 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1465 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1466 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1467 | return output; | ~~~~~~~~~~~~~~ 1468 | }) | ~~ 1469 | .production("primary_expression", "EQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1470 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1471 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1472 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1473 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1474 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1475 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1476 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1477 | return output; | ~~~~~~~~~~~~~~ 1478 | }) | ~~ 1479 | .production("primary_expression", "NEQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1480 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1481 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1482 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1483 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1484 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1485 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1486 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1487 | return output; | ~~~~~~~~~~~~~~ 1488 | }) | ~~ 1489 | .production("primary_expression", "CONTAINS", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1490 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1491 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1492 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1493 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1494 | error_handle(op_token->getLocation(), "operator 'contains' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1495 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1496 | error_handle(op_token->getLocation(), "operator 'contains' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1497 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1498 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1499 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1500 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1501 | return output; | ~~~~~~~~~~~~~~ 1502 | }) | ~~ 1503 | .production("primary_expression", "ICONTAINS", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1504 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1505 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1506 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1507 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1508 | error_handle(op_token->getLocation(), "operator 'icontains' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1509 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1510 | error_handle(op_token->getLocation(), "operator 'icontains' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1511 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1512 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1513 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1514 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1515 | return output; | ~~~~~~~~~~~~~~ 1516 | }) | ~~ 1517 | .production("primary_expression", "MATCHES", "regexp", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1518 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1519 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1520 | auto right = std::move(args[2].getYaramodString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1521 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1522 | error_handle(op_token->getLocation(), "operator 'matches' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1523 | auto regexp_expression = std::make_shared(std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1524 | auto output = std::make_shared(std::move(left), op_token, std::move(regexp_expression)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1525 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1526 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1527 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1528 | return output; | ~~~~~~~~~~~~~~ 1529 | }) | ~~ 1530 | .production("primary_expression", "STARTSWITH", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1531 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1532 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1533 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1534 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1535 | error_handle(op_token->getLocation(), "operator 'startswith' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1536 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1537 | error_handle(op_token->getLocation(), "operator 'startswith' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1538 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1539 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1540 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1541 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1542 | return output; | ~~~~~~~~~~~~~~ 1543 | }) | ~~ 1544 | .production("primary_expression", "ISTARTSWITH", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1545 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1546 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1547 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1548 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1549 | error_handle(op_token->getLocation(), "operator 'istartswith' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1550 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1551 | error_handle(op_token->getLocation(), "operator 'istartswith' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1552 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1553 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1554 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1555 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1556 | return output; | ~~~~~~~~~~~~~~ 1557 | }) | ~~ 1558 | .production("primary_expression", "ENDSWITH", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1559 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1560 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1561 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1562 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1563 | error_handle(op_token->getLocation(), "operator 'endswith' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1564 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1565 | error_handle(op_token->getLocation(), "operator 'endswith' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1566 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1567 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1568 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1569 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1570 | return output; | ~~~~~~~~~~~~~~ 1571 | }) | ~~ 1572 | .production("primary_expression", "IENDSWITH", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1573 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1574 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1575 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1576 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1577 | error_handle(op_token->getLocation(), "operator 'iendswith' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1578 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1579 | error_handle(op_token->getLocation(), "operator 'iendswith' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1580 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1581 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1582 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1583 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1584 | return output; | ~~~~~~~~~~~~~~ 1585 | }) | ~~ 1586 | .production("primary_expression", "IEQUALS", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1587 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1588 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1589 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1590 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1591 | error_handle(op_token->getLocation(), "operator 'iequals' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1592 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1593 | error_handle(op_token->getLocation(), "operator 'iequals' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1594 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1595 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1596 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1597 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1598 | return output; | ~~~~~~~~~~~~~~ 1599 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1587:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1587 | auto left = std::move(args[0].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1587:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1589:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1589 | auto right = std::move(args[2].getExpression()); | ^~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1589:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:215 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[3], const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1603:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ 1391 | .production("NOT", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1392 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1396 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1397 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | return output; | ~~~~~~~~~~~~~~ 1399 | }) | ~~ 1400 | .production("DEFINED", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1401 | TokenIt not_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1402 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1403 | auto output = std::make_shared(not_token, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1404 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1405 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1406 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1407 | return output; | ~~~~~~~~~~~~~~ 1408 | }) | ~~ 1409 | .production("expression", "AND", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1410 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1411 | TokenIt and_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1412 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1413 | auto output = std::make_shared(std::move(left), and_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1414 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1415 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1416 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1417 | return output; | ~~~~~~~~~~~~~~ 1418 | }) | ~~ 1419 | .production("expression", "OR", "expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1420 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1421 | TokenIt or_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1422 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1423 | auto output = std::make_shared(std::move(left), or_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1424 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1425 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1426 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1427 | return output; | ~~~~~~~~~~~~~~ 1428 | }) | ~~ 1429 | .production("primary_expression", "LT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1430 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1431 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1432 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1433 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1434 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1435 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1436 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1437 | return output; | ~~~~~~~~~~~~~~ 1438 | }) | ~~ 1439 | .production("primary_expression", "GT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1440 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1441 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1442 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1443 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1444 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1445 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1446 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1447 | return output; | ~~~~~~~~~~~~~~ 1448 | }) | ~~ 1449 | .production("primary_expression", "LE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1450 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1451 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1452 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1453 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1454 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1455 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1456 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1457 | return output; | ~~~~~~~~~~~~~~ 1458 | }) | ~~ 1459 | .production("primary_expression", "GE", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1460 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1461 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1462 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1463 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1464 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1465 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1466 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1467 | return output; | ~~~~~~~~~~~~~~ 1468 | }) | ~~ 1469 | .production("primary_expression", "EQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1470 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1471 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1472 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1473 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1474 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1475 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1476 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1477 | return output; | ~~~~~~~~~~~~~~ 1478 | }) | ~~ 1479 | .production("primary_expression", "NEQ", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1480 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1481 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1482 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1483 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1484 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1485 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1486 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1487 | return output; | ~~~~~~~~~~~~~~ 1488 | }) | ~~ 1489 | .production("primary_expression", "CONTAINS", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1490 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1491 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1492 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1493 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1494 | error_handle(op_token->getLocation(), "operator 'contains' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1495 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1496 | error_handle(op_token->getLocation(), "operator 'contains' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1497 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1498 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1499 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1500 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1501 | return output; | ~~~~~~~~~~~~~~ 1502 | }) | ~~ 1503 | .production("primary_expression", "ICONTAINS", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1504 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1505 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1506 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1507 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1508 | error_handle(op_token->getLocation(), "operator 'icontains' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1509 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1510 | error_handle(op_token->getLocation(), "operator 'icontains' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1511 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1512 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1513 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1514 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1515 | return output; | ~~~~~~~~~~~~~~ 1516 | }) | ~~ 1517 | .production("primary_expression", "MATCHES", "regexp", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1518 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1519 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1520 | auto right = std::move(args[2].getYaramodString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1521 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1522 | error_handle(op_token->getLocation(), "operator 'matches' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1523 | auto regexp_expression = std::make_shared(std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1524 | auto output = std::make_shared(std::move(left), op_token, std::move(regexp_expression)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1525 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1526 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1527 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1528 | return output; | ~~~~~~~~~~~~~~ 1529 | }) | ~~ 1530 | .production("primary_expression", "STARTSWITH", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1531 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1532 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1533 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1534 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1535 | error_handle(op_token->getLocation(), "operator 'startswith' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1536 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1537 | error_handle(op_token->getLocation(), "operator 'startswith' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1538 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1539 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1540 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1541 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1542 | return output; | ~~~~~~~~~~~~~~ 1543 | }) | ~~ 1544 | .production("primary_expression", "ISTARTSWITH", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1545 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1546 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1547 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1548 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1549 | error_handle(op_token->getLocation(), "operator 'istartswith' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1550 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1551 | error_handle(op_token->getLocation(), "operator 'istartswith' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1552 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1553 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1554 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1555 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1556 | return output; | ~~~~~~~~~~~~~~ 1557 | }) | ~~ 1558 | .production("primary_expression", "ENDSWITH", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1559 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1560 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1561 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1562 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1563 | error_handle(op_token->getLocation(), "operator 'endswith' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1564 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1565 | error_handle(op_token->getLocation(), "operator 'endswith' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1566 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1567 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1568 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1569 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1570 | return output; | ~~~~~~~~~~~~~~ 1571 | }) | ~~ 1572 | .production("primary_expression", "IENDSWITH", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1573 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1574 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1575 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1576 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1577 | error_handle(op_token->getLocation(), "operator 'iendswith' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1578 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1579 | error_handle(op_token->getLocation(), "operator 'iendswith' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1580 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1581 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1582 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1583 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1584 | return output; | ~~~~~~~~~~~~~~ 1585 | }) | ~~ 1586 | .production("primary_expression", "IEQUALS", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1587 | auto left = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1588 | TokenIt op_token = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1589 | auto right = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1590 | if (!left->isString()) | ~~~~~~~~~~~~~~~~~~~~~~ 1591 | error_handle(op_token->getLocation(), "operator 'iequals' expects string on the left-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1592 | if (!right->isString()) | ~~~~~~~~~~~~~~~~~~~~~~~ 1593 | error_handle(op_token->getLocation(), "operator 'iequals' expects string on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1594 | auto output = std::make_shared(std::move(left), op_token, std::move(right)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1595 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1596 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1597 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1598 | return output; | ~~~~~~~~~~~~~~ 1599 | }) | ~~ 1600 | .production("primary_expression", [](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1601 | return std::move(args[0]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1602 | }).precedence(0, pog::Associativity::Left) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1603 | .production("LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1604 | auto expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1605 | auto type = expr->getType(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1606 | auto output = std::make_shared(args[0].getTokenIt(), std::move(expr), args[2].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1607 | output->setType(type); | ~~~~~~~~~~~~~~~~~~~~~~ 1608 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1609 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1610 | return output; | ~~~~~~~~~~~~~~ 1611 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1604:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1604 | auto expr = std::move(args[1].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1604:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:216 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[20], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[20], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[15], const char (&)[3], const char (&)[20], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1615:18: required from here 1615 | expr.production("for_expression", "OF", "expression_iterable", [this](auto&& args) -> Value { | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1616 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1617 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1618 | auto array = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1619 | auto output = std::make_shared(std::move(for_expr), of, std::move(array)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1620 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1621 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1622 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1623 | return output; | ~~~~~~~~~~~~~~ 1624 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1616:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1616 | auto for_expr = std::move(args[0].getExpression()); | ^~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1616:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1618:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1618 | auto array = std::move(args[2].getExpression()); | ^~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1618:30: note: remove 'std::move' call [ 35%] Building CXX object src/CMakeFiles/yaramod-obj.dir/types/plain_string.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/types/plain_string.cpp.o -MF CMakeFiles/yaramod-obj.dir/types/plain_string.cpp.o.d -o CMakeFiles/yaramod-obj.dir/types/plain_string.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/types/plain_string.cpp /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:195 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[11], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[8], const char (&)[3], const char (&)[11], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[19], const char (&)[8], const char (&)[3], const char (&)[11], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1368:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ 1368 | .production("primary_expression", "PERCENT", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1370 | TokenIt percent = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | std::uint64_t value = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | if (strToNum(for_expr->getText(), value)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1373 | { | ~ 1374 | if (value == 0 || value > 100) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1375 | { | ~ 1376 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1377 | ss << "Percentage must be between 1 and 100 (inclusive). Got " << value << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | error_handle(percent->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | } | ~ 1380 | } | ~ 1381 | auto percentual_expr = std::make_shared(std::move(for_expr), percent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | percentual_expr->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1383 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1384 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1385 | auto output = std::make_shared(std::move(percentual_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1386 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1387 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | return output; | ~~~~~~~~~~~~~~ 1390 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1369:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1369 | auto for_expr = std::move(args[0].getExpression()); | ^~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1369:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1384:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1384 | auto set = std::move(args[3].getExpression()); | ^~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1384:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:193 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[11], const char (&)[3], const char (&)[6], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[11], const char (&)[3], const char (&)[6], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[15], const char (&)[3], const char (&)[11], const char (&)[3], const char (&)[6], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1337:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1338:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1338 | auto for_expr = std::move(args[0].getExpression()); | ^~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1338:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1340:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1340 | auto set = std::move(args[2].getExpression()); | ^~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1340:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:194 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[11], const char (&)[3], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[11], const char (&)[3], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[15], const char (&)[3], const char (&)[11], const char (&)[3], const char (&)[19], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1349:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~~ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ 1317 | .production("for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1318 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1320 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1321 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1322 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1323 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | return output; | ~~~~~~~~~~~~~~ 1326 | }) | ~~ 1327 | .production("for_expression", "OF", "rule_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | auto output = std::make_shared(std::move(for_expr), of, std::move(set)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1332 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1333 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1334 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 | return output; | ~~~~~~~~~~~~~~ 1336 | }) | ~~ 1337 | .production("for_expression", "OF", "string_set", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1338 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1340 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | TokenIt in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1342 | auto range = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), in, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1345 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1346 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 | return output; | ~~~~~~~~~~~~~~ 1348 | }) | ~~ 1349 | .production("for_expression", "OF", "string_set", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | auto for_expr = std::move(args[0].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1351 | TokenIt of = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | auto set = std::move(args[2].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1353 | TokenIt at = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | Expression::Ptr offset = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | | 1356 | if (!offset->isInt()) { | ~~~~~~~~~~~~~~~~~~~~~~~ 1357 | std::stringstream ss; | ~~~~~~~~~~~~~~~~~~~~~ 1358 | ss << "Operator 'at' expects integer on the right-hand side of the expression. Got " << offset->getText() << "."; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | error_handle(args[4].getTokenIt()->getLocation(), ss.str()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | auto output = std::make_shared(std::move(for_expr), of, std::move(set), at, offset); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1366 | return output; | ~~~~~~~~~~~~~~ 1367 | }) | ~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1350:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1350 | auto for_expr = std::move(args[0].getExpression()); | ^~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1350:30: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1352:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1352 | auto set = std::move(args[2].getExpression()); | ^~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1352:30: note: remove 'std::move' call [ 37%] Building CXX object src/CMakeFiles/yaramod-obj.dir/types/rule.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/types/rule.cpp.o -MF CMakeFiles/yaramod-obj.dir/types/rule.cpp.o.d -o CMakeFiles/yaramod-obj.dir/types/rule.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/types/rule.cpp /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:190 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[11], yaramod::ParserDriver::defineGrammar()::, const char (&)[6], const char (&)[3], const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[15], const char (&)[3], const char (&)[11], yaramod::ParserDriver::defineGrammar()::, const char (&)[6], const char (&)[3], const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[4], const char (&)[15], const char (&)[3], const char (&)[11], yaramod::ParserDriver::defineGrammar()::, const char (&)[6], const char (&)[3], const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1290:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~~ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ 1290 | .production( | ~~~~~~~~~~~^ 1291 | "FOR", "for_expression", "OF", "string_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1292 | if (isInStringLoop()) | ~~~~~~~~~~~~~~~~~~~~~ 1293 | error_handle(args[0].getTokenIt()->getLocation(), "Nesting of for-loop over strings is not allowed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1294 | stringLoopEnter(); | ~~~~~~~~~~~~~~~~~~ 1295 | return {}; | ~~~~~~~~~~ 1296 | }, | ~~ 1297 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1298 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | TokenIt of = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | auto set = std::move(args[3].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1302 | | 1303 | TokenIt lp = args[6].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1304 | auto expr = args[7].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1305 | TokenIt rp = args[8].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1306 | | 1307 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1308 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1309 | auto output = std::make_shared(for_token, std::move(for_expr), of, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | stringLoopLeave(); | ~~~~~~~~~~~~~~~~~~ 1314 | return output; | ~~~~~~~~~~~~~~ 1315 | } | ~ 1316 | ) | ~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1299:38: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1299 | auto for_expr = std::move(args[1].getExpression()); | ^~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1299:38: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1301:38: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1301 | auto set = std::move(args[3].getExpression()); | ^~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1301:38: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:184 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[3], const char (&)[19], yaramod::ParserDriver::defineGrammar()::, const char (&)[6], const char (&)[3], const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[15], const char (&)[3], const char (&)[3], const char (&)[19], yaramod::ParserDriver::defineGrammar()::, const char (&)[6], const char (&)[3], const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[4], const char (&)[15], const char (&)[3], const char (&)[3], const char (&)[19], yaramod::ParserDriver::defineGrammar()::, const char (&)[6], const char (&)[3], const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1143:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~^ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1152:38: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1152 | auto for_expr = std::move(args[1].getExpression()); | ^~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1152:38: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1156:38: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1156 | auto set = std::move(args[4].getExpression()); | ^~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1156:38: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:186 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[3], const char (&)[11], yaramod::ParserDriver::defineGrammar()::, const char (&)[6], const char (&)[3], const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[15], const char (&)[3], const char (&)[3], const char (&)[11], yaramod::ParserDriver::defineGrammar()::, const char (&)[6], const char (&)[3], const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[4], const char (&)[15], const char (&)[3], const char (&)[3], const char (&)[11], yaramod::ParserDriver::defineGrammar()::, const char (&)[6], const char (&)[3], const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1171:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~^ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1208:38: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1208 | auto for_expr = std::move(args[1].getExpression()); | ^~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1208:38: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1211:38: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1211 | auto array = std::move(args[4].getExpression()); | ^~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1211:38: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp: In instantiation of 'yaramod::ParserDriver::defineGrammar():: [with auto:188 = std::vector]': /usr/include/c++/14/bits/invoke.h:61:36: required from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = yaramod::Value; _Fn = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}]' 61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/invoke.h:114:35: required from 'constexpr std::enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = yaramod::Value; _Callable = yaramod::ParserDriver::defineGrammar()::&; _Args = {vector >}; enable_if_t<((bool)is_invocable_r_v<_Res, _Callable, _Args ...>), _Res> = yaramod::Value]' 114 | return std::__invoke_impl<__type>(__tag{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 115 | std::forward<_Callable>(__fn), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/std_function.h:290:30: required from 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = yaramod::Value; _Functor = yaramod::ParserDriver::defineGrammar()::; _ArgTypes = {std::vector >&&}]' 290 | return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 291 | std::forward<_ArgTypes>(__args)...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' 118 | _production(sa, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:118:14: recursively required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[3], const char (&)[6], const char (&)[3], const char (&)[3], const char (&)[11], yaramod::ParserDriver::defineGrammar()::, const char (&)[6], const char (&)[3], const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:118:14: required from 'void pog::RuleBuilder::_production(std::vector&, const std::string&, Args&& ...) [with Args = {const char (&)[15], const char (&)[3], const char (&)[6], const char (&)[3], const char (&)[3], const char (&)[11], yaramod::ParserDriver::defineGrammar()::, const char (&)[6], const char (&)[3], const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value; std::string = std::__cxx11::basic_string]' /usr/include/pog/rule_builder.h:101:14: required from 'pog::RuleBuilder& pog::RuleBuilder::production(Args&& ...) [with Args = {const char (&)[4], const char (&)[15], const char (&)[3], const char (&)[6], const char (&)[3], const char (&)[3], const char (&)[11], yaramod::ParserDriver::defineGrammar()::, const char (&)[6], const char (&)[3], const char (&)[11], const char (&)[3], yaramod::ParserDriver::defineGrammar()::}; ValueT = yaramod::Value]' 101 | _production(_rhss.back().symbols_and_action, std::forward(args)...); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1227:14: required from here 1090 | auto& expr = _parser.rule("expression") // Expression::Ptr | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1091 | .production("boolean", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1092 | auto output = std::make_shared(currentTokenStream(), args[0].getTokenIt()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1093 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | return output; | ~~~~~~~~~~~~~~ 1096 | }) | ~~ 1097 | .production("STRING_ID", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1099 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1100 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1104 | auto output = std::make_shared(std::move(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1105 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1106 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1107 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | return output; | ~~~~~~~~~~~~~~ 1109 | }) | ~~ 1110 | .production("STRING_ID", "AT", "primary_expression", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1112 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1113 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1114 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1117 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1118 | Expression::Ptr expr = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1119 | if (!expr->isInt()) | ~~~~~~~~~~~~~~~~~~~ 1120 | error_handle(args[1].getTokenIt()->getLocation(), "Operator 'at' expects integer on the right-hand side of the expression"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1121 | auto output = std::make_shared(id, op, std::move(expr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1125 | return output; | ~~~~~~~~~~~~~~ 1126 | }) | ~~ 1127 | .production("STRING_ID", "IN", "range", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1128 | TokenIt id = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | assert(id->isString()); | ~~~~~~~~~~~~~~~~~~~~~~~ 1130 | if (!stringExists(id->getString())) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | error_handle(id->getLocation(), "Reference to undefined string '" + id->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1132 | if (id->getString().size() > 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1133 | id->setValue(findStringDefinition(id->getString())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 | TokenIt op = args[1].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | Expression::Ptr range = args[2].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | | 1137 | auto output = std::make_shared(id, op, std::move(range)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1139 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1140 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | return output; | ~~~~~~~~~~~~~~ 1142 | }) | ~~ 1143 | .production( | ~~~~~~~~~~~~ 1144 | "FOR", "for_expression", "ID", "IN", "for_expression_set", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1145 | auto symbol = std::make_shared(args[2].getTokenIt()->getString(), Expression::Type::Int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | return {}; | ~~~~~~~~~~ 1149 | }, | ~~ 1150 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1152 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1154 | | 1155 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | auto set = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1158 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1159 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1160 | | 1161 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1162 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1163 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1164 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(set), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | return output; | ~~~~~~~~~~~~~~ 1169 | } | ~ 1170 | ) | ~ 1171 | .production( | ~~~~~~~~~~~~ 1172 | "FOR", "for_expression", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1173 | const auto& iterable = args[4].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1174 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1176 | if (!parentSymbol->isArray()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1177 | { | ~ 1178 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1179 | error_handle((++args[3].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an array"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1180 | else | ~~~~ 1181 | { | ~ 1182 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | } | ~ 1186 | } | ~ 1187 | | 1188 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | | 1190 | std::shared_ptr symbol; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | { | ~ 1193 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | symbol = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | symbol->setName(args[2].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1196 | } | ~ 1197 | else | ~~~~ 1198 | { | ~ 1199 | symbol = std::make_shared(args[2].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | } | ~ 1201 | | 1202 | if (!addLocalSymbol(symbol)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1203 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | return {}; | ~~~~~~~~~~ 1205 | }, | ~~ 1206 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1207 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1209 | TokenIt id = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1210 | TokenIt op_in = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1211 | auto array = std::move(args[4].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1212 | | 1213 | TokenIt lp = args[7].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1214 | auto expr = args[8].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 | TokenIt rp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1216 | | 1217 | removeLocalSymbol(id->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1218 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1219 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1220 | auto output = std::make_shared(for_token, std::move(for_expr), id, op_in, std::move(array), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1221 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1222 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1223 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1224 | return output; | ~~~~~~~~~~~~~~ 1225 | } | ~ 1226 | ) | ~ 1227 | .production( | ~~~~~~~~~~~^ 1228 | "FOR", "for_expression", "ID", "COMMA", "ID", "IN", "identifier", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1229 | const auto& iterable = args[6].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 | std::shared_ptr parentSymbol = std::static_pointer_cast(iterable)->getSymbol(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1231 | assert(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~ 1232 | if (!parentSymbol->isDictionary()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1233 | { | ~ 1234 | if (!incompleteMode() || !parentSymbol->isUndefined()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1235 | error_handle((++args[5].getTokenIt())->getLocation(), "Identifier '" + parentSymbol->getName() + "' is not an dictionary"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1236 | else | ~~~~ 1237 | { | ~ 1238 | auto parentExpr = std::static_pointer_cast(iterable); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1239 | const auto& parentTokenText = parentExpr->getSymbolToken()->getText(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1240 | parentExpr->setSymbol(std::make_shared(parentTokenText, ExpressionType::Undefined)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1241 | } | ~ 1242 | } | ~ 1243 | | 1244 | std::shared_ptr symbol1 = std::make_shared(args[2].getTokenIt()->getString(), ExpressionType::String); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1245 | if (!addLocalSymbol(symbol1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1246 | error_handle(args[2].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[2].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1247 | | 1248 | std::shared_ptr iterParentSymbol = std::static_pointer_cast(parentSymbol); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1249 | | 1250 | std::shared_ptr symbol2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1251 | if (iterParentSymbol->isStructured()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1252 | { | ~ 1253 | auto s = std::static_pointer_cast(iterParentSymbol->getStructuredElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1254 | symbol2 = std::make_shared(*s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1255 | symbol2->setName(args[4].getTokenIt()->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1256 | } | ~ 1257 | else | ~~~~ 1258 | { | ~ 1259 | symbol2 = std::make_shared(args[4].getTokenIt()->getString(), iterParentSymbol->getElementType()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1260 | } | ~ 1261 | | 1262 | if (!addLocalSymbol(symbol2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1263 | error_handle(args[4].getTokenIt()->getLocation(), "Redefinition of identifier '" + args[4].getTokenIt()->getString() + "'"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1264 | return {}; | ~~~~~~~~~~ 1265 | }, | ~~ 1266 | "COLON", "LP", "expression", "RP", [&](auto&& args) -> Value { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1267 | TokenIt for_token = args[0].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | auto for_expr = std::move(args[1].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1269 | TokenIt id1 = args[2].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1270 | TokenIt comma = args[3].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1271 | TokenIt id2 = args[4].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1272 | TokenIt op_in = args[5].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1273 | auto dict = std::move(args[6].getExpression()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1274 | | 1275 | TokenIt lp = args[9].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1276 | auto expr = args[10].getExpression(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1277 | TokenIt rp = args[11].getTokenIt(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1278 | | 1279 | removeLocalSymbol(id1->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1280 | removeLocalSymbol(id2->getString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1281 | lp->setType(TokenType::LP_WITH_SPACE_AFTER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1282 | rp->setType(TokenType::RP_WITH_SPACE_BEFORE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1283 | auto output = std::make_shared(for_token, std::move(for_expr), id1, comma, id2, op_in, std::move(dict), lp, std::move(expr), rp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1284 | output->setType(Expression::Type::Bool); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1285 | output->setTokenStream(currentTokenStream()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286 | output->setUid(_uidGen.next()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1287 | return output; | ~~~~~~~~~~~~~~ 1288 | } | ~ 1289 | ) | ~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1268:38: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1268 | auto for_expr = std::move(args[1].getExpression()); | ^~~~~~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1268:38: note: remove 'std::move' call /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1273:38: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 1273 | auto dict = std::move(args[6].getExpression()); | ^~~~ /build/reproducible-path/yaramod-3.21.0/src/parser/parser_driver.cpp:1273:38: note: remove 'std::move' call [ 40%] Building CXX object src/CMakeFiles/yaramod-obj.dir/types/sections_summary.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/types/sections_summary.cpp.o -MF CMakeFiles/yaramod-obj.dir/types/sections_summary.cpp.o.d -o CMakeFiles/yaramod-obj.dir/types/sections_summary.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/types/sections_summary.cpp [ 43%] Building CXX object src/CMakeFiles/yaramod-obj.dir/types/token.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/types/token.cpp.o -MF CMakeFiles/yaramod-obj.dir/types/token.cpp.o.d -o CMakeFiles/yaramod-obj.dir/types/token.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/types/token.cpp [ 45%] Building CXX object src/CMakeFiles/yaramod-obj.dir/types/token_stream.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/types/token_stream.cpp.o -MF CMakeFiles/yaramod-obj.dir/types/token_stream.cpp.o.d -o CMakeFiles/yaramod-obj.dir/types/token_stream.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/types/token_stream.cpp [ 48%] Building CXX object src/CMakeFiles/yaramod-obj.dir/types/yara_file.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/types/yara_file.cpp.o -MF CMakeFiles/yaramod-obj.dir/types/yara_file.cpp.o.d -o CMakeFiles/yaramod-obj.dir/types/yara_file.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/types/yara_file.cpp [ 51%] Building CXX object src/CMakeFiles/yaramod-obj.dir/utils/json.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/utils/json.cpp.o -MF CMakeFiles/yaramod-obj.dir/utils/json.cpp.o.d -o CMakeFiles/yaramod-obj.dir/utils/json.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/utils/json.cpp In file included from /usr/include/c++/14/map:62, from /usr/include/nlohmann/detail/conversions/from_json.hpp:15, from /usr/include/nlohmann/adl_serializer.hpp:14, from /usr/include/nlohmann/json.hpp:34, from /build/reproducible-path/yaramod-3.21.0/include/yaramod/utils/json.h:9, from /build/reproducible-path/yaramod-3.21.0/src/utils/json.cpp:11: /usr/include/c++/14/bits/stl_tree.h: In function 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_emplace_hint_unique(const_iterator, _Args&& ...) [with _Args = {const std::piecewise_construct_t&, std::tuple, std::allocator >&>, std::tuple<>}; _Key = std::__cxx11::basic_string; _Val = std::pair, nlohmann::json_abi_v3_11_3::basic_json<> >; _KeyOfValue = std::_Select1st, nlohmann::json_abi_v3_11_3::basic_json<> > >; _Compare = std::less; _Alloc = std::allocator, nlohmann::json_abi_v3_11_3::basic_json<> > >]': /usr/include/c++/14/bits/stl_tree.h:2454:7: note: parameter passing for argument of type 'std::_Rb_tree, std::pair, nlohmann::json_abi_v3_11_3::basic_json<> >, std::_Select1st, nlohmann::json_abi_v3_11_3::basic_json<> > >, std::less, std::allocator, nlohmann::json_abi_v3_11_3::basic_json<> > > >::const_iterator' changed in GCC 7.1 2454 | _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/vector:65, from /usr/include/c++/14/functional:64, from /usr/include/nlohmann/json.hpp:23: /usr/include/c++/14/bits/stl_uninitialized.h: In function '_ForwardIterator std::__do_uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator*, vector, allocator > > >; _ForwardIterator = nlohmann::json_abi_v3_11_3::basic_json<>*]': /usr/include/c++/14/bits/stl_uninitialized.h:113:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator*, std::vector, std::allocator > > >' changed in GCC 7.1 113 | __do_uninit_copy(_InputIterator __first, _InputIterator __last, | ^~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_uninitialized.h:113:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator*, std::vector, std::allocator > > >' changed in GCC 7.1 In static member function 'static _ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator*, std::vector, std::allocator > > >; _ForwardIterator = nlohmann::json_abi_v3_11_3::basic_json<>*; bool _TrivialValueTypes = false]', inlined from '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator*, vector, allocator > > >; _ForwardIterator = nlohmann::json_abi_v3_11_3::basic_json<>*]' at /usr/include/c++/14/bits/stl_uninitialized.h:185:15, inlined from '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, allocator<_Tp>&) [with _InputIterator = __gnu_cxx::__normal_iterator*, vector, allocator > > >; _ForwardIterator = nlohmann::json_abi_v3_11_3::basic_json<>*; _Tp = nlohmann::json_abi_v3_11_3::basic_json<>]' at /usr/include/c++/14/bits/stl_uninitialized.h:373:37, inlined from 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = nlohmann::json_abi_v3_11_3::basic_json<>; _Alloc = std::allocator >]' at /usr/include/c++/14/bits/stl_vector.h:606:31, inlined from 'void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = std::vector, std::allocator > >; _Args = {const std::vector, std::allocator >, bool, long long int, long long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector >, void>, std::allocator, std::allocator >, bool, long long int, long long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector >, void> > >&}; _Tp = std::vector, std::allocator > >]' at /usr/include/c++/14/bits/new_allocator.h:191:4, inlined from 'static void std::allocator_traits >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = std::vector, std::allocator > >; _Args = {const std::vector, std::allocator >, bool, long long int, long long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector >, void>, std::allocator, std::allocator >, bool, long long int, long long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector >, void> > >&}; _Tp = std::vector, std::allocator > >]' at /usr/include/c++/14/bits/alloc_traits.h:534:17, inlined from 'static T* nlohmann::json_abi_v3_11_3::basic_json::create(Args&& ...) [with T = std::vector, std::allocator > >; Args = {const std::vector, std::allocator >, bool, long long int, long long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector >, void>, std::allocator, std::allocator >, bool, long long int, long long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector >, void> > >&}; ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string; BooleanType = bool; NumberIntegerType = long long int; NumberUnsignedType = long long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::json_abi_v3_11_3::adl_serializer; BinaryType = std::vector; CustomBaseClass = void]' at /usr/include/nlohmann/json.hpp:388:35, inlined from 'nlohmann::json_abi_v3_11_3::basic_json::json_value::json_value(const nlohmann::json_abi_v3_11_3::basic_json::array_t&) [with ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string; BooleanType = bool; NumberIntegerType = long long int; NumberUnsignedType = long long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::json_abi_v3_11_3::adl_serializer; BinaryType = std::vector; CustomBaseClass = void]' at /usr/include/nlohmann/json.hpp:537:65, inlined from 'nlohmann::json_abi_v3_11_3::basic_json::basic_json(const nlohmann::json_abi_v3_11_3::basic_json&) [with ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string; BooleanType = bool; NumberIntegerType = long long int; NumberUnsignedType = long long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::json_abi_v3_11_3::adl_serializer; BinaryType = std::vector; CustomBaseClass = void]' at /usr/include/nlohmann/json.hpp:1162:32: /usr/include/c++/14/bits/stl_uninitialized.h:137:39: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator*, std::vector, std::allocator > > >' changed in GCC 7.1 137 | { return std::__do_uninit_copy(__first, __last, __result); } | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/map:63: In member function 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::__cxx11::basic_string; _Tp = nlohmann::json_abi_v3_11_3::basic_json<>; _Compare = std::less; _Alloc = std::allocator, nlohmann::json_abi_v3_11_3::basic_json<> > >]', inlined from 'bool nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser::key(string_t&) [with BasicJsonType = nlohmann::json_abi_v3_11_3::basic_json<>]' at /usr/include/nlohmann/detail/input/json_sax.hpp:441:83: /usr/include/c++/14/bits/stl_map.h:513:44: note: parameter passing for argument of type 'std::_Rb_tree, std::pair, nlohmann::json_abi_v3_11_3::basic_json<> >, std::_Select1st, nlohmann::json_abi_v3_11_3::basic_json<> > >, std::less, std::allocator, nlohmann::json_abi_v3_11_3::basic_json<> > > >::const_iterator' changed in GCC 7.1 513 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 514 | std::tuple(__k), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 515 | std::tuple<>()); | ~~~~~~~~~~~~~~~ In static member function 'static _ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator*, std::vector, std::allocator > > >; _ForwardIterator = nlohmann::json_abi_v3_11_3::basic_json<>*; bool _TrivialValueTypes = false]', inlined from '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator*, vector, allocator > > >; _ForwardIterator = nlohmann::json_abi_v3_11_3::basic_json<>*]' at /usr/include/c++/14/bits/stl_uninitialized.h:185:15, inlined from '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, allocator<_Tp>&) [with _InputIterator = __gnu_cxx::__normal_iterator*, vector, allocator > > >; _ForwardIterator = nlohmann::json_abi_v3_11_3::basic_json<>*; _Tp = nlohmann::json_abi_v3_11_3::basic_json<>]' at /usr/include/c++/14/bits/stl_uninitialized.h:373:37, inlined from 'std::vector<_Tp, _Alloc>::pointer std::vector<_Tp, _Alloc>::_M_allocate_and_copy(size_type, _ForwardIterator, _ForwardIterator) [with _ForwardIterator = __gnu_cxx::__normal_iterator*, std::vector, std::allocator > > >; _Tp = nlohmann::json_abi_v3_11_3::basic_json<>; _Alloc = std::allocator >]' at /usr/include/c++/14/bits/stl_vector.h:1624:35, inlined from 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = nlohmann::json_abi_v3_11_3::basic_json<>; _Alloc = std::allocator >]' at /usr/include/c++/14/bits/vector.tcc:238:44, inlined from 'void nlohmann::json_abi_v3_11_3::detail::from_json_array_impl(const BasicJsonType&, typename BasicJsonType::array_t&, priority_tag<3>) [with BasicJsonType = nlohmann::json_abi_v3_11_3::basic_json<>]' at /usr/include/nlohmann/detail/conversions/from_json.hpp:196:9, inlined from 'decltype (((nlohmann::json_abi_v3_11_3::detail::from_json_array_impl(j, arr, nlohmann::json_abi_v3_11_3::detail::priority_tag<3>{}), j.get()), void())) nlohmann::json_abi_v3_11_3::detail::from_json(const BasicJsonType&, ConstructibleArrayType&) [with BasicJsonType = nlohmann::json_abi_v3_11_3::basic_json<>; ConstructibleArrayType = std::vector, std::allocator > >; typename std::enable_if<((((is_constructible_array_type::value && (! is_constructible_object_type::value)) && (! is_constructible_string_type::value)) && (! std::is_same::value)) && (! is_basic_json::value)), int>::type = 0]' at /usr/include/nlohmann/detail/conversions/from_json.hpp:273:25: /usr/include/c++/14/bits/stl_uninitialized.h:137:39: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator*, std::vector, std::allocator > > >' changed in GCC 7.1 137 | { return std::__do_uninit_copy(__first, __last, __result); } | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ In member function 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::__cxx11::basic_string; _Tp = nlohmann::json_abi_v3_11_3::basic_json<>; _Compare = std::less; _Alloc = std::allocator, nlohmann::json_abi_v3_11_3::basic_json<> > >]', inlined from 'bool nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser::key(string_t&) [with BasicJsonType = nlohmann::json_abi_v3_11_3::basic_json<>]' at /usr/include/nlohmann/detail/input/json_sax.hpp:246:79, inlined from 'bool nlohmann::json_abi_v3_11_3::detail::parser::sax_parse_internal(SAX*) [with SAX = nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser >; BasicJsonType = nlohmann::json_abi_v3_11_3::basic_json<>; InputAdapterType = nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator > >]' at /usr/include/nlohmann/detail/input/parser.hpp:219:29: /usr/include/c++/14/bits/stl_map.h:513:44: note: parameter passing for argument of type 'std::_Rb_tree, std::pair, nlohmann::json_abi_v3_11_3::basic_json<> >, std::_Select1st, nlohmann::json_abi_v3_11_3::basic_json<> > >, std::less, std::allocator, nlohmann::json_abi_v3_11_3::basic_json<> > > >::const_iterator' changed in GCC 7.1 513 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 514 | std::tuple(__k), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 515 | std::tuple<>()); | ~~~~~~~~~~~~~~~ In member function 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::__cxx11::basic_string; _Tp = nlohmann::json_abi_v3_11_3::basic_json<>; _Compare = std::less; _Alloc = std::allocator, nlohmann::json_abi_v3_11_3::basic_json<> > >]', inlined from 'bool nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser::key(string_t&) [with BasicJsonType = nlohmann::json_abi_v3_11_3::basic_json<>]' at /usr/include/nlohmann/detail/input/json_sax.hpp:246:79, inlined from 'bool nlohmann::json_abi_v3_11_3::detail::parser::sax_parse_internal(SAX*) [with SAX = nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser >; BasicJsonType = nlohmann::json_abi_v3_11_3::basic_json<>; InputAdapterType = nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator > >]' at /usr/include/nlohmann/detail/input/parser.hpp:430:21: /usr/include/c++/14/bits/stl_map.h:513:44: note: parameter passing for argument of type 'std::_Rb_tree, std::pair, nlohmann::json_abi_v3_11_3::basic_json<> >, std::_Select1st, nlohmann::json_abi_v3_11_3::basic_json<> > >, std::less, std::allocator, nlohmann::json_abi_v3_11_3::basic_json<> > > >::const_iterator' changed in GCC 7.1 513 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 514 | std::tuple(__k), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 515 | std::tuple<>()); | ~~~~~~~~~~~~~~~ [ 54%] Building CXX object src/CMakeFiles/yaramod-obj.dir/utils/filesystem_operations.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/utils/filesystem_operations.cpp.o -MF CMakeFiles/yaramod-obj.dir/utils/filesystem_operations.cpp.o.d -o CMakeFiles/yaramod-obj.dir/utils/filesystem_operations.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/utils/filesystem_operations.cpp [ 56%] Building CXX object src/CMakeFiles/yaramod-obj.dir/utils/utils.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/utils/utils.cpp.o -MF CMakeFiles/yaramod-obj.dir/utils/utils.cpp.o.d -o CMakeFiles/yaramod-obj.dir/utils/utils.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/utils/utils.cpp [ 59%] Building CXX object src/CMakeFiles/yaramod-obj.dir/yaramod.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DFMT_SHARED -DYARAMOD_OS_LINUX -I/build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/CMakeFiles/yaramod-obj.dir/yaramod.cpp.o -MF CMakeFiles/yaramod-obj.dir/yaramod.cpp.o.d -o CMakeFiles/yaramod-obj.dir/yaramod.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/yaramod.cpp make[4]: Leaving directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' [ 59%] Built target yaramod-obj make -f src/CMakeFiles/yaramod-static.dir/build.make src/CMakeFiles/yaramod-static.dir/depend make -f src/CMakeFiles/yaramod.dir/build.make src/CMakeFiles/yaramod.dir/depend make[4]: Entering directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /build/reproducible-path/yaramod-3.21.0 /build/reproducible-path/yaramod-3.21.0/src /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src/CMakeFiles/yaramod-static.dir/DependInfo.cmake "--color=" make[4]: Entering directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /build/reproducible-path/yaramod-3.21.0 /build/reproducible-path/yaramod-3.21.0/src /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src/CMakeFiles/yaramod.dir/DependInfo.cmake "--color=" make[4]: Leaving directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' make[4]: Leaving directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' make -f src/CMakeFiles/yaramod-static.dir/build.make src/CMakeFiles/yaramod-static.dir/build make -f src/CMakeFiles/yaramod.dir/build.make src/CMakeFiles/yaramod.dir/build make[4]: Entering directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' make[4]: Entering directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' [ 64%] Linking CXX shared library libyaramod.so [ 64%] Linking CXX static library libyaramod.a cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/cmake -P CMakeFiles/yaramod-static.dir/cmake_clean_target.cmake cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/yaramod.dir/link.txt --verbose=1 /usr/bin/c++ -fPIC -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -pthread -Wl,--push-state,--as-needed -Wl,--pop-state -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libyaramod.so.0 -o libyaramod.so.3.21.0 "CMakeFiles/yaramod-obj.dir/builder/yara_expression_builder.cpp.o" "CMakeFiles/yaramod-obj.dir/builder/yara_file_builder.cpp.o" "CMakeFiles/yaramod-obj.dir/builder/yara_hex_string_builder.cpp.o" "CMakeFiles/yaramod-obj.dir/builder/yara_rule_builder.cpp.o" "CMakeFiles/yaramod-obj.dir/parser/parser_driver.cpp.o" "CMakeFiles/yaramod-obj.dir/types/hex_string.cpp.o" "CMakeFiles/yaramod-obj.dir/types/literal.cpp.o" "CMakeFiles/yaramod-obj.dir/types/meta.cpp.o" "CMakeFiles/yaramod-obj.dir/types/variable.cpp.o" "CMakeFiles/yaramod-obj.dir/types/modules/module.cpp.o" "CMakeFiles/yaramod-obj.dir/types/modules/module_pool.cpp.o" "CMakeFiles/yaramod-obj.dir/types/plain_string.cpp.o" "CMakeFiles/yaramod-obj.dir/types/rule.cpp.o" "CMakeFiles/yaramod-obj.dir/types/sections_summary.cpp.o" "CMakeFiles/yaramod-obj.dir/types/token.cpp.o" "CMakeFiles/yaramod-obj.dir/types/token_stream.cpp.o" "CMakeFiles/yaramod-obj.dir/types/yara_file.cpp.o" "CMakeFiles/yaramod-obj.dir/utils/json.cpp.o" "CMakeFiles/yaramod-obj.dir/utils/filesystem_operations.cpp.o" "CMakeFiles/yaramod-obj.dir/utils/utils.cpp.o" "CMakeFiles/yaramod-obj.dir/yaramod.cpp.o" /usr/lib/arm-linux-gnueabihf/libre2.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_marshalling.so /usr/lib/arm-linux-gnueabihf/libabsl_log_severity.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_reflection.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_private_handle_accessor.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_commandlineflag.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_commandlineflag_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_config.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_program_name.so /usr/lib/arm-linux-gnueabihf/libabsl_raw_logging_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_cord.so /usr/lib/arm-linux-gnueabihf/libabsl_cordz_info.so /usr/lib/arm-linux-gnueabihf/libabsl_cord_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_cordz_functions.so /usr/lib/arm-linux-gnueabihf/libabsl_cordz_handle.so /usr/lib/arm-linux-gnueabihf/libabsl_crc_cord_state.so /usr/lib/arm-linux-gnueabihf/libabsl_crc32c.so /usr/lib/arm-linux-gnueabihf/libabsl_crc_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_crc_cpu_detect.so /usr/lib/arm-linux-gnueabihf/libabsl_raw_hash_set.so /usr/lib/arm-linux-gnueabihf/libabsl_hash.so /usr/lib/arm-linux-gnueabihf/libabsl_city.so /usr/lib/arm-linux-gnueabihf/libabsl_bad_variant_access.so /usr/lib/arm-linux-gnueabihf/libabsl_low_level_hash.so /usr/lib/arm-linux-gnueabihf/libabsl_hashtablez_sampler.so /usr/lib/arm-linux-gnueabihf/libabsl_exponential_biased.so /usr/lib/arm-linux-gnueabihf/libabsl_bad_optional_access.so /usr/lib/arm-linux-gnueabihf/libabsl_str_format_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_synchronization.so /usr/lib/arm-linux-gnueabihf/libabsl_graphcycles_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_kernel_timeout_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_stacktrace.so /usr/lib/arm-linux-gnueabihf/libabsl_symbolize.so /usr/lib/arm-linux-gnueabihf/libabsl_debugging_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_demangle_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_malloc_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_time.so /usr/lib/arm-linux-gnueabihf/libabsl_civil_time.so /usr/lib/arm-linux-gnueabihf/libabsl_strings.so /usr/lib/arm-linux-gnueabihf/libabsl_string_view.so /usr/lib/arm-linux-gnueabihf/libabsl_strings_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_base.so -latomic /usr/lib/arm-linux-gnueabihf/librt.a /usr/lib/arm-linux-gnueabihf/libabsl_spinlock_wait.so /usr/lib/arm-linux-gnueabihf/libabsl_int128.so /usr/lib/arm-linux-gnueabihf/libabsl_throw_delegate.so /usr/lib/arm-linux-gnueabihf/libabsl_log_severity.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_reflection.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_private_handle_accessor.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_commandlineflag.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_commandlineflag_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_config.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_program_name.so /usr/lib/arm-linux-gnueabihf/libabsl_raw_logging_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_cord.so /usr/lib/arm-linux-gnueabihf/libabsl_cordz_info.so /usr/lib/arm-linux-gnueabihf/libabsl_cord_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_cordz_functions.so /usr/lib/arm-linux-gnueabihf/libabsl_cordz_handle.so /usr/lib/arm-linux-gnueabihf/libabsl_crc_cord_state.so /usr/lib/arm-linux-gnueabihf/libabsl_crc32c.so /usr/lib/arm-linux-gnueabihf/libabsl_crc_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_crc_cpu_detect.so /usr/lib/arm-linux-gnueabihf/libabsl_raw_hash_set.so /usr/lib/arm-linux-gnueabihf/libabsl_hash.so /usr/lib/arm-linux-gnueabihf/libabsl_city.so /usr/lib/arm-linux-gnueabihf/libabsl_bad_variant_access.so /usr/lib/arm-linux-gnueabihf/libabsl_low_level_hash.so /usr/lib/arm-linux-gnueabihf/libabsl_hashtablez_sampler.so /usr/lib/arm-linux-gnueabihf/libabsl_exponential_biased.so /usr/lib/arm-linux-gnueabihf/libabsl_bad_optional_access.so /usr/lib/arm-linux-gnueabihf/libabsl_str_format_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_synchronization.so /usr/lib/arm-linux-gnueabihf/libabsl_graphcycles_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_kernel_timeout_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_stacktrace.so /usr/lib/arm-linux-gnueabihf/libabsl_symbolize.so /usr/lib/arm-linux-gnueabihf/libabsl_debugging_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_demangle_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_malloc_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_time.so /usr/lib/arm-linux-gnueabihf/libabsl_civil_time.so /usr/lib/arm-linux-gnueabihf/libabsl_strings.so /usr/lib/arm-linux-gnueabihf/libabsl_string_view.so /usr/lib/arm-linux-gnueabihf/libabsl_strings_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_base.so -latomic /usr/lib/arm-linux-gnueabihf/librt.a /usr/lib/arm-linux-gnueabihf/libabsl_spinlock_wait.so /usr/lib/arm-linux-gnueabihf/libabsl_int128.so /usr/lib/arm-linux-gnueabihf/libabsl_throw_delegate.so /usr/lib/arm-linux-gnueabihf/libabsl_time_zone.so cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/yaramod-static.dir/link.txt --verbose=1 /usr/bin/ar qc libyaramod.a "CMakeFiles/yaramod-obj.dir/builder/yara_expression_builder.cpp.o" "CMakeFiles/yaramod-obj.dir/builder/yara_file_builder.cpp.o" "CMakeFiles/yaramod-obj.dir/builder/yara_hex_string_builder.cpp.o" "CMakeFiles/yaramod-obj.dir/builder/yara_rule_builder.cpp.o" "CMakeFiles/yaramod-obj.dir/parser/parser_driver.cpp.o" "CMakeFiles/yaramod-obj.dir/types/hex_string.cpp.o" "CMakeFiles/yaramod-obj.dir/types/literal.cpp.o" "CMakeFiles/yaramod-obj.dir/types/meta.cpp.o" "CMakeFiles/yaramod-obj.dir/types/variable.cpp.o" "CMakeFiles/yaramod-obj.dir/types/modules/module.cpp.o" "CMakeFiles/yaramod-obj.dir/types/modules/module_pool.cpp.o" "CMakeFiles/yaramod-obj.dir/types/plain_string.cpp.o" "CMakeFiles/yaramod-obj.dir/types/rule.cpp.o" "CMakeFiles/yaramod-obj.dir/types/sections_summary.cpp.o" "CMakeFiles/yaramod-obj.dir/types/token.cpp.o" "CMakeFiles/yaramod-obj.dir/types/token_stream.cpp.o" "CMakeFiles/yaramod-obj.dir/types/yara_file.cpp.o" "CMakeFiles/yaramod-obj.dir/utils/json.cpp.o" "CMakeFiles/yaramod-obj.dir/utils/filesystem_operations.cpp.o" "CMakeFiles/yaramod-obj.dir/utils/utils.cpp.o" "CMakeFiles/yaramod-obj.dir/yaramod.cpp.o" /usr/bin/ranlib libyaramod.a make[4]: Leaving directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' [ 64%] Built target yaramod-static cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src && /usr/bin/cmake -E cmake_symlink_library libyaramod.so.3.21.0 libyaramod.so.0 libyaramod.so make[4]: Leaving directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' [ 64%] Built target yaramod make -f src/python/CMakeFiles/yaramod-python.dir/build.make src/python/CMakeFiles/yaramod-python.dir/depend make -f tests/cpp/CMakeFiles/yaramod_tests.dir/build.make tests/cpp/CMakeFiles/yaramod_tests.dir/depend make[4]: Entering directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /build/reproducible-path/yaramod-3.21.0 /build/reproducible-path/yaramod-3.21.0/src/python /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src/python /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src/python/CMakeFiles/yaramod-python.dir/DependInfo.cmake "--color=" make[4]: Entering directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /build/reproducible-path/yaramod-3.21.0 /build/reproducible-path/yaramod-3.21.0/tests/cpp /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/tests/cpp /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/tests/cpp/CMakeFiles/yaramod_tests.dir/DependInfo.cmake "--color=" make[4]: Leaving directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' make[4]: Leaving directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' make -f src/python/CMakeFiles/yaramod-python.dir/build.make src/python/CMakeFiles/yaramod-python.dir/build make -f tests/cpp/CMakeFiles/yaramod_tests.dir/build.make tests/cpp/CMakeFiles/yaramod_tests.dir/build make[4]: Entering directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' make[4]: Entering directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' [ 72%] Building CXX object tests/cpp/CMakeFiles/yaramod_tests.dir/tokenstream_tests.cpp.o [ 72%] Building CXX object src/python/CMakeFiles/yaramod-python.dir/py_visitor.cpp.o [ 72%] Building CXX object src/python/CMakeFiles/yaramod-python.dir/yaramod_python.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src/python && /usr/bin/c++ -DFMT_SHARED -Dyaramod_python_EXPORTS -isystem /usr/include/python3.12 -isystem /build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -fvisibility=hidden -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/python/CMakeFiles/yaramod-python.dir/yaramod_python.cpp.o -MF CMakeFiles/yaramod-python.dir/yaramod_python.cpp.o.d -o CMakeFiles/yaramod-python.dir/yaramod_python.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/python/yaramod_python.cpp cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/tests/cpp && /usr/bin/c++ -DFMT_SHARED -I/build/reproducible-path/yaramod-3.21.0/tests/cpp -isystem /build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIE -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -DGTEST_HAS_PTHREAD=1 -MD -MT tests/cpp/CMakeFiles/yaramod_tests.dir/tokenstream_tests.cpp.o -MF CMakeFiles/yaramod_tests.dir/tokenstream_tests.cpp.o.d -o CMakeFiles/yaramod_tests.dir/tokenstream_tests.cpp.o -c /build/reproducible-path/yaramod-3.21.0/tests/cpp/tokenstream_tests.cpp cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src/python && /usr/bin/c++ -DFMT_SHARED -Dyaramod_python_EXPORTS -isystem /usr/include/python3.12 -isystem /build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIC -fvisibility=hidden -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -MD -MT src/python/CMakeFiles/yaramod-python.dir/py_visitor.cpp.o -MF CMakeFiles/yaramod-python.dir/py_visitor.cpp.o.d -o CMakeFiles/yaramod-python.dir/py_visitor.cpp.o -c /build/reproducible-path/yaramod-3.21.0/src/python/py_visitor.cpp /build/reproducible-path/yaramod-3.21.0/src/python/yaramod_python.cpp: In lambda function: /build/reproducible-path/yaramod-3.21.0/src/python/yaramod_python.cpp:1029:42: warning: 'void pybind11::exception::operator()(const char*) const [with type = yaramod::ParserError]' is deprecated: Please use py::set_error() instead (https://github.com/pybind/pybind11/pull/4772) [-Wdeprecated-declarations] 1029 | exception(err.what()); | ~~~~~~~~~^~~~~~~~~~~~ In file included from /build/reproducible-path/yaramod-3.21.0/src/python/yaramod_python.cpp:10: /usr/include/pybind11/pybind11.h:2625:10: note: declared here 2625 | void operator()(const char *message) const { set_error(*this, message); } | ^~~~~~~~ [ 75%] Building CXX object tests/cpp/CMakeFiles/yaramod_tests.dir/representation_tests.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/tests/cpp && /usr/bin/c++ -DFMT_SHARED -I/build/reproducible-path/yaramod-3.21.0/tests/cpp -isystem /build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIE -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -DGTEST_HAS_PTHREAD=1 -MD -MT tests/cpp/CMakeFiles/yaramod_tests.dir/representation_tests.cpp.o -MF CMakeFiles/yaramod_tests.dir/representation_tests.cpp.o.d -o CMakeFiles/yaramod_tests.dir/representation_tests.cpp.o -c /build/reproducible-path/yaramod-3.21.0/tests/cpp/representation_tests.cpp [ 78%] Building CXX object tests/cpp/CMakeFiles/yaramod_tests.dir/builder_tests.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/tests/cpp && /usr/bin/c++ -DFMT_SHARED -I/build/reproducible-path/yaramod-3.21.0/tests/cpp -isystem /build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIE -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -DGTEST_HAS_PTHREAD=1 -MD -MT tests/cpp/CMakeFiles/yaramod_tests.dir/builder_tests.cpp.o -MF CMakeFiles/yaramod_tests.dir/builder_tests.cpp.o.d -o CMakeFiles/yaramod_tests.dir/builder_tests.cpp.o -c /build/reproducible-path/yaramod-3.21.0/tests/cpp/builder_tests.cpp [ 81%] Building CXX object tests/cpp/CMakeFiles/yaramod_tests.dir/parser_tests.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/tests/cpp && /usr/bin/c++ -DFMT_SHARED -I/build/reproducible-path/yaramod-3.21.0/tests/cpp -isystem /build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIE -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -DGTEST_HAS_PTHREAD=1 -MD -MT tests/cpp/CMakeFiles/yaramod_tests.dir/parser_tests.cpp.o -MF CMakeFiles/yaramod_tests.dir/parser_tests.cpp.o.d -o CMakeFiles/yaramod_tests.dir/parser_tests.cpp.o -c /build/reproducible-path/yaramod-3.21.0/tests/cpp/parser_tests.cpp [ 83%] Building CXX object tests/cpp/CMakeFiles/yaramod_tests.dir/trie_tests.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/tests/cpp && /usr/bin/c++ -DFMT_SHARED -I/build/reproducible-path/yaramod-3.21.0/tests/cpp -isystem /build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIE -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -DGTEST_HAS_PTHREAD=1 -MD -MT tests/cpp/CMakeFiles/yaramod_tests.dir/trie_tests.cpp.o -MF CMakeFiles/yaramod_tests.dir/trie_tests.cpp.o.d -o CMakeFiles/yaramod_tests.dir/trie_tests.cpp.o -c /build/reproducible-path/yaramod-3.21.0/tests/cpp/trie_tests.cpp [ 86%] Building CXX object tests/cpp/CMakeFiles/yaramod_tests.dir/utils_tests.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/tests/cpp && /usr/bin/c++ -DFMT_SHARED -I/build/reproducible-path/yaramod-3.21.0/tests/cpp -isystem /build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIE -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -DGTEST_HAS_PTHREAD=1 -MD -MT tests/cpp/CMakeFiles/yaramod_tests.dir/utils_tests.cpp.o -MF CMakeFiles/yaramod_tests.dir/utils_tests.cpp.o.d -o CMakeFiles/yaramod_tests.dir/utils_tests.cpp.o -c /build/reproducible-path/yaramod-3.21.0/tests/cpp/utils_tests.cpp [ 89%] Building CXX object tests/cpp/CMakeFiles/yaramod_tests.dir/visitor_tests.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/tests/cpp && /usr/bin/c++ -DFMT_SHARED -I/build/reproducible-path/yaramod-3.21.0/tests/cpp -isystem /build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIE -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -DGTEST_HAS_PTHREAD=1 -MD -MT tests/cpp/CMakeFiles/yaramod_tests.dir/visitor_tests.cpp.o -MF CMakeFiles/yaramod_tests.dir/visitor_tests.cpp.o.d -o CMakeFiles/yaramod_tests.dir/visitor_tests.cpp.o -c /build/reproducible-path/yaramod-3.21.0/tests/cpp/visitor_tests.cpp [ 91%] Linking CXX shared module yaramod.cpython-312-arm-linux-gnueabihf.so cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src/python && /usr/bin/cmake -E cmake_link_script CMakeFiles/yaramod-python.dir/link.txt --verbose=1 /usr/bin/c++ -fPIC -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -pthread -Wl,--push-state,--as-needed -Wl,--pop-state -Wl,-z,relro -Wl,-z,now -shared -o yaramod.cpython-312-arm-linux-gnueabihf.so "CMakeFiles/yaramod-python.dir/yaramod_python.cpp.o" "CMakeFiles/yaramod-python.dir/py_visitor.cpp.o" ../libyaramod.so.3.21.0 /usr/lib/arm-linux-gnueabihf/libre2.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_marshalling.so /usr/lib/arm-linux-gnueabihf/libabsl_log_severity.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_reflection.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_private_handle_accessor.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_commandlineflag.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_commandlineflag_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_config.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_program_name.so /usr/lib/arm-linux-gnueabihf/libabsl_raw_logging_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_cord.so /usr/lib/arm-linux-gnueabihf/libabsl_cordz_info.so /usr/lib/arm-linux-gnueabihf/libabsl_cord_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_cordz_functions.so /usr/lib/arm-linux-gnueabihf/libabsl_cordz_handle.so /usr/lib/arm-linux-gnueabihf/libabsl_crc_cord_state.so /usr/lib/arm-linux-gnueabihf/libabsl_crc32c.so /usr/lib/arm-linux-gnueabihf/libabsl_crc_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_crc_cpu_detect.so /usr/lib/arm-linux-gnueabihf/libabsl_raw_hash_set.so /usr/lib/arm-linux-gnueabihf/libabsl_hash.so /usr/lib/arm-linux-gnueabihf/libabsl_city.so /usr/lib/arm-linux-gnueabihf/libabsl_bad_variant_access.so /usr/lib/arm-linux-gnueabihf/libabsl_low_level_hash.so /usr/lib/arm-linux-gnueabihf/libabsl_hashtablez_sampler.so /usr/lib/arm-linux-gnueabihf/libabsl_exponential_biased.so /usr/lib/arm-linux-gnueabihf/libabsl_bad_optional_access.so /usr/lib/arm-linux-gnueabihf/libabsl_str_format_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_synchronization.so /usr/lib/arm-linux-gnueabihf/libabsl_graphcycles_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_kernel_timeout_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_stacktrace.so /usr/lib/arm-linux-gnueabihf/libabsl_symbolize.so /usr/lib/arm-linux-gnueabihf/libabsl_debugging_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_demangle_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_malloc_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_time.so /usr/lib/arm-linux-gnueabihf/libabsl_civil_time.so /usr/lib/arm-linux-gnueabihf/libabsl_strings.so /usr/lib/arm-linux-gnueabihf/libabsl_string_view.so /usr/lib/arm-linux-gnueabihf/libabsl_strings_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_base.so -latomic /usr/lib/arm-linux-gnueabihf/librt.a /usr/lib/arm-linux-gnueabihf/libabsl_spinlock_wait.so /usr/lib/arm-linux-gnueabihf/libabsl_int128.so /usr/lib/arm-linux-gnueabihf/libabsl_throw_delegate.so /usr/lib/arm-linux-gnueabihf/libabsl_log_severity.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_reflection.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_private_handle_accessor.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_commandlineflag.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_commandlineflag_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_config.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_program_name.so /usr/lib/arm-linux-gnueabihf/libabsl_raw_logging_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_cord.so /usr/lib/arm-linux-gnueabihf/libabsl_cordz_info.so /usr/lib/arm-linux-gnueabihf/libabsl_cord_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_cordz_functions.so /usr/lib/arm-linux-gnueabihf/libabsl_cordz_handle.so /usr/lib/arm-linux-gnueabihf/libabsl_crc_cord_state.so /usr/lib/arm-linux-gnueabihf/libabsl_crc32c.so /usr/lib/arm-linux-gnueabihf/libabsl_crc_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_crc_cpu_detect.so /usr/lib/arm-linux-gnueabihf/libabsl_raw_hash_set.so /usr/lib/arm-linux-gnueabihf/libabsl_hash.so /usr/lib/arm-linux-gnueabihf/libabsl_city.so /usr/lib/arm-linux-gnueabihf/libabsl_bad_variant_access.so /usr/lib/arm-linux-gnueabihf/libabsl_low_level_hash.so /usr/lib/arm-linux-gnueabihf/libabsl_hashtablez_sampler.so /usr/lib/arm-linux-gnueabihf/libabsl_exponential_biased.so /usr/lib/arm-linux-gnueabihf/libabsl_bad_optional_access.so /usr/lib/arm-linux-gnueabihf/libabsl_str_format_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_synchronization.so /usr/lib/arm-linux-gnueabihf/libabsl_graphcycles_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_kernel_timeout_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_stacktrace.so /usr/lib/arm-linux-gnueabihf/libabsl_symbolize.so /usr/lib/arm-linux-gnueabihf/libabsl_debugging_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_demangle_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_malloc_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_time.so /usr/lib/arm-linux-gnueabihf/libabsl_civil_time.so /usr/lib/arm-linux-gnueabihf/libabsl_strings.so /usr/lib/arm-linux-gnueabihf/libabsl_string_view.so /usr/lib/arm-linux-gnueabihf/libabsl_strings_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_base.so -latomic /usr/lib/arm-linux-gnueabihf/librt.a /usr/lib/arm-linux-gnueabihf/libabsl_spinlock_wait.so /usr/lib/arm-linux-gnueabihf/libabsl_int128.so /usr/lib/arm-linux-gnueabihf/libabsl_throw_delegate.so /usr/lib/arm-linux-gnueabihf/libabsl_time_zone.so /usr/lib/arm-linux-gnueabihf/libfmt.so.9.1.0 make[4]: Leaving directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' [ 91%] Built target yaramod-python [ 94%] Building CXX object tests/cpp/CMakeFiles/yaramod_tests.dir/yara_file_tests.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/tests/cpp && /usr/bin/c++ -DFMT_SHARED -I/build/reproducible-path/yaramod-3.21.0/tests/cpp -isystem /build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIE -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -DGTEST_HAS_PTHREAD=1 -MD -MT tests/cpp/CMakeFiles/yaramod_tests.dir/yara_file_tests.cpp.o -MF CMakeFiles/yaramod_tests.dir/yara_file_tests.cpp.o.d -o CMakeFiles/yaramod_tests.dir/yara_file_tests.cpp.o -c /build/reproducible-path/yaramod-3.21.0/tests/cpp/yara_file_tests.cpp [ 97%] Building CXX object tests/cpp/CMakeFiles/yaramod_tests.dir/yaramod_tests.cpp.o cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/tests/cpp && /usr/bin/c++ -DFMT_SHARED -I/build/reproducible-path/yaramod-3.21.0/tests/cpp -isystem /build/reproducible-path/yaramod-3.21.0/include -isystem /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=gnu++17 -fPIE -Wall -Wextra -Wno-empty-body -pthread -DNOMINMAX -DGTEST_HAS_PTHREAD=1 -MD -MT tests/cpp/CMakeFiles/yaramod_tests.dir/yaramod_tests.cpp.o -MF CMakeFiles/yaramod_tests.dir/yaramod_tests.cpp.o.d -o CMakeFiles/yaramod_tests.dir/yaramod_tests.cpp.o -c /build/reproducible-path/yaramod-3.21.0/tests/cpp/yaramod_tests.cpp [100%] Linking CXX executable yaramod_tests cd /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/tests/cpp && /usr/bin/cmake -E cmake_link_script CMakeFiles/yaramod_tests.dir/link.txt --verbose=1 /usr/bin/c++ -g -O2 -ffile-prefix-map=/build/reproducible-path/yaramod-3.21.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wl,-z,relro -Wl,-z,now -pthread -Wl,--push-state,--as-needed -Wl,--pop-state CMakeFiles/yaramod_tests.dir/tokenstream_tests.cpp.o CMakeFiles/yaramod_tests.dir/representation_tests.cpp.o CMakeFiles/yaramod_tests.dir/builder_tests.cpp.o CMakeFiles/yaramod_tests.dir/parser_tests.cpp.o CMakeFiles/yaramod_tests.dir/trie_tests.cpp.o CMakeFiles/yaramod_tests.dir/utils_tests.cpp.o CMakeFiles/yaramod_tests.dir/visitor_tests.cpp.o CMakeFiles/yaramod_tests.dir/yara_file_tests.cpp.o CMakeFiles/yaramod_tests.dir/yaramod_tests.cpp.o -o yaramod_tests -Wl,-rpath,/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src ../../src/libyaramod.so.3.21.0 /usr/lib/arm-linux-gnueabihf/libre2.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_marshalling.so /usr/lib/arm-linux-gnueabihf/libabsl_log_severity.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_reflection.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_private_handle_accessor.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_commandlineflag.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_commandlineflag_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_config.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_program_name.so /usr/lib/arm-linux-gnueabihf/libabsl_raw_logging_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_cord.so /usr/lib/arm-linux-gnueabihf/libabsl_cordz_info.so /usr/lib/arm-linux-gnueabihf/libabsl_cord_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_cordz_functions.so /usr/lib/arm-linux-gnueabihf/libabsl_cordz_handle.so /usr/lib/arm-linux-gnueabihf/libabsl_crc_cord_state.so /usr/lib/arm-linux-gnueabihf/libabsl_crc32c.so /usr/lib/arm-linux-gnueabihf/libabsl_crc_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_crc_cpu_detect.so /usr/lib/arm-linux-gnueabihf/libabsl_raw_hash_set.so /usr/lib/arm-linux-gnueabihf/libabsl_hash.so /usr/lib/arm-linux-gnueabihf/libabsl_city.so /usr/lib/arm-linux-gnueabihf/libabsl_bad_variant_access.so /usr/lib/arm-linux-gnueabihf/libabsl_low_level_hash.so /usr/lib/arm-linux-gnueabihf/libabsl_hashtablez_sampler.so /usr/lib/arm-linux-gnueabihf/libabsl_exponential_biased.so /usr/lib/arm-linux-gnueabihf/libabsl_bad_optional_access.so /usr/lib/arm-linux-gnueabihf/libabsl_str_format_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_synchronization.so /usr/lib/arm-linux-gnueabihf/libabsl_graphcycles_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_kernel_timeout_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_stacktrace.so /usr/lib/arm-linux-gnueabihf/libabsl_symbolize.so /usr/lib/arm-linux-gnueabihf/libabsl_debugging_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_demangle_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_malloc_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_time.so /usr/lib/arm-linux-gnueabihf/libabsl_civil_time.so /usr/lib/arm-linux-gnueabihf/libabsl_strings.so /usr/lib/arm-linux-gnueabihf/libabsl_string_view.so /usr/lib/arm-linux-gnueabihf/libabsl_strings_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_base.so -latomic /usr/lib/arm-linux-gnueabihf/librt.a /usr/lib/arm-linux-gnueabihf/libabsl_spinlock_wait.so /usr/lib/arm-linux-gnueabihf/libabsl_int128.so /usr/lib/arm-linux-gnueabihf/libabsl_throw_delegate.so /usr/lib/arm-linux-gnueabihf/libabsl_log_severity.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_reflection.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_private_handle_accessor.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_commandlineflag.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_commandlineflag_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_config.so /usr/lib/arm-linux-gnueabihf/libabsl_flags_program_name.so /usr/lib/arm-linux-gnueabihf/libabsl_raw_logging_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_cord.so /usr/lib/arm-linux-gnueabihf/libabsl_cordz_info.so /usr/lib/arm-linux-gnueabihf/libabsl_cord_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_cordz_functions.so /usr/lib/arm-linux-gnueabihf/libabsl_cordz_handle.so /usr/lib/arm-linux-gnueabihf/libabsl_crc_cord_state.so /usr/lib/arm-linux-gnueabihf/libabsl_crc32c.so /usr/lib/arm-linux-gnueabihf/libabsl_crc_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_crc_cpu_detect.so /usr/lib/arm-linux-gnueabihf/libabsl_raw_hash_set.so /usr/lib/arm-linux-gnueabihf/libabsl_hash.so /usr/lib/arm-linux-gnueabihf/libabsl_city.so /usr/lib/arm-linux-gnueabihf/libabsl_bad_variant_access.so /usr/lib/arm-linux-gnueabihf/libabsl_low_level_hash.so /usr/lib/arm-linux-gnueabihf/libabsl_hashtablez_sampler.so /usr/lib/arm-linux-gnueabihf/libabsl_exponential_biased.so /usr/lib/arm-linux-gnueabihf/libabsl_bad_optional_access.so /usr/lib/arm-linux-gnueabihf/libabsl_str_format_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_synchronization.so /usr/lib/arm-linux-gnueabihf/libabsl_graphcycles_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_kernel_timeout_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_stacktrace.so /usr/lib/arm-linux-gnueabihf/libabsl_symbolize.so /usr/lib/arm-linux-gnueabihf/libabsl_debugging_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_demangle_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_malloc_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_time.so /usr/lib/arm-linux-gnueabihf/libabsl_civil_time.so /usr/lib/arm-linux-gnueabihf/libabsl_strings.so /usr/lib/arm-linux-gnueabihf/libabsl_string_view.so /usr/lib/arm-linux-gnueabihf/libabsl_strings_internal.so /usr/lib/arm-linux-gnueabihf/libabsl_base.so -latomic /usr/lib/arm-linux-gnueabihf/librt.a /usr/lib/arm-linux-gnueabihf/libabsl_spinlock_wait.so /usr/lib/arm-linux-gnueabihf/libabsl_int128.so /usr/lib/arm-linux-gnueabihf/libabsl_throw_delegate.so /usr/lib/arm-linux-gnueabihf/libabsl_time_zone.so /usr/lib/arm-linux-gnueabihf/libfmt.so.9.1.0 /usr/lib/arm-linux-gnueabihf/libgtest_main.a /usr/lib/arm-linux-gnueabihf/libgtest.a make[4]: Leaving directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' [100%] Built target yaramod_tests make[3]: Leaving directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' /usr/bin/cmake -E cmake_progress_start /build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/CMakeFiles 0 make[2]: Leaving directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' cp obj-arm-linux-gnueabihf/src/python/yaramod.cpython-*.so .pybuild/cpython3_*/build/ dh_auto_build -a -O--buildsystem=pybuild I: pybuild base:311: /usr/bin/python3 setup.py build /usr/lib/python3/dist-packages/setuptools/dist.py:450: SetuptoolsDeprecationWarning: Invalid dash-separated options !! ******************************************************************************** Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead. By 2024-Sep-26, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details. ******************************************************************************** !! opt = self.warn_dash_deprecation(opt, section) running build running build_py creating /build/reproducible-path/yaramod-3.21.0/.pybuild/cpython3_3.12/build/yaramod copying src/python/typings/__init__.pyi -> /build/reproducible-path/yaramod-3.21.0/.pybuild/cpython3_3.12/build/yaramod copying src/python/typings/py.typed -> /build/reproducible-path/yaramod-3.21.0/.pybuild/cpython3_3.12/build/yaramod running build_ext make[1]: Leaving directory '/build/reproducible-path/yaramod-3.21.0' debian/rules override_dh_auto_test-arch make[1]: Entering directory '/build/reproducible-path/yaramod-3.21.0' ./obj-arm-linux-gnueabihf/tests/cpp/yaramod_tests Running main() from ./googletest/src/gtest_main.cc [==========] Running 398 tests from 9 test suites. [----------] Global test environment set-up. [----------] 19 tests from TokenStreamTests [ RUN ] TokenStreamTests.BoolLiteral [ OK ] TokenStreamTests.BoolLiteral (0 ms) [ RUN ] TokenStreamTests.TokenStreamFindSimple [ OK ] TokenStreamTests.TokenStreamFindSimple (0 ms) [ RUN ] TokenStreamTests.TokenStreamFind [ OK ] TokenStreamTests.TokenStreamFind (0 ms) [ RUN ] TokenStreamTests.TokenStreamFindBackwardsSimple [ OK ] TokenStreamTests.TokenStreamFindBackwardsSimple (0 ms) [ RUN ] TokenStreamTests.TokenStreamFindBackwards [ OK ] TokenStreamTests.TokenStreamFindBackwards (0 ms) [ RUN ] TokenStreamTests.TokenStreamEmplaceBack [ OK ] TokenStreamTests.TokenStreamEmplaceBack (0 ms) [ RUN ] TokenStreamTests.TokenStreamEmplace [ OK ] TokenStreamTests.TokenStreamEmplace (0 ms) [ RUN ] TokenStreamTests.TokenStreamPushBack [ OK ] TokenStreamTests.TokenStreamPushBack (0 ms) [ RUN ] TokenStreamTests.TokenStreamErase [ OK ] TokenStreamTests.TokenStreamErase (0 ms) [ RUN ] TokenStreamTests.TokenStreamSwapTokensWithDifferentTokenStreams [ OK ] TokenStreamTests.TokenStreamSwapTokensWithDifferentTokenStreams (0 ms) [ RUN ] TokenStreamTests.TokenStreamSwapTokensWithinTheSameTokenStreamInclusion1 [ OK ] TokenStreamTests.TokenStreamSwapTokensWithinTheSameTokenStreamInclusion1 (0 ms) [ RUN ] TokenStreamTests.TokenStreamSwapTokensWithinTheSameTokenStreamInclusion2 [ OK ] TokenStreamTests.TokenStreamSwapTokensWithinTheSameTokenStreamInclusion2 (0 ms) [ RUN ] TokenStreamTests.TokenStreamSwapTokensWithinTheSameTokenStreamInclusionTouching1 [ OK ] TokenStreamTests.TokenStreamSwapTokensWithinTheSameTokenStreamInclusionTouching1 (0 ms) [ RUN ] TokenStreamTests.TokenStreamSwapTokensWithinTheSameTokenStreamInclusionTouching2 [ OK ] TokenStreamTests.TokenStreamSwapTokensWithinTheSameTokenStreamInclusionTouching2 (0 ms) [ RUN ] TokenStreamTests.TokenStreamSwapTokensWithinTheSameTokenStreamInclusionInvalid [ OK ] TokenStreamTests.TokenStreamSwapTokensWithinTheSameTokenStreamInclusionInvalid (1 ms) [ RUN ] TokenStreamTests.TokenStreamSwapTokensWithinTheSameTokenStreamInclusionInvalid2 [ OK ] TokenStreamTests.TokenStreamSwapTokensWithinTheSameTokenStreamInclusionInvalid2 (0 ms) [ RUN ] TokenStreamTests.TokenStreamSwapTokensWithinTheSameTokenStreamDistinct [ OK ] TokenStreamTests.TokenStreamSwapTokensWithinTheSameTokenStreamDistinct (0 ms) [ RUN ] TokenStreamTests.TokenStreamSwapTokensWithinTheSameTokenStreamDistinctTouching1 [ OK ] TokenStreamTests.TokenStreamSwapTokensWithinTheSameTokenStreamDistinctTouching1 (0 ms) [ RUN ] TokenStreamTests.TokenStreamSwapTokensWithinTheSameTokenStreamDistinctTouching2 [ OK ] TokenStreamTests.TokenStreamSwapTokensWithinTheSameTokenStreamDistinctTouching2 (0 ms) [----------] 19 tests from TokenStreamTests (1 ms total) [----------] 12 tests from RepresentationTests [ RUN ] RepresentationTests.MetaConstruction [ OK ] RepresentationTests.MetaConstruction (0 ms) [ RUN ] RepresentationTests.MetaSetters [ OK ] RepresentationTests.MetaSetters (0 ms) [ RUN ] RepresentationTests.MetaCopyIsJustReference [ OK ] RepresentationTests.MetaCopyIsJustReference (0 ms) [ RUN ] RepresentationTests.RegexpConstruction [ OK ] RepresentationTests.RegexpConstruction (0 ms) [ RUN ] RepresentationTests.RegexpSetters [ OK ] RepresentationTests.RegexpSetters (0 ms) [ RUN ] RepresentationTests.RegexpConcat [ OK ] RepresentationTests.RegexpConcat (0 ms) [ RUN ] RepresentationTests.RegexpGroup [ OK ] RepresentationTests.RegexpGroup (0 ms) [ RUN ] RepresentationTests.RegexpOr [ OK ] RepresentationTests.RegexpOr (0 ms) [ RUN ] RepresentationTests.RegexpRange [ OK ] RepresentationTests.RegexpRange (0 ms) [ RUN ] RepresentationTests.RegexpOptional [ OK ] RepresentationTests.RegexpOptional (0 ms) [ RUN ] RepresentationTests.RegexpPositiveIteration [ OK ] RepresentationTests.RegexpPositiveIteration (0 ms) [ RUN ] RepresentationTests.RegexpIteration [ OK ] RepresentationTests.RegexpIteration (0 ms) [----------] 12 tests from RepresentationTests (0 ms total) [----------] 66 tests from BuilderTests [ RUN ] BuilderTests.EmptyFileWorks [ OK ] BuilderTests.EmptyFileWorks (133 ms) [ RUN ] BuilderTests.PureImportsWorks [ OK ] BuilderTests.PureImportsWorks (123 ms) [ RUN ] BuilderTests.PureImportsComplicateWorks [ OK ] BuilderTests.PureImportsComplicateWorks (120 ms) [ RUN ] BuilderTests.UnnamedRuleWorks [ OK ] BuilderTests.UnnamedRuleWorks (182 ms) [ RUN ] BuilderTests.UnnamedRuleWithImportsWorks [ OK ] BuilderTests.UnnamedRuleWithImportsWorks (179 ms) [ RUN ] BuilderTests.UnnamedRuleWithImportsWorks2 [ OK ] BuilderTests.UnnamedRuleWithImportsWorks2 (179 ms) [ RUN ] BuilderTests.RuleWithCustomNameWorks [ OK ] BuilderTests.RuleWithCustomNameWorks (123 ms) [ RUN ] BuilderTests.RuleWithMetasWorks [ OK ] BuilderTests.RuleWithMetasWorks (178 ms) [ RUN ] BuilderTests.RuleWithVariablesWorks [ OK ] BuilderTests.RuleWithVariablesWorks (180 ms) [ RUN ] BuilderTests.RuleWithEmptyStringMetaValueWorks [ OK ] BuilderTests.RuleWithEmptyStringMetaValueWorks (179 ms) [ RUN ] BuilderTests.RuleWithTagsWorks [ OK ] BuilderTests.RuleWithTagsWorks (121 ms) [ RUN ] BuilderTests.RuleWithModifierWorks [ OK ] BuilderTests.RuleWithModifierWorks (179 ms) [ RUN ] BuilderTests.RuleWithOnelineCommentWorks [ OK ] BuilderTests.RuleWithOnelineCommentWorks (112 ms) [ RUN ] BuilderTests.RuleWithMultilineCommentWorks [ OK ] BuilderTests.RuleWithMultilineCommentWorks (111 ms) [ RUN ] BuilderTests.RuleWithPlainStringWorks [ OK ] BuilderTests.RuleWithPlainStringWorks (124 ms) [ RUN ] BuilderTests.RuleWithPlainStringPureWideWorks [ OK ] BuilderTests.RuleWithPlainStringPureWideWorks (181 ms) [ RUN ] BuilderTests.MultipleRulesWorks [ OK ] BuilderTests.MultipleRulesWorks (126 ms) [ RUN ] BuilderTests.RuleWithCustomConditionWorks [ OK ] BuilderTests.RuleWithCustomConditionWorks (186 ms) [ RUN ] BuilderTests.RuleWithConditionWithSymbolsWorks [ OK ] BuilderTests.RuleWithConditionWithSymbolsWorks (123 ms) [ RUN ] BuilderTests.RuleWithHexStringWorks [ OK ] BuilderTests.RuleWithHexStringWorks (176 ms) [ RUN ] BuilderTests.RuleWithDictForConditionWorks [ OK ] BuilderTests.RuleWithDictForConditionWorks (119 ms) [ RUN ] BuilderTests.RuleWithStringForConditionWorks [ OK ] BuilderTests.RuleWithStringForConditionWorks (121 ms) [ RUN ] BuilderTests.RuleWithOfWorks [ OK ] BuilderTests.RuleWithOfWorks (176 ms) [ RUN ] BuilderTests.RuleWithRangeWorks [ OK ] BuilderTests.RuleWithRangeWorks (121 ms) [ RUN ] BuilderTests.RuleWithOfAtWorks [ OK ] BuilderTests.RuleWithOfAtWorks (174 ms) [ RUN ] BuilderTests.RuleWithStructureWorks [ OK ] BuilderTests.RuleWithStructureWorks (174 ms) [ RUN ] BuilderTests.RuleWithConditionWithOnelineComment [ OK ] BuilderTests.RuleWithConditionWithOnelineComment (173 ms) [ RUN ] BuilderTests.RuleWithConditionWithMultilineComment [ OK ] BuilderTests.RuleWithConditionWithMultilineComment (174 ms) [ RUN ] BuilderTests.RuleWithArrayAndStructureWorks [ OK ] BuilderTests.RuleWithArrayAndStructureWorks (116 ms) [ RUN ] BuilderTests.RuleWithFunctionCallWorks [ OK ] BuilderTests.RuleWithFunctionCallWorks (179 ms) [ RUN ] BuilderTests.RuleWithIntFunctionWorks [ OK ] BuilderTests.RuleWithIntFunctionWorks (120 ms) [ RUN ] BuilderTests.RuleWithArithmeticOperationsWorks [ OK ] BuilderTests.RuleWithArithmeticOperationsWorks (169 ms) [ RUN ] BuilderTests.RuleWithArithmeticOperationsWithDoubleValuesWorks [ OK ] BuilderTests.RuleWithArithmeticOperationsWithDoubleValuesWorks (115 ms) [ RUN ] BuilderTests.RuleWithBitwiseOperationsWorks [ OK ] BuilderTests.RuleWithBitwiseOperationsWorks (167 ms) [ RUN ] BuilderTests.RuleWithLogicOperationsWorks [ OK ] BuilderTests.RuleWithLogicOperationsWorks (116 ms) [ RUN ] BuilderTests.RuleWithIntMultpliersWorks [ OK ] BuilderTests.RuleWithIntMultpliersWorks (167 ms) [ RUN ] BuilderTests.RuleWithStringOperatorsWorks [ OK ] BuilderTests.RuleWithStringOperatorsWorks (115 ms) [ RUN ] BuilderTests.RuleWithRegexpWorks [ OK ] BuilderTests.RuleWithRegexpWorks (167 ms) [ RUN ] BuilderTests.RuleWithRegexpInConditionWorks [ OK ] BuilderTests.RuleWithRegexpInConditionWorks (115 ms) [ RUN ] BuilderTests.RuleWithConjunctionInConditionWorks [ OK ] BuilderTests.RuleWithConjunctionInConditionWorks (165 ms) [ RUN ] BuilderTests.RuleWithDisjunctionInConditionWorks [ OK ] BuilderTests.RuleWithDisjunctionInConditionWorks (115 ms) [ RUN ] BuilderTests.RuleWithConjunctionWithLinebreaksInConditionWorks [ OK ] BuilderTests.RuleWithConjunctionWithLinebreaksInConditionWorks (176 ms) [ RUN ] BuilderTests.RuleWithDisjunctionWithLinebreaksInConditionWorks [ OK ] BuilderTests.RuleWithDisjunctionWithLinebreaksInConditionWorks (125 ms) [ RUN ] BuilderTests.RuleWithCommentedConjunctionInConditionWorks [ OK ] BuilderTests.RuleWithCommentedConjunctionInConditionWorks (178 ms) [ RUN ] BuilderTests.RuleWithCommentedDisjunctionInConditionWorks [ OK ] BuilderTests.RuleWithCommentedDisjunctionInConditionWorks (121 ms) [ RUN ] BuilderTests.RuleWithParenthesesWithLinebreaksInConditionWorks [ OK ] BuilderTests.RuleWithParenthesesWithLinebreaksInConditionWorks (169 ms) [ RUN ] BuilderTests.RuleWithEscapedSequencesWorks [ OK ] BuilderTests.RuleWithEscapedSequencesWorks (120 ms) [ RUN ] BuilderTests.RuleWithNoneOfThemExpression [ OK ] BuilderTests.RuleWithNoneOfThemExpression (175 ms) [ RUN ] BuilderTests.RuleWithNoneOfThemInRangeWorks [ OK ] BuilderTests.RuleWithNoneOfThemInRangeWorks (119 ms) [ RUN ] BuilderTests.RuleWithStringsWithDifferentKindsOfModifiers [ OK ] BuilderTests.RuleWithStringsWithDifferentKindsOfModifiers (180 ms) [ RUN ] BuilderTests.RuleWithXorStringModifierOutOfBounds [ OK ] BuilderTests.RuleWithXorStringModifierOutOfBounds (87 ms) [ RUN ] BuilderTests.RuleWithXorStringModifierOutOfBoundsLowerKey [ OK ] BuilderTests.RuleWithXorStringModifierOutOfBoundsLowerKey (87 ms) [ RUN ] BuilderTests.RuleWithXorStringModifierOutOfBoundsHigherKey [ OK ] BuilderTests.RuleWithXorStringModifierOutOfBoundsHigherKey (88 ms) [ RUN ] BuilderTests.RuleWithXorStringModifierLowerBoundGreaterThanHigherBound [ OK ] BuilderTests.RuleWithXorStringModifierLowerBoundGreaterThanHigherBound (87 ms) [ RUN ] BuilderTests.ConjunctionWithSingleTerm [ OK ] BuilderTests.ConjunctionWithSingleTerm (176 ms) [ RUN ] BuilderTests.DefinedTerm [ OK ] BuilderTests.DefinedTerm (176 ms) [ RUN ] BuilderTests.PercentageOfStringSet [ OK ] BuilderTests.PercentageOfStringSet (177 ms) [ RUN ] BuilderTests.FloatValueWorks [ OK ] BuilderTests.FloatValueWorks (173 ms) [ RUN ] BuilderTests.IequalsWorks [ OK ] BuilderTests.IequalsWorks (170 ms) [ RUN ] BuilderTests.IdWildcardWorks [ OK ] BuilderTests.IdWildcardWorks (173 ms) [ RUN ] BuilderTests.StringAsBoolInConditionWorks [ OK ] BuilderTests.StringAsBoolInConditionWorks (170 ms) [ RUN ] BuilderTests.IcontainsWorks [ OK ] BuilderTests.IcontainsWorks (176 ms) [ RUN ] BuilderTests.IendsWithWorks [ OK ] BuilderTests.IendsWithWorks (176 ms) [ RUN ] BuilderTests.IstartsWithWorks [ OK ] BuilderTests.IstartsWithWorks (174 ms) [ RUN ] BuilderTests.StartsWithWorks [ OK ] BuilderTests.StartsWithWorks (179 ms) [ RUN ] BuilderTests.EndsWithWorks [ OK ] BuilderTests.EndsWithWorks (172 ms) [----------] 66 tests from BuilderTests (9916 ms total) [----------] 256 tests from ParserTests [ RUN ] ParserTests.EmptyInputWorks [ OK ] ParserTests.EmptyInputWorks (89 ms) [ RUN ] ParserTests.EmptyRuleWorks [ OK ] ParserTests.EmptyRuleWorks (87 ms) [ RUN ] ParserTests.RulesWithSameNameForbidden [ OK ] ParserTests.RulesWithSameNameForbidden (87 ms) [ RUN ] ParserTests.RuleWithTagsWorks [ OK ] ParserTests.RuleWithTagsWorks (87 ms) [ RUN ] ParserTests.RuleWithMetasWorks [ OK ] ParserTests.RuleWithMetasWorks (88 ms) [ RUN ] ParserTests.RuleWithRepetitiveMetasWorks [ OK ] ParserTests.RuleWithRepetitiveMetasWorks (86 ms) [ RUN ] ParserTests.HexAndDecimalIntegersArePreservedWorks [ OK ] ParserTests.HexAndDecimalIntegersArePreservedWorks (87 ms) [ RUN ] ParserTests.RuleWithVariablesWorks [ OK ] ParserTests.RuleWithVariablesWorks (87 ms) [ RUN ] ParserTests.VariableInConditionWorks [ OK ] ParserTests.VariableInConditionWorks (88 ms) [ RUN ] ParserTests.RuleWithNoStringsDoesntWork [ OK ] ParserTests.RuleWithNoStringsDoesntWork (84 ms) [ RUN ] ParserTests.RuleWithPlainTextStringsWorks [ OK ] ParserTests.RuleWithPlainTextStringsWorks (82 ms) [ RUN ] ParserTests.MultipleRulesWorks [ OK ] ParserTests.MultipleRulesWorks (87 ms) [ RUN ] ParserTests.RuleWithPlainTextStringWithModifiersWorks [ OK ] ParserTests.RuleWithPlainTextStringWithModifiersWorks (87 ms) [ RUN ] ParserTests.DuplicatedStringModifierForbidden [ OK ] ParserTests.DuplicatedStringModifierForbidden (83 ms) [ RUN ] ParserTests.InvalidStringModifiersCombination [ OK ] ParserTests.InvalidStringModifiersCombination (86 ms) [ RUN ] ParserTests.MultipleBase64AlphabetsForbidden [ OK ] ParserTests.MultipleBase64AlphabetsForbidden (85 ms) [ RUN ] ParserTests.HexStringWithPlainNibbleWorks [ OK ] ParserTests.HexStringWithPlainNibbleWorks (88 ms) [ RUN ] ParserTests.HexStringWithPlainNibblesWorks [ OK ] ParserTests.HexStringWithPlainNibblesWorks (92 ms) [ RUN ] ParserTests.HexStringWithLowHighJumpWorks [ OK ] ParserTests.HexStringWithLowHighJumpWorks (89 ms) [ RUN ] ParserTests.HexStringWithLowJumpWorks [ OK ] ParserTests.HexStringWithLowJumpWorks (90 ms) [ RUN ] ParserTests.HexStringWithUnrestrictedJumpWorks [ OK ] ParserTests.HexStringWithUnrestrictedJumpWorks (87 ms) [ RUN ] ParserTests.HexStringWithConstantJumpWorks [ OK ] ParserTests.HexStringWithConstantJumpWorks (89 ms) [ RUN ] ParserTests.HexStringWithSimpleOrWorks [ OK ] ParserTests.HexStringWithSimpleOrWorks (85 ms) [ RUN ] ParserTests.HexStringWithMultibyteSimpleOrWorks [ OK ] ParserTests.HexStringWithMultibyteSimpleOrWorks (85 ms) [ RUN ] ParserTests.HexStringWithNestedOrWorks [ OK ] ParserTests.HexStringWithNestedOrWorks (85 ms) [ RUN ] ParserTests.HexStringWithOrAndJumpWorks [ OK ] ParserTests.HexStringWithOrAndJumpWorks (87 ms) [ RUN ] ParserTests.HexStringWithOrOnTheBeginningAndEnd [ OK ] ParserTests.HexStringWithOrOnTheBeginningAndEnd (84 ms) [ RUN ] ParserTests.HexStringWithJumpAtBeginningForbidden [ OK ] ParserTests.HexStringWithJumpAtBeginningForbidden (82 ms) [ RUN ] ParserTests.HexStringWithJumpAtEndForbidden [ OK ] ParserTests.HexStringWithJumpAtEndForbidden (85 ms) [ RUN ] ParserTests.MultipleRulesWithHexStrings [ OK ] ParserTests.MultipleRulesWithHexStrings (84 ms) [ RUN ] ParserTests.InvalidHexStringAtom1 [ OK ] ParserTests.InvalidHexStringAtom1 (87 ms) [ RUN ] ParserTests.InvalidHexStringAtom2 [ OK ] ParserTests.InvalidHexStringAtom2 (82 ms) [ RUN ] ParserTests.InvalidHexStringOr [ OK ] ParserTests.InvalidHexStringOr (85 ms) [ RUN ] ParserTests.RegexpWithJustCharsWorks [ OK ] ParserTests.RegexpWithJustCharsWorks (84 ms) [ RUN ] ParserTests.MultipleRegexpsWithJustCharsWorks [ OK ] ParserTests.MultipleRegexpsWithJustCharsWorks (92 ms) [ RUN ] ParserTests.RegexpLimitedToWholeLineWorks [ OK ] ParserTests.RegexpLimitedToWholeLineWorks (91 ms) [ RUN ] ParserTests.RegexpWithPredefinedClassesWorks [ OK ] ParserTests.RegexpWithPredefinedClassesWorks (93 ms) [ RUN ] ParserTests.RegexpWithCustomClassWorks [ OK ] ParserTests.RegexpWithCustomClassWorks (93 ms) [ RUN ] ParserTests.RegexpWithCustomNegativeClassWorks [ OK ] ParserTests.RegexpWithCustomNegativeClassWorks (88 ms) [ RUN ] ParserTests.RegexpWithOptionalEscapedCharsWorks [ OK ] ParserTests.RegexpWithOptionalEscapedCharsWorks (92 ms) [ RUN ] ParserTests.RegexpWithEscapedSquareBracketsInsideClassWorks [ OK ] ParserTests.RegexpWithEscapedSquareBracketsInsideClassWorks (90 ms) [ RUN ] ParserTests.RegexpWithUnescapedSquareBracketsInsideClassWorks [ OK ] ParserTests.RegexpWithUnescapedSquareBracketsInsideClassWorks (88 ms) [ RUN ] ParserTests.RegexpWithEmptyAlternationGroupWorks [ OK ] ParserTests.RegexpWithEmptyAlternationGroupWorks (90 ms) [ RUN ] ParserTests.InvalidCuckooRuleAccessTokenStream [ OK ] ParserTests.InvalidCuckooRuleAccessTokenStream (89 ms) [ RUN ] ParserTests.ComplicatedRegexpClassWorks [ OK ] ParserTests.ComplicatedRegexpClassWorks (92 ms) [ RUN ] ParserTests.RegexpWithIterationWorks [ OK ] ParserTests.RegexpWithIterationWorks (90 ms) [ RUN ] ParserTests.RegexpWithPositiveIterationWorks [ OK ] ParserTests.RegexpWithPositiveIterationWorks (89 ms) [ RUN ] ParserTests.RegexpWithOptionalWorks [ OK ] ParserTests.RegexpWithOptionalWorks (91 ms) [ RUN ] ParserTests.RegexpWithRangesWorks [ OK ] ParserTests.RegexpWithRangesWorks (89 ms) [ RUN ] ParserTests.RegexpWithGreedyOperatorsWorks [ OK ] ParserTests.RegexpWithGreedyOperatorsWorks (88 ms) [ RUN ] ParserTests.RegexpWithGroupsWorks [ OK ] ParserTests.RegexpWithGroupsWorks (92 ms) [ RUN ] ParserTests.RegexpWithOrWorks [ OK ] ParserTests.RegexpWithOrWorks (90 ms) [ RUN ] ParserTests.RegexpWithModifiersWorks [ OK ] ParserTests.RegexpWithModifiersWorks (93 ms) [ RUN ] ParserTests.RegexpWithUndefinedRangeForbidden [ OK ] ParserTests.RegexpWithUndefinedRangeForbidden (90 ms) [ RUN ] ParserTests.RegexpWithInvalidRangeForbidden [ OK ] ParserTests.RegexpWithInvalidRangeForbidden (88 ms) [ RUN ] ParserTests.RulesWithVariablesAndStringsWork [ OK ] ParserTests.RulesWithVariablesAndStringsWork (92 ms) [ RUN ] ParserTests.RuleWithUnorderedSections [ OK ] ParserTests.RuleWithUnorderedSections (89 ms) [ RUN ] ParserTests.GlobalRuleModifierWorks [ OK ] ParserTests.GlobalRuleModifierWorks (89 ms) [ RUN ] ParserTests.PrivateRuleModifierWorks [ OK ] ParserTests.PrivateRuleModifierWorks (89 ms) [ RUN ] ParserTests.PrivateGlobalRuleModifierWorks [ OK ] ParserTests.PrivateGlobalRuleModifierWorks (89 ms) [ RUN ] ParserTests.SetRuleModifierWorks [ OK ] ParserTests.SetRuleModifierWorks (91 ms) [ RUN ] ParserTests.SetRuleModifierWorksWithDeleting [ OK ] ParserTests.SetRuleModifierWorksWithDeleting (89 ms) [ RUN ] ParserTests.ImportWorks [ OK ] ParserTests.ImportWorks (90 ms) [ RUN ] ParserTests.ImportOfUnrecognizedModuleForbidden [ OK ] ParserTests.ImportOfUnrecognizedModuleForbidden (90 ms) [ RUN ] ParserTests.TrueConditionWorks [ OK ] ParserTests.TrueConditionWorks (90 ms) [ RUN ] ParserTests.FalseConditionWorks [ OK ] ParserTests.FalseConditionWorks (92 ms) [ RUN ] ParserTests.StringIdConditionWorks [ OK ] ParserTests.StringIdConditionWorks (91 ms) [ RUN ] ParserTests.StringAtEntryPointConditionWorks [ OK ] ParserTests.StringAtEntryPointConditionWorks (92 ms) [ RUN ] ParserTests.StringInRangeConditionWorks [ OK ] ParserTests.StringInRangeConditionWorks (91 ms) [ RUN ] ParserTests.StringInRangeConditionWorks2 [ OK ] ParserTests.StringInRangeConditionWorks2 (88 ms) [ RUN ] ParserTests.NotConditionWorks [ OK ] ParserTests.NotConditionWorks (91 ms) [ RUN ] ParserTests.AndConditionWorks [ OK ] ParserTests.AndConditionWorks (91 ms) [ RUN ] ParserTests.AndConditionWorks2 [ OK ] ParserTests.AndConditionWorks2 (89 ms) [ RUN ] ParserTests.OrConditionWorks [ OK ] ParserTests.OrConditionWorks (93 ms) [ RUN ] ParserTests.EscapedOrConditionWorks [ OK ] ParserTests.EscapedOrConditionWorks (91 ms) [ RUN ] ParserTests.RelationalConditionWorks [ OK ] ParserTests.RelationalConditionWorks (88 ms) [ RUN ] ParserTests.ParenthesesConditionWorks [ OK ] ParserTests.ParenthesesConditionWorks (90 ms) [ RUN ] ParserTests.ArithmeticOpConditionWorksSimple [ OK ] ParserTests.ArithmeticOpConditionWorksSimple (89 ms) [ RUN ] ParserTests.ArithmeticOpConditionWorks [ OK ] ParserTests.ArithmeticOpConditionWorks (91 ms) [ RUN ] ParserTests.ArithmeticOpConditionWorks2 [ OK ] ParserTests.ArithmeticOpConditionWorks2 (92 ms) [ RUN ] ParserTests.BitwiseOpConditionNegation [ OK ] ParserTests.BitwiseOpConditionNegation (86 ms) [ RUN ] ParserTests.BitwiseOpConditionWorks [ OK ] ParserTests.BitwiseOpConditionWorks (90 ms) [ RUN ] ParserTests.IntFunctionConditionWorks [ OK ] ParserTests.IntFunctionConditionWorks (86 ms) [ RUN ] ParserTests.DoubleInConditionWorks [ OK ] ParserTests.DoubleInConditionWorks (88 ms) [ RUN ] ParserTests.ContainsInConditionWorks [ OK ] ParserTests.ContainsInConditionWorks (87 ms) [ RUN ] ParserTests.MatchesInConditionWorks [ OK ] ParserTests.MatchesInConditionWorks (87 ms) [ RUN ] ParserTests.StringCountConditionWorks [ OK ] ParserTests.StringCountConditionWorks (88 ms) [ RUN ] ParserTests.StringOffsetConditionWorks [ OK ] ParserTests.StringOffsetConditionWorks (86 ms) [ RUN ] ParserTests.HexadecimalNumbersInConditionWorks [ OK ] ParserTests.HexadecimalNumbersInConditionWorks (88 ms) [ RUN ] ParserTests.StringLengthConditionWorks [ OK ] ParserTests.StringLengthConditionWorks (89 ms) [ RUN ] ParserTests.FunctionCallConditionWorks [ OK ] ParserTests.FunctionCallConditionWorks (88 ms) [ RUN ] ParserTests.StructureAccessConditionWorks [ OK ] ParserTests.StructureAccessConditionWorks (88 ms) [ RUN ] ParserTests.ArrayAccessConditionWorks1 [ OK ] ParserTests.ArrayAccessConditionWorks1 (88 ms) [ RUN ] ParserTests.ArrayAccessConditionWorks2 [ OK ] ParserTests.ArrayAccessConditionWorks2 (87 ms) [ RUN ] ParserTests.ForIntegerSetConditionWorks [ OK ] ParserTests.ForIntegerSetConditionWorks (88 ms) [ RUN ] ParserTests.ForArrayConditionWorks [ OK ] ParserTests.ForArrayConditionWorks (90 ms) [ RUN ] ParserTests.NestedForArrayConditionWorks [ OK ] ParserTests.NestedForArrayConditionWorks (87 ms) [ RUN ] ParserTests.UserDefinedArrayWorks [ OK ] ParserTests.UserDefinedArrayWorks (89 ms) [ RUN ] ParserTests.ForDictConditionWorks [ OK ] ParserTests.ForDictConditionWorks (88 ms) [ RUN ] ParserTests.ForStringSetConditionWorks [ OK ] ParserTests.ForStringSetConditionWorks (87 ms) [ RUN ] ParserTests.ForStringLiteralSetConditionWorks [ OK ] ParserTests.ForStringLiteralSetConditionWorks (88 ms) [ RUN ] ParserTests.ForStringLiteralSetWithOneStringConditionWorks [ OK ] ParserTests.ForStringLiteralSetWithOneStringConditionWorks (89 ms) [ RUN ] ParserTests.ForStringLiteralSetWithStringSymbolsConditionWorks [ OK ] ParserTests.ForStringLiteralSetWithStringSymbolsConditionWorks (92 ms) [ RUN ] ParserTests.ForExpressionSetWithItemsVariousTypesForbidden [ OK ] ParserTests.ForExpressionSetWithItemsVariousTypesForbidden (90 ms) [ RUN ] ParserTests.NoneOfThemConditionWorks [ OK ] ParserTests.NoneOfThemConditionWorks (90 ms) [ RUN ] ParserTests.NoneOfSetConditionWorks [ OK ] ParserTests.NoneOfSetConditionWorks (89 ms) [ RUN ] ParserTests.OfConditionWorks [ OK ] ParserTests.OfConditionWorks (87 ms) [ RUN ] ParserTests.OfAtConditionWorks [ OK ] ParserTests.OfAtConditionWorks (87 ms) [ RUN ] ParserTests.OfAtWithStringSetConditionWorks [ OK ] ParserTests.OfAtWithStringSetConditionWorks (88 ms) [ RUN ] ParserTests.OfWithStringSetAndAtWithExpressionConditionWorks [ OK ] ParserTests.OfWithStringSetAndAtWithExpressionConditionWorks (87 ms) [ RUN ] ParserTests.EmptyStringMetaValue [ OK ] ParserTests.EmptyStringMetaValue (87 ms) [ RUN ] ParserTests.EmptyPlainStringValue [ OK ] ParserTests.EmptyPlainStringValue (84 ms) [ RUN ] ParserTests.EmptyStringInConditionWorks [ OK ] ParserTests.EmptyStringInConditionWorks (88 ms) [ RUN ] ParserTests.StringsAndArithmeticOperationsForbidden [ OK ] ParserTests.StringsAndArithmeticOperationsForbidden (81 ms) [ RUN ] ParserTests.BoolAndArithmeticOperationsForbidden [ OK ] ParserTests.BoolAndArithmeticOperationsForbidden (86 ms) [ RUN ] ParserTests.ContainsAndNonStringForbidden [ OK ] ParserTests.ContainsAndNonStringForbidden (85 ms) [ RUN ] ParserTests.UndefinedStringReferenceForbidden [ OK ] ParserTests.UndefinedStringReferenceForbidden (86 ms) [ RUN ] ParserTests.StringWildcardConditionWorks [ OK ] ParserTests.StringWildcardConditionWorks (86 ms) [ RUN ] ParserTests.StringWildcardConditionWithNoMatchingStringForbidden [ OK ] ParserTests.StringWildcardConditionWithNoMatchingStringForbidden (81 ms) [ RUN ] ParserTests.SameVariableInNestedForLoopsForbidden [ OK ] ParserTests.SameVariableInNestedForLoopsForbidden (86 ms) [ RUN ] ParserTests.FloatValueWorks [ OK ] ParserTests.FloatValueWorks (85 ms) [ RUN ] ParserTests.FloatValueWorks2 [ OK ] ParserTests.FloatValueWorks2 (84 ms) [ RUN ] ParserTests.ConsoleModuleWorks [ OK ] ParserTests.ConsoleModuleWorks (83 ms) [ RUN ] ParserTests.CuckooModuleWorks [ OK ] ParserTests.CuckooModuleWorks (88 ms) [ RUN ] ParserTests.DotnetModuleWorks [ OK ] ParserTests.DotnetModuleWorks (94 ms) [ RUN ] ParserTests.DexModuleWorks [ OK ] ParserTests.DexModuleWorks (89 ms) [ RUN ] ParserTests.ElfModuleWorks [ OK ] ParserTests.ElfModuleWorks (87 ms) [ RUN ] ParserTests.HashModuleWorks [ OK ] ParserTests.HashModuleWorks (87 ms) [ RUN ] ParserTests.MagicModuleWorks [ OK ] ParserTests.MagicModuleWorks (89 ms) [ RUN ] ParserTests.MathModuleWorks1 [ OK ] ParserTests.MathModuleWorks1 (86 ms) [ RUN ] ParserTests.MathModuleWorks2 [ OK ] ParserTests.MathModuleWorks2 (87 ms) [ RUN ] ParserTests.PeModuleWorks1 [ OK ] ParserTests.PeModuleWorks1 (87 ms) [ RUN ] ParserTests.PeModuleWorks2 [ OK ] ParserTests.PeModuleWorks2 (90 ms) [ RUN ] ParserTests.PeModuleWorks3 [ OK ] ParserTests.PeModuleWorks3 (90 ms) [ RUN ] ParserTests.VirusTotalSymbolsWork [ OK ] ParserTests.VirusTotalSymbolsWork (89 ms) [ RUN ] ParserTests.TransformationToTextWorks [ OK ] ParserTests.TransformationToTextWorks (90 ms) [ RUN ] ParserTests.RemoveLineBeforeAndWorks [ OK ] ParserTests.RemoveLineBeforeAndWorks (93 ms) [ RUN ] ParserTests.RemoveLineBeforeAndWithCommentsWorks [ OK ] ParserTests.RemoveLineBeforeAndWithCommentsWorks (87 ms) [ RUN ] ParserTests.RemoveLineBeforeAndWithComments2Works [ OK ] ParserTests.RemoveLineBeforeAndWithComments2Works (89 ms) [ RUN ] ParserTests.MultipleRulesWorks2 [ OK ] ParserTests.MultipleRulesWorks2 (86 ms) [ RUN ] ParserTests.KbMbIntegerMultipliersWorks [ OK ] ParserTests.KbMbIntegerMultipliersWorks (87 ms) [ RUN ] ParserTests.ReferencingRuleFromOtherRuleWorks [ OK ] ParserTests.ReferencingRuleFromOtherRuleWorks (84 ms) [ RUN ] ParserTests.RegexpWithSuffixModifierWorks [ OK ] ParserTests.RegexpWithSuffixModifierWorks (88 ms) [ RUN ] ParserTests.GlobalVariablesWorks [ OK ] ParserTests.GlobalVariablesWorks (85 ms) [ RUN ] ParserTests.LengthOfHexStringWorks [ OK ] ParserTests.LengthOfHexStringWorks (86 ms) [ RUN ] ParserTests.HexStringWithSpacesInJumpWorks [ OK ] ParserTests.HexStringWithSpacesInJumpWorks (85 ms) [ RUN ] ParserTests.ComplicatedHexStringAlterationWorks [ OK ] ParserTests.ComplicatedHexStringAlterationWorks (85 ms) [ RUN ] ParserTests.ComplicatedHexStringWorks [ OK ] ParserTests.ComplicatedHexStringWorks (89 ms) [ RUN ] ParserTests.NibbleGetterWorks [ OK ] ParserTests.NibbleGetterWorks (88 ms) [ RUN ] ParserTests.HexEscapeWorks [ OK ] ParserTests.HexEscapeWorks (89 ms) [ RUN ] ParserTests.EscapedSequencesInMetaWorks [ OK ] ParserTests.EscapedSequencesInMetaWorks (86 ms) [ RUN ] ParserTests.EscapedSequencesWorks [ OK ] ParserTests.EscapedSequencesWorks (88 ms) [ RUN ] ParserTests.InvalidEscapedSequence1 [ OK ] ParserTests.InvalidEscapedSequence1 (91 ms) [ RUN ] ParserTests.InvalidEscapedSequence2 [ OK ] ParserTests.InvalidEscapedSequence2 (89 ms) [ RUN ] ParserTests.NewlineInHexString [ OK ] ParserTests.NewlineInHexString (90 ms) [ RUN ] ParserTests.ErrorWhenUnknownTokenAfterImport [ OK ] ParserTests.ErrorWhenUnknownTokenAfterImport (82 ms) [ RUN ] ParserTests.PeDataDirectoryIsArray [ OK ] ParserTests.PeDataDirectoryIsArray (87 ms) [ RUN ] ParserTests.AnonymousStrings [ OK ] ParserTests.AnonymousStrings (87 ms) [ RUN ] ParserTests.AllOfThemInOperator [ OK ] ParserTests.AllOfThemInOperator (91 ms) [ RUN ] ParserTests.AllOfInOperatorAndAnyOfInOperator [ OK ] ParserTests.AllOfInOperatorAndAnyOfInOperator (88 ms) [ RUN ] ParserTests.StringCountInRange [ OK ] ParserTests.StringCountInRange (88 ms) [ RUN ] ParserTests.CommentsInCommonLocations [ OK ] ParserTests.CommentsInCommonLocations (93 ms) [ RUN ] ParserTests.CommentsInHexString [ OK ] ParserTests.CommentsInHexString (89 ms) [ RUN ] ParserTests.CommentsInCondition [ OK ] ParserTests.CommentsInCondition (91 ms) [ RUN ] ParserTests.ForCycleMultipleRows [ OK ] ParserTests.ForCycleMultipleRows (93 ms) [ RUN ] ParserTests.ForCycleMultipleRowsWithCRLF [ OK ] ParserTests.ForCycleMultipleRowsWithCRLF (92 ms) [ RUN ] ParserTests.OneMoreTest [ OK ] ParserTests.OneMoreTest (93 ms) [ RUN ] ParserTests.NonUTFmetaWorks [ OK ] ParserTests.NonUTFmetaWorks (90 ms) [ RUN ] ParserTests.NonUTFconditionWorks [ OK ] ParserTests.NonUTFconditionWorks (91 ms) [ RUN ] ParserTests.NonUTFcommentWorks [ OK ] ParserTests.NonUTFcommentWorks (92 ms) [ RUN ] ParserTests.NonUTFcommentsWork [ OK ] ParserTests.NonUTFcommentsWork (88 ms) [ RUN ] ParserTests.RemoveTrailingWhitespacesFromComments [ OK ] ParserTests.RemoveTrailingWhitespacesFromComments (87 ms) [ RUN ] ParserTests.AddMetaAfterParse [ OK ] ParserTests.AddMetaAfterParse (85 ms) [ RUN ] ParserTests.SetTagsAfterParse [ OK ] ParserTests.SetTagsAfterParse (88 ms) [ RUN ] ParserTests.RemoveMetasAfterParse [ OK ] ParserTests.RemoveMetasAfterParse (90 ms) [ RUN ] ParserTests.ParseIncompleteUnknownImport [ OK ] ParserTests.ParseIncompleteUnknownImport (87 ms) [ RUN ] ParserTests.ParseIncompleteReferenceUnknownSymbol [ OK ] ParserTests.ParseIncompleteReferenceUnknownSymbol (88 ms) [ RUN ] ParserTests.ParseIncompleteUnknownObjectSymbol [ OK ] ParserTests.ParseIncompleteUnknownObjectSymbol (88 ms) [ RUN ] ParserTests.ParseIncompleteUnknownObjectSymbolFromKnownModule [ OK ] ParserTests.ParseIncompleteUnknownObjectSymbolFromKnownModule (89 ms) [ RUN ] ParserTests.ParseIncompleteUnknownArraySymbol [ OK ] ParserTests.ParseIncompleteUnknownArraySymbol (89 ms) [ RUN ] ParserTests.ParseIncompleteUnknownArraySymbolFromKnownModule [ OK ] ParserTests.ParseIncompleteUnknownArraySymbolFromKnownModule (90 ms) [ RUN ] ParserTests.ParseIncompleteUnknownArraySymbolFromUnknownModule [ OK ] ParserTests.ParseIncompleteUnknownArraySymbolFromUnknownModule (89 ms) [ RUN ] ParserTests.ParseIncompleteUnknownObjectSymbolFromUnknownModule [ OK ] ParserTests.ParseIncompleteUnknownObjectSymbolFromUnknownModule (91 ms) [ RUN ] ParserTests.ParseIncompleteUnknownForDict [ OK ] ParserTests.ParseIncompleteUnknownForDict (89 ms) [ RUN ] ParserTests.ParseIncompleteUnknownForDictFromKnownModule [ OK ] ParserTests.ParseIncompleteUnknownForDictFromKnownModule (90 ms) [ RUN ] ParserTests.ParseIncompleteUnknownForDictFromUnknownModule [ OK ] ParserTests.ParseIncompleteUnknownForDictFromUnknownModule (87 ms) [ RUN ] ParserTests.ParseIncompleteUnknownFor [ OK ] ParserTests.ParseIncompleteUnknownFor (90 ms) [ RUN ] ParserTests.ParseIncompleteUnknownForFromKnownModule [ OK ] ParserTests.ParseIncompleteUnknownForFromKnownModule (85 ms) [ RUN ] ParserTests.ParseIncompleteUnknownForFromUnknownModule [ OK ] ParserTests.ParseIncompleteUnknownForFromUnknownModule (84 ms) [ RUN ] ParserTests.ParseIncompleteUnknownFunctionCall [ OK ] ParserTests.ParseIncompleteUnknownFunctionCall (85 ms) [ RUN ] ParserTests.ParseIncompleteUnknownFunctionCallFromKnownModule [ OK ] ParserTests.ParseIncompleteUnknownFunctionCallFromKnownModule (84 ms) [ RUN ] ParserTests.ParseIncompleteUnknownFunctionCallFromUnknownModule [ OK ] ParserTests.ParseIncompleteUnknownFunctionCallFromUnknownModule (83 ms) [ RUN ] ParserTests.ParseIncompleteUnknownFunctionOverloadOfKnownFunction [ OK ] ParserTests.ParseIncompleteUnknownFunctionOverloadOfKnownFunction (85 ms) [ RUN ] ParserTests.ParseIncompleteRuleNotFinished [ OK ] ParserTests.ParseIncompleteRuleNotFinished (85 ms) [ RUN ] ParserTests.AutoformattingClosingBracket [ OK ] ParserTests.AutoformattingClosingBracket (89 ms) [ RUN ] ParserTests.AutoformattingClosingDoubleBracket [ OK ] ParserTests.AutoformattingClosingDoubleBracket (90 ms) [ RUN ] ParserTests.AutoformattingClosingBracketWithOtherBracketsInside [ OK ] ParserTests.AutoformattingClosingBracketWithOtherBracketsInside (89 ms) [ RUN ] ParserTests.AutoformattingMultipleLineBrackets [ OK ] ParserTests.AutoformattingMultipleLineBrackets (90 ms) [ RUN ] ParserTests.AutoformattingProperAlignment [ OK ] ParserTests.AutoformattingProperAlignment (87 ms) [ RUN ] ParserTests.AutoformattingProperAlignmentOrStatement [ OK ] ParserTests.AutoformattingProperAlignmentOrStatement (93 ms) [ RUN ] ParserTests.AutoformattingAddNewlinesMinimal [ OK ] ParserTests.AutoformattingAddNewlinesMinimal (91 ms) [ RUN ] ParserTests.AutoformattingAddNewLines [ OK ] ParserTests.AutoformattingAddNewLines (85 ms) [ RUN ] ParserTests.AutoformattingAddNewlinesToBothSides [ OK ] ParserTests.AutoformattingAddNewlinesToBothSides (87 ms) [ RUN ] ParserTests.AutoformattingAddCRLF [ OK ] ParserTests.AutoformattingAddCRLF (89 ms) [ RUN ] ParserTests.AutoformattingNoSpaceBeforeArrayAccess [ OK ] ParserTests.AutoformattingNoSpaceBeforeArrayAccess (89 ms) [ RUN ] ParserTests.AutoformattingSpaceBeforeComments [ OK ] ParserTests.AutoformattingSpaceBeforeComments (91 ms) [ RUN ] ParserTests.AutoformattingRegexpClasses [ OK ] ParserTests.AutoformattingRegexpClasses (89 ms) [ RUN ] ParserTests.AutoformattingAlignedComments1 [ OK ] ParserTests.AutoformattingAlignedComments1 (91 ms) [ RUN ] ParserTests.AutoformattingAlignedComments2 [ OK ] ParserTests.AutoformattingAlignedComments2 (87 ms) [ RUN ] ParserTests.AutoformattingAlignedComments3 [ OK ] ParserTests.AutoformattingAlignedComments3 (89 ms) [ RUN ] ParserTests.AutoformattingNewlinesMultipleRules [ OK ] ParserTests.AutoformattingNewlinesMultipleRules (90 ms) [ RUN ] ParserTests.AutoformattingRemoveRedundantBlankLines [ OK ] ParserTests.AutoformattingRemoveRedundantBlankLines (88 ms) [ RUN ] ParserTests.AutoformattingRemoveRedundantBlankLines2 [ OK ] ParserTests.AutoformattingRemoveRedundantBlankLines2 (91 ms) [ RUN ] ParserTests.AutoformattingCommentInsideHexstringOnNewline [ OK ] ParserTests.AutoformattingCommentInsideHexstringOnNewline (87 ms) [ RUN ] ParserTests.AutoformattingNoSpaceBeforeNewLine [ OK ] ParserTests.AutoformattingNoSpaceBeforeNewLine (88 ms) [ RUN ] ParserTests.AutoformattingOfOnelineRule [ OK ] ParserTests.AutoformattingOfOnelineRule (90 ms) [ RUN ] ParserTests.AutoformattingOfTwoOnelineRules [ OK ] ParserTests.AutoformattingOfTwoOnelineRules (86 ms) [ RUN ] ParserTests.AutoformattingVariableInCondition [ OK ] ParserTests.AutoformattingVariableInCondition (85 ms) [ RUN ] ParserTests.RenameReferencedRuleWorks [ OK ] ParserTests.RenameReferencedRuleWorks (87 ms) [ RUN ] ParserTests.RenameStringWorks1 [ OK ] ParserTests.RenameStringWorks1 (84 ms) [ RUN ] ParserTests.RenameStringWorks2 [ OK ] ParserTests.RenameStringWorks2 (89 ms) [ RUN ] ParserTests.RenameStringWorks3 [ OK ] ParserTests.RenameStringWorks3 (87 ms) [ RUN ] ParserTests.StringXorModifierWithArguments [ OK ] ParserTests.StringXorModifierWithArguments (86 ms) [ RUN ] ParserTests.StringXorModifierWithOutOfBoundsKey [ OK ] ParserTests.StringXorModifierWithOutOfBoundsKey (84 ms) [ RUN ] ParserTests.StringXorModifierWithOutOfBoundsLowerKey [ OK ] ParserTests.StringXorModifierWithOutOfBoundsLowerKey (89 ms) [ RUN ] ParserTests.StringXorModifierWithOutOfBoundsHigherKey [ OK ] ParserTests.StringXorModifierWithOutOfBoundsHigherKey (89 ms) [ RUN ] ParserTests.StringXorModifierWithLowerBoundGreaterThanHigherBound [ OK ] ParserTests.StringXorModifierWithLowerBoundGreaterThanHigherBound (89 ms) [ RUN ] ParserTests.PrivateStringModifier [ OK ] ParserTests.PrivateStringModifier (90 ms) [ RUN ] ParserTests.UnexpectedEndOfFile [ OK ] ParserTests.UnexpectedEndOfFile (86 ms) [ RUN ] ParserTests.ReuseOfParserAfterError [ OK ] ParserTests.ReuseOfParserAfterError (87 ms) [ RUN ] ParserTests.DefinedExpression [ OK ] ParserTests.DefinedExpression (87 ms) [ RUN ] ParserTests.IequalsExpression [ OK ] ParserTests.IequalsExpression (88 ms) [ RUN ] ParserTests.ParsePeSignaturesXAlgorithmOID [ OK ] ParserTests.ParsePeSignaturesXAlgorithmOID (86 ms) [ RUN ] ParserTests.ParseELFDynsym [ OK ] ParserTests.ParseELFDynsym (91 ms) [ RUN ] ParserTests.ParsePercentage1Error [ OK ] ParserTests.ParsePercentage1Error (86 ms) [ RUN ] ParserTests.ParsePercentage2Error [ OK ] ParserTests.ParsePercentage2Error (88 ms) [ RUN ] ParserTests.ParsePercentage3 [ OK ] ParserTests.ParsePercentage3 (89 ms) [ RUN ] ParserTests.ParsePercentage4 [ OK ] ParserTests.ParsePercentage4 (85 ms) [ RUN ] ParserTests.ParsePercentage5 [ OK ] ParserTests.ParsePercentage5 (83 ms) [ RUN ] ParserTests.ParsePercentage6 [ OK ] ParserTests.ParsePercentage6 (84 ms) [ RUN ] ParserTests.ParsePercentage7 [ OK ] ParserTests.ParsePercentage7 (87 ms) [ RUN ] ParserTests.ParseOfRule [ OK ] ParserTests.ParseOfRule (85 ms) [ RUN ] ParserTests.ParseOfRuleInvalid [ OK ] ParserTests.ParseOfRuleInvalid (82 ms) [ RUN ] ParserTests.ParseOfRuleWildcard [ OK ] ParserTests.ParseOfRuleWildcard (85 ms) [ RUN ] ParserTests.ParseOfRuleWildcardInvalid [ OK ] ParserTests.ParseOfRuleWildcardInvalid (85 ms) [ RUN ] ParserTests.ParseAmbiguousWithIdWildcard [ OK ] ParserTests.ParseAmbiguousWithIdWildcard (85 ms) [ RUN ] ParserTests.ExpressionUids [ OK ] ParserTests.ExpressionUids (84 ms) [ RUN ] ParserTests.OctalIntegerWorks [ OK ] ParserTests.OctalIntegerWorks (82 ms) [ RUN ] ParserTests.Yara423FunctionsWorks [ OK ] ParserTests.Yara423FunctionsWorks (88 ms) [ RUN ] ParserTests.HexStringNotWorks [ OK ] ParserTests.HexStringNotWorks (85 ms) [ RUN ] ParserTests.IcontainsExpression [ OK ] ParserTests.IcontainsExpression (85 ms) [ RUN ] ParserTests.IendsWithExpression [ OK ] ParserTests.IendsWithExpression (88 ms) [ RUN ] ParserTests.IstartsWithExpression [ OK ] ParserTests.IstartsWithExpression (90 ms) [ RUN ] ParserTests.StartsWithExpression [ OK ] ParserTests.StartsWithExpression (91 ms) [ RUN ] ParserTests.EndsWithExpression [ OK ] ParserTests.EndsWithExpression (89 ms) [ RUN ] ParserTests.StringModuleWorks [ OK ] ParserTests.StringModuleWorks (91 ms) [----------] 256 tests from ParserTests (22684 ms total) [----------] 14 tests from TrieTests [ RUN ] TrieTests.InsertAndFindWorks [ OK ] TrieTests.InsertAndFindWorks (0 ms) [ RUN ] TrieTests.InsertFailsOnDuplicateInsertWorks [ OK ] TrieTests.InsertFailsOnDuplicateInsertWorks (0 ms) [ RUN ] TrieTests.FindFailsIfKeyNotPresentWorks [ OK ] TrieTests.FindFailsIfKeyNotPresentWorks (0 ms) [ RUN ] TrieTests.IsPrefixWorks [ OK ] TrieTests.IsPrefixWorks (0 ms) [ RUN ] TrieTests.IsPrefixFailsIfKeyNotPresentWorks [ OK ] TrieTests.IsPrefixFailsIfKeyNotPresentWorks (0 ms) [ RUN ] TrieTests.GetAllValuesWorks [ OK ] TrieTests.GetAllValuesWorks (0 ms) [ RUN ] TrieTests.GetAllValuesPreservesInsertionOrderWorks [ OK ] TrieTests.GetAllValuesPreservesInsertionOrderWorks (0 ms) [ RUN ] TrieTests.GetValuesWithPrefixWorks [ OK ] TrieTests.GetValuesWithPrefixWorks (0 ms) [ RUN ] TrieTests.EmptyWorks [ OK ] TrieTests.EmptyWorks (0 ms) [ RUN ] TrieTests.ClearWorks [ OK ] TrieTests.ClearWorks (0 ms) [ RUN ] TrieTests.RemoveWorks [ OK ] TrieTests.RemoveWorks (0 ms) [ RUN ] TrieTests.RemoveWithMultiDeleteWorks [ OK ] TrieTests.RemoveWithMultiDeleteWorks (0 ms) [ RUN ] TrieTests.RemoveWithParentRemovedWorks [ OK ] TrieTests.RemoveWithParentRemovedWorks (0 ms) [ RUN ] TrieTests.RemoveClearsWorks [ OK ] TrieTests.RemoveClearsWorks (0 ms) [----------] 14 tests from TrieTests (0 ms total) [----------] 4 tests from UtilsTests [ RUN ] UtilsTests.IsValidIdentifierWorks [ OK ] UtilsTests.IsValidIdentifierWorks (0 ms) [ RUN ] UtilsTests.EscapeStringWorks [ OK ] UtilsTests.EscapeStringWorks (0 ms) [ RUN ] UtilsTests.UnescapeStringWorks [ OK ] UtilsTests.UnescapeStringWorks (0 ms) [ RUN ] UtilsTests.NumToStrWorks [ OK ] UtilsTests.NumToStrWorks (0 ms) [----------] 4 tests from UtilsTests (0 ms total) [----------] 22 tests from VisitorTests [ RUN ] VisitorTests.StringExpressionVisitorInpactOnTokenStream [ OK ] VisitorTests.StringExpressionVisitorInpactOnTokenStream (88 ms) [ RUN ] VisitorTests.RegexpModifyingVisitorInpactOnTokenStream [ OK ] VisitorTests.RegexpModifyingVisitorInpactOnTokenStream (92 ms) [ RUN ] VisitorTests.BoolModifyingVisitorInpactOnTokenStream1 [ OK ] VisitorTests.BoolModifyingVisitorInpactOnTokenStream1 (90 ms) [ RUN ] VisitorTests.BoolModifyingVisitorInpactOnTokenStream2 [ OK ] VisitorTests.BoolModifyingVisitorInpactOnTokenStream2 (89 ms) [ RUN ] VisitorTests.IntLiteralModifyingVisitorInpactOnTokenStream [ OK ] VisitorTests.IntLiteralModifyingVisitorInpactOnTokenStream (88 ms) [ RUN ] VisitorTests.CuckooFunctionReplacerBoolLiteralExpression [ OK ] VisitorTests.CuckooFunctionReplacerBoolLiteralExpression (88 ms) [ RUN ] VisitorTests.CuckooFunctionReplacerCuckooSyncEvent [ OK ] VisitorTests.CuckooFunctionReplacerCuckooSyncEvent (89 ms) [ RUN ] VisitorTests.CuckooFunctionReplacerOrExpression1 [ OK ] VisitorTests.CuckooFunctionReplacerOrExpression1 (86 ms) [ RUN ] VisitorTests.CuckooFunctionReplacerOrExpression2 [ OK ] VisitorTests.CuckooFunctionReplacerOrExpression2 (82 ms) [ RUN ] VisitorTests.CuckooFunctionReplacerOrExpression3 [ OK ] VisitorTests.CuckooFunctionReplacerOrExpression3 (85 ms) [ RUN ] VisitorTests.CuckooFunctionReplacerOrExpression4 [ OK ] VisitorTests.CuckooFunctionReplacerOrExpression4 (85 ms) [ RUN ] VisitorTests.CuckooFunctionReplacerAndExpression1 [ OK ] VisitorTests.CuckooFunctionReplacerAndExpression1 (88 ms) [ RUN ] VisitorTests.IterableModifyingVisitorImpactOnTokenStream [ OK ] VisitorTests.IterableModifyingVisitorImpactOnTokenStream (84 ms) [ RUN ] VisitorTests.AndExpressionSwitcherAndExpression1 [ OK ] VisitorTests.AndExpressionSwitcherAndExpression1 (84 ms) [ RUN ] VisitorTests.AndExpressionSwitcherAndExpression2 [ OK ] VisitorTests.AndExpressionSwitcherAndExpression2 (90 ms) [ RUN ] VisitorTests.OrExpressionSwitcherOrExpression1 [ OK ] VisitorTests.OrExpressionSwitcherOrExpression1 (85 ms) [ RUN ] VisitorTests.OrExpressionSwitcherOrExpression2 [ OK ] VisitorTests.OrExpressionSwitcherOrExpression2 (85 ms) [ RUN ] VisitorTests.EqExpressionSwitcher [ OK ] VisitorTests.EqExpressionSwitcher (84 ms) [ RUN ] VisitorTests.DeletingVisitor1 [ OK ] VisitorTests.DeletingVisitor1 (88 ms) [ RUN ] VisitorTests.RuleModifierWorksWhenDeletingRules [ OK ] VisitorTests.RuleModifierWorksWhenDeletingRules (82 ms) [ RUN ] VisitorTests.DeletingVisitor2 [ OK ] VisitorTests.DeletingVisitor2 (85 ms) [ RUN ] VisitorTests.DeletingVisitor3 [ OK ] VisitorTests.DeletingVisitor3 (83 ms) [----------] 22 tests from VisitorTests (1913 ms total) [----------] 1 test from YaraFileTests [ RUN ] YaraFileTests.ExpandRuleFromOrigin [ OK ] YaraFileTests.ExpandRuleFromOrigin (89 ms) [----------] 1 test from YaraFileTests (89 ms total) [----------] 4 tests from YaramodTests [ RUN ] YaramodTests.MultipleParsePhasesWithSingleYaramod [ OK ] YaramodTests.MultipleParsePhasesWithSingleYaramod (87 ms) [ RUN ] YaramodTests.AddMeta [ OK ] YaramodTests.AddMeta (90 ms) [ RUN ] YaramodTests.AddMetaToRulesWithComments [ OK ] YaramodTests.AddMetaToRulesWithComments (86 ms) [ RUN ] YaramodTests.SetMeta [ OK ] YaramodTests.SetMeta (87 ms) [----------] 4 tests from YaramodTests (353 ms total) [----------] Global test environment tear-down [==========] 398 tests from 9 test suites ran. (34960 ms total) [ PASSED ] 398 tests. # tests.python.test_parser.ParserTests bug LD_LIBRARY_PATH=/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf/src:$LD_LIBRARY_PATH dh_auto_test -a -O--buildsystem=pybuild I: pybuild base:311: cd /build/reproducible-path/yaramod-3.21.0/.pybuild/cpython3_3.12/build; python3.12 -m unittest discover -v test_empty_file (tests.python.test_builder.BuilderTests.test_empty_file) ... ok test_empty_rule (tests.python.test_builder.BuilderTests.test_empty_rule) ... ok test_multiple_rules (tests.python.test_builder.BuilderTests.test_multiple_rules) ... ok test_pure_imports (tests.python.test_builder.BuilderTests.test_pure_imports) ... ok test_rule_with_and_condition (tests.python.test_builder.BuilderTests.test_rule_with_and_condition) ... ok test_rule_with_and_condition_with_comments (tests.python.test_builder.BuilderTests.test_rule_with_and_condition_with_comments) ... ok test_rule_with_and_condition_with_comments_behind (tests.python.test_builder.BuilderTests.test_rule_with_and_condition_with_comments_behind) ... ok test_rule_with_array_access_condition (tests.python.test_builder.BuilderTests.test_rule_with_array_access_condition) ... ok test_rule_with_bitwise_and_condition (tests.python.test_builder.BuilderTests.test_rule_with_bitwise_and_condition) ... ok test_rule_with_bitwise_not_condition (tests.python.test_builder.BuilderTests.test_rule_with_bitwise_not_condition) ... ok test_rule_with_bitwise_or_condition (tests.python.test_builder.BuilderTests.test_rule_with_bitwise_or_condition) ... ok test_rule_with_comments (tests.python.test_builder.BuilderTests.test_rule_with_comments) ... ok test_rule_with_complex_condition (tests.python.test_builder.BuilderTests.test_rule_with_complex_condition) ... ok test_rule_with_custom_modules (tests.python.test_builder.BuilderTests.test_rule_with_custom_modules) ... ok test_rule_with_defined_condition (tests.python.test_builder.BuilderTests.test_rule_with_defined_condition) ... ok test_rule_with_dictionary_access_condition (tests.python.test_builder.BuilderTests.test_rule_with_dictionary_access_condition) ... ok test_rule_with_divide_condition (tests.python.test_builder.BuilderTests.test_rule_with_divide_condition) ... ok test_rule_with_double_values (tests.python.test_builder.BuilderTests.test_rule_with_double_values) ... ok test_rule_with_eq_condition (tests.python.test_builder.BuilderTests.test_rule_with_eq_condition) ... ok test_rule_with_for_loop_over_dictionary (tests.python.test_builder.BuilderTests.test_rule_with_for_loop_over_dictionary) ... ok test_rule_with_function_call_and_oneline_comment (tests.python.test_builder.BuilderTests.test_rule_with_function_call_and_oneline_comment) ... ok test_rule_with_function_call_condition (tests.python.test_builder.BuilderTests.test_rule_with_function_call_condition) ... ok test_rule_with_ge_condition (tests.python.test_builder.BuilderTests.test_rule_with_ge_condition) ... ok test_rule_with_gt_condition (tests.python.test_builder.BuilderTests.test_rule_with_gt_condition) ... ok test_rule_with_hex_string (tests.python.test_builder.BuilderTests.test_rule_with_hex_string) ... ok test_rule_with_le_condition (tests.python.test_builder.BuilderTests.test_rule_with_le_condition) ... ok test_rule_with_lt_condition (tests.python.test_builder.BuilderTests.test_rule_with_lt_condition) ... ok test_rule_with_match_count_condition (tests.python.test_builder.BuilderTests.test_rule_with_match_count_condition) ... ok test_rule_with_match_in_range_condition (tests.python.test_builder.BuilderTests.test_rule_with_match_in_range_condition) ... ok test_rule_with_match_length_condition (tests.python.test_builder.BuilderTests.test_rule_with_match_length_condition) ... ok test_rule_with_match_length_with_index_condition (tests.python.test_builder.BuilderTests.test_rule_with_match_length_with_index_condition) ... ok test_rule_with_match_offset_condition (tests.python.test_builder.BuilderTests.test_rule_with_match_offset_condition) ... ok test_rule_with_match_offset_with_index_condition (tests.python.test_builder.BuilderTests.test_rule_with_match_offset_with_index_condition) ... ok test_rule_with_metas (tests.python.test_builder.BuilderTests.test_rule_with_metas) ... ok test_rule_with_minus_condition (tests.python.test_builder.BuilderTests.test_rule_with_minus_condition) ... ok test_rule_with_modifiers (tests.python.test_builder.BuilderTests.test_rule_with_modifiers) ... ok test_rule_with_modulo_condition (tests.python.test_builder.BuilderTests.test_rule_with_modulo_condition) ... ok test_rule_with_multiply_condition (tests.python.test_builder.BuilderTests.test_rule_with_multiply_condition) ... ok test_rule_with_neq_condition (tests.python.test_builder.BuilderTests.test_rule_with_neq_condition) ... ok test_rule_with_not_condition (tests.python.test_builder.BuilderTests.test_rule_with_not_condition) ... ok test_rule_with_of_at_offset_condition (tests.python.test_builder.BuilderTests.test_rule_with_of_at_offset_condition) ... ok test_rule_with_of_in_range_condition (tests.python.test_builder.BuilderTests.test_rule_with_of_in_range_condition) ... ok test_rule_with_or_condition (tests.python.test_builder.BuilderTests.test_rule_with_or_condition) ... ok test_rule_with_or_condition_with_comments (tests.python.test_builder.BuilderTests.test_rule_with_or_condition_with_comments) ... ok test_rule_with_or_condition_with_single_comment (tests.python.test_builder.BuilderTests.test_rule_with_or_condition_with_single_comment) ... ok test_rule_with_pe_int_constants_condition (tests.python.test_builder.BuilderTests.test_rule_with_pe_int_constants_condition) ... ok test_rule_with_percentage_of_stringset (tests.python.test_builder.BuilderTests.test_rule_with_percentage_of_stringset) ... ok test_rule_with_plain_string (tests.python.test_builder.BuilderTests.test_rule_with_plain_string) ... ok test_rule_with_plus_condition (tests.python.test_builder.BuilderTests.test_rule_with_plus_condition) ... ok test_rule_with_regexp (tests.python.test_builder.BuilderTests.test_rule_with_regexp) ... ok test_rule_with_shift_left_condition (tests.python.test_builder.BuilderTests.test_rule_with_shift_left_condition) ... ok test_rule_with_shift_right_condition (tests.python.test_builder.BuilderTests.test_rule_with_shift_right_condition) ... ok test_rule_with_string_at_condition (tests.python.test_builder.BuilderTests.test_rule_with_string_at_condition) ... ok test_rule_with_string_id_condition (tests.python.test_builder.BuilderTests.test_rule_with_string_id_condition) ... ok test_rule_with_string_literal_set (tests.python.test_builder.BuilderTests.test_rule_with_string_literal_set) ... ok test_rule_with_string_modifiers (tests.python.test_builder.BuilderTests.test_rule_with_string_modifiers) ... ok test_rule_with_structure_access_condition (tests.python.test_builder.BuilderTests.test_rule_with_structure_access_condition) ... ok test_rule_with_tags (tests.python.test_builder.BuilderTests.test_rule_with_tags) ... ok test_rule_with_unary_minus_condition (tests.python.test_builder.BuilderTests.test_rule_with_unary_minus_condition) ... ok test_rule_with_variable_id_condition (tests.python.test_builder.BuilderTests.test_rule_with_variable_id_condition) ... ok test_rule_with_variables (tests.python.test_builder.BuilderTests.test_rule_with_variables) ... ok test_rule_with_xor_condition (tests.python.test_builder.BuilderTests.test_rule_with_xor_condition) ... ok test_add_meta (tests.python.test_parser.ParserTests.test_add_meta) ... ok test_and_condition (tests.python.test_parser.ParserTests.test_and_condition) ... ok test_array_access_condition (tests.python.test_parser.ParserTests.test_array_access_condition) ... ok test_bitwise_and_condition (tests.python.test_parser.ParserTests.test_bitwise_and_condition) ... ok test_bitwise_not_condition (tests.python.test_parser.ParserTests.test_bitwise_not_condition) ... ok test_bitwise_or_condition (tests.python.test_parser.ParserTests.test_bitwise_or_condition) ... ok test_bool_literal_condition (tests.python.test_parser.ParserTests.test_bool_literal_condition) ... ok test_complex_regular_expression_in_fnc_call (tests.python.test_parser.ParserTests.test_complex_regular_expression_in_fnc_call) ... ok test_complex_regular_expression_in_strings (tests.python.test_parser.ParserTests.test_complex_regular_expression_in_strings) ... ok test_contains_condition (tests.python.test_parser.ParserTests.test_contains_condition) ... ok test_divide_condition (tests.python.test_parser.ParserTests.test_divide_condition) ... ok test_double_literal_condition (tests.python.test_parser.ParserTests.test_double_literal_condition) ... ok test_empty_input (tests.python.test_parser.ParserTests.test_empty_input) ... ok test_empty_rule (tests.python.test_parser.ParserTests.test_empty_rule) ... ok test_equal_condition (tests.python.test_parser.ParserTests.test_equal_condition) ... ok test_expression_uids (tests.python.test_parser.ParserTests.test_expression_uids) ... ok test_for_array_condition (tests.python.test_parser.ParserTests.test_for_array_condition) ... ok test_for_dict_condition (tests.python.test_parser.ParserTests.test_for_dict_condition) ... ok test_for_integer_set_condition (tests.python.test_parser.ParserTests.test_for_integer_set_condition) ... ok test_for_string_literal_set_condition (tests.python.test_parser.ParserTests.test_for_string_literal_set_condition) ... ok test_for_string_set_condition (tests.python.test_parser.ParserTests.test_for_string_set_condition) ... ok test_function_call_condition (tests.python.test_parser.ParserTests.test_function_call_condition) ... ok test_global_private_rule (tests.python.test_parser.ParserTests.test_global_private_rule) ... ok test_global_rule (tests.python.test_parser.ParserTests.test_global_rule) ... ok test_greater_equal_condition (tests.python.test_parser.ParserTests.test_greater_equal_condition) ... ok test_greater_than_condition (tests.python.test_parser.ParserTests.test_greater_than_condition) ... ok test_import (tests.python.test_parser.ParserTests.test_import) ... ok test_include_file (tests.python.test_parser.ParserTests.test_include_file) ... ok test_include_file_2 (tests.python.test_parser.ParserTests.test_include_file_2) ... ok test_include_file_and_import_in_regular_mode (tests.python.test_parser.ParserTests.test_include_file_and_import_in_regular_mode) ... ok test_include_undefined_file_and_import_in_incomplete_mode (tests.python.test_parser.ParserTests.test_include_undefined_file_and_import_in_incomplete_mode) ... ok test_include_undefined_file_in_incomplete_mode (tests.python.test_parser.ParserTests.test_include_undefined_file_in_incomplete_mode) ... ok test_int_function_condition (tests.python.test_parser.ParserTests.test_int_function_condition) ... ok test_int_literal_condition (tests.python.test_parser.ParserTests.test_int_literal_condition) ... ok test_less_equal_condition (tests.python.test_parser.ParserTests.test_less_equal_condition) ... ok test_less_than_condition (tests.python.test_parser.ParserTests.test_less_than_condition) ... ok test_links_between_rules_after_rename (tests.python.test_parser.ParserTests.test_links_between_rules_after_rename) ... ok test_match_count_condition (tests.python.test_parser.ParserTests.test_match_count_condition) ... ok test_match_length_condition (tests.python.test_parser.ParserTests.test_match_length_condition) ... ok test_match_length_with_index_condition (tests.python.test_parser.ParserTests.test_match_length_with_index_condition) ... ok test_match_offset_condition (tests.python.test_parser.ParserTests.test_match_offset_condition) ... ok test_match_offset_with_index_condition (tests.python.test_parser.ParserTests.test_match_offset_with_index_condition) ... ok test_matches_condition (tests.python.test_parser.ParserTests.test_matches_condition) ... ok test_math_module (tests.python.test_parser.ParserTests.test_math_module) ... ok test_minus_condition (tests.python.test_parser.ParserTests.test_minus_condition) ... ok test_modify_meta (tests.python.test_parser.ParserTests.test_modify_meta) ... ok test_modulo_condition (tests.python.test_parser.ParserTests.test_modulo_condition) ... ok test_multiple_parse_phases_with_single_yaramod_instance (tests.python.test_parser.ParserTests.test_multiple_parse_phases_with_single_yaramod_instance) ... ok test_multiple_rules (tests.python.test_parser.ParserTests.test_multiple_rules) ... ok test_multiply_condition (tests.python.test_parser.ParserTests.test_multiply_condition) ... ok test_nonutf_comments (tests.python.test_parser.ParserTests.test_nonutf_comments) ... ok test_not_condition (tests.python.test_parser.ParserTests.test_not_condition) ... ok test_not_equal_condition (tests.python.test_parser.ParserTests.test_not_equal_condition) ... ok test_of_at_condition (tests.python.test_parser.ParserTests.test_of_at_condition) ... ok test_of_at_with_string_set_condition (tests.python.test_parser.ParserTests.test_of_at_with_string_set_condition) ... ok test_of_condition (tests.python.test_parser.ParserTests.test_of_condition) ... ok test_or_condition (tests.python.test_parser.ParserTests.test_or_condition) ... ok test_parentheses_condition (tests.python.test_parser.ParserTests.test_parentheses_condition) ... ok test_parse_elf_dynsym (tests.python.test_parser.ParserTests.test_parse_elf_dynsym) ... ok test_parse_pe_signatures_x_algorithm_oid (tests.python.test_parser.ParserTests.test_parse_pe_signatures_x_algorithm_oid) ... ok test_parse_percentage (tests.python.test_parser.ParserTests.test_parse_percentage) ... ok test_parser_error (tests.python.test_parser.ParserTests.test_parser_error) ... ok test_pe_delayed_imports (tests.python.test_parser.ParserTests.test_pe_delayed_imports) ... ok test_pe_imports (tests.python.test_parser.ParserTests.test_pe_imports) ... ok test_pe_number_of_imported_functions (tests.python.test_parser.ParserTests.test_pe_number_of_imported_functions) ... ok test_plain_strings_with_modifiers (tests.python.test_parser.ParserTests.test_plain_strings_with_modifiers) ... ok test_plus_condition (tests.python.test_parser.ParserTests.test_plus_condition) ... ok test_private_rule (tests.python.test_parser.ParserTests.test_private_rule) ... ok test_regular_expression_character_classes (tests.python.test_parser.ParserTests.test_regular_expression_character_classes) ... ok test_regular_expression_escape_sequences (tests.python.test_parser.ParserTests.test_regular_expression_escape_sequences) ... ok test_regular_expression_meta_characters (tests.python.test_parser.ParserTests.test_regular_expression_meta_characters) ... ok test_regular_expression_quantifiers (tests.python.test_parser.ParserTests.test_regular_expression_quantifiers) ... ok test_regular_expression_quantifiers_nongreedy (tests.python.test_parser.ParserTests.test_regular_expression_quantifiers_nongreedy) ... ok test_regular_expression_suffix_modifiers (tests.python.test_parser.ParserTests.test_regular_expression_suffix_modifiers) ... ok test_remove_import (tests.python.test_parser.ParserTests.test_remove_import) ... ok test_rule_locations (tests.python.test_parser.ParserTests.test_rule_locations) ... ok test_rule_with_hex_string (tests.python.test_parser.ParserTests.test_rule_with_hex_string) ... ok test_rule_with_metas (tests.python.test_parser.ParserTests.test_rule_with_metas) ... ok test_rule_with_plain_strings (tests.python.test_parser.ParserTests.test_rule_with_plain_strings) ... ok test_rule_with_regexp (tests.python.test_parser.ParserTests.test_rule_with_regexp) ... ok test_rule_with_tags (tests.python.test_parser.ParserTests.test_rule_with_tags) ... ok test_rule_with_unordered_sections (tests.python.test_parser.ParserTests.test_rule_with_unordered_sections) ... ok test_rule_with_variable_and_string (tests.python.test_parser.ParserTests.test_rule_with_variable_and_string) ... ok test_rule_with_variables (tests.python.test_parser.ParserTests.test_rule_with_variables) ... ok test_shift_left_condition (tests.python.test_parser.ParserTests.test_shift_left_condition) ... ok test_shift_right_condition (tests.python.test_parser.ParserTests.test_shift_right_condition) ... ok test_simple_regular_expression_in_strings (tests.python.test_parser.ParserTests.test_simple_regular_expression_in_strings) ... ok test_string_at_condition (tests.python.test_parser.ParserTests.test_string_at_condition) ... ok test_string_condition (tests.python.test_parser.ParserTests.test_string_condition) ... ok test_string_in_range_condition (tests.python.test_parser.ParserTests.test_string_in_range_condition) ... ok test_string_locations (tests.python.test_parser.ParserTests.test_string_locations) ... ok test_string_with_invalid_utf8_sequences (tests.python.test_parser.ParserTests.test_string_with_invalid_utf8_sequences) ... ok test_structure_access_condition (tests.python.test_parser.ParserTests.test_structure_access_condition) ... ok test_unary_minus_condition (tests.python.test_parser.ParserTests.test_unary_minus_condition) ... ok test_variable_condition (tests.python.test_parser.ParserTests.test_variable_condition) ... ok test_xor_condition (tests.python.test_parser.ParserTests.test_xor_condition) ... ok test_empty_file (tests.python.test_builder.BuilderTests.test_empty_file) ... ok test_empty_rule (tests.python.test_builder.BuilderTests.test_empty_rule) ... ok test_multiple_rules (tests.python.test_builder.BuilderTests.test_multiple_rules) ... ok test_pure_imports (tests.python.test_builder.BuilderTests.test_pure_imports) ... ok test_rule_with_and_condition (tests.python.test_builder.BuilderTests.test_rule_with_and_condition) ... ok test_rule_with_and_condition_with_comments (tests.python.test_builder.BuilderTests.test_rule_with_and_condition_with_comments) ... ok test_rule_with_and_condition_with_comments_behind (tests.python.test_builder.BuilderTests.test_rule_with_and_condition_with_comments_behind) ... ok test_rule_with_array_access_condition (tests.python.test_builder.BuilderTests.test_rule_with_array_access_condition) ... ok test_rule_with_bitwise_and_condition (tests.python.test_builder.BuilderTests.test_rule_with_bitwise_and_condition) ... ok test_rule_with_bitwise_not_condition (tests.python.test_builder.BuilderTests.test_rule_with_bitwise_not_condition) ... ok test_rule_with_bitwise_or_condition (tests.python.test_builder.BuilderTests.test_rule_with_bitwise_or_condition) ... ok test_rule_with_comments (tests.python.test_builder.BuilderTests.test_rule_with_comments) ... ok test_rule_with_complex_condition (tests.python.test_builder.BuilderTests.test_rule_with_complex_condition) ... ok test_rule_with_custom_modules (tests.python.test_builder.BuilderTests.test_rule_with_custom_modules) ... ok test_rule_with_defined_condition (tests.python.test_builder.BuilderTests.test_rule_with_defined_condition) ... ok test_rule_with_dictionary_access_condition (tests.python.test_builder.BuilderTests.test_rule_with_dictionary_access_condition) ... ok test_rule_with_divide_condition (tests.python.test_builder.BuilderTests.test_rule_with_divide_condition) ... ok test_rule_with_double_values (tests.python.test_builder.BuilderTests.test_rule_with_double_values) ... ok test_rule_with_eq_condition (tests.python.test_builder.BuilderTests.test_rule_with_eq_condition) ... ok test_rule_with_for_loop_over_dictionary (tests.python.test_builder.BuilderTests.test_rule_with_for_loop_over_dictionary) ... ok test_rule_with_function_call_and_oneline_comment (tests.python.test_builder.BuilderTests.test_rule_with_function_call_and_oneline_comment) ... ok test_rule_with_function_call_condition (tests.python.test_builder.BuilderTests.test_rule_with_function_call_condition) ... ok test_rule_with_ge_condition (tests.python.test_builder.BuilderTests.test_rule_with_ge_condition) ... ok test_rule_with_gt_condition (tests.python.test_builder.BuilderTests.test_rule_with_gt_condition) ... ok test_rule_with_hex_string (tests.python.test_builder.BuilderTests.test_rule_with_hex_string) ... ok test_rule_with_le_condition (tests.python.test_builder.BuilderTests.test_rule_with_le_condition) ... ok test_rule_with_lt_condition (tests.python.test_builder.BuilderTests.test_rule_with_lt_condition) ... ok test_rule_with_match_count_condition (tests.python.test_builder.BuilderTests.test_rule_with_match_count_condition) ... ok test_rule_with_match_in_range_condition (tests.python.test_builder.BuilderTests.test_rule_with_match_in_range_condition) ... ok test_rule_with_match_length_condition (tests.python.test_builder.BuilderTests.test_rule_with_match_length_condition) ... ok test_rule_with_match_length_with_index_condition (tests.python.test_builder.BuilderTests.test_rule_with_match_length_with_index_condition) ... ok test_rule_with_match_offset_condition (tests.python.test_builder.BuilderTests.test_rule_with_match_offset_condition) ... ok test_rule_with_match_offset_with_index_condition (tests.python.test_builder.BuilderTests.test_rule_with_match_offset_with_index_condition) ... ok test_rule_with_metas (tests.python.test_builder.BuilderTests.test_rule_with_metas) ... ok test_rule_with_minus_condition (tests.python.test_builder.BuilderTests.test_rule_with_minus_condition) ... ok test_rule_with_modifiers (tests.python.test_builder.BuilderTests.test_rule_with_modifiers) ... ok test_rule_with_modulo_condition (tests.python.test_builder.BuilderTests.test_rule_with_modulo_condition) ... ok test_rule_with_multiply_condition (tests.python.test_builder.BuilderTests.test_rule_with_multiply_condition) ... ok test_rule_with_neq_condition (tests.python.test_builder.BuilderTests.test_rule_with_neq_condition) ... ok test_rule_with_not_condition (tests.python.test_builder.BuilderTests.test_rule_with_not_condition) ... ok test_rule_with_of_at_offset_condition (tests.python.test_builder.BuilderTests.test_rule_with_of_at_offset_condition) ... ok test_rule_with_of_in_range_condition (tests.python.test_builder.BuilderTests.test_rule_with_of_in_range_condition) ... ok test_rule_with_or_condition (tests.python.test_builder.BuilderTests.test_rule_with_or_condition) ... ok test_rule_with_or_condition_with_comments (tests.python.test_builder.BuilderTests.test_rule_with_or_condition_with_comments) ... ok test_rule_with_or_condition_with_single_comment (tests.python.test_builder.BuilderTests.test_rule_with_or_condition_with_single_comment) ... ok test_rule_with_pe_int_constants_condition (tests.python.test_builder.BuilderTests.test_rule_with_pe_int_constants_condition) ... ok test_rule_with_percentage_of_stringset (tests.python.test_builder.BuilderTests.test_rule_with_percentage_of_stringset) ... ok test_rule_with_plain_string (tests.python.test_builder.BuilderTests.test_rule_with_plain_string) ... ok test_rule_with_plus_condition (tests.python.test_builder.BuilderTests.test_rule_with_plus_condition) ... ok test_rule_with_regexp (tests.python.test_builder.BuilderTests.test_rule_with_regexp) ... ok test_rule_with_shift_left_condition (tests.python.test_builder.BuilderTests.test_rule_with_shift_left_condition) ... ok test_rule_with_shift_right_condition (tests.python.test_builder.BuilderTests.test_rule_with_shift_right_condition) ... ok test_rule_with_string_at_condition (tests.python.test_builder.BuilderTests.test_rule_with_string_at_condition) ... ok test_rule_with_string_id_condition (tests.python.test_builder.BuilderTests.test_rule_with_string_id_condition) ... ok test_rule_with_string_literal_set (tests.python.test_builder.BuilderTests.test_rule_with_string_literal_set) ... ok test_rule_with_string_modifiers (tests.python.test_builder.BuilderTests.test_rule_with_string_modifiers) ... ok test_rule_with_structure_access_condition (tests.python.test_builder.BuilderTests.test_rule_with_structure_access_condition) ... ok test_rule_with_tags (tests.python.test_builder.BuilderTests.test_rule_with_tags) ... ok test_rule_with_unary_minus_condition (tests.python.test_builder.BuilderTests.test_rule_with_unary_minus_condition) ... ok test_rule_with_variable_id_condition (tests.python.test_builder.BuilderTests.test_rule_with_variable_id_condition) ... ok test_rule_with_variables (tests.python.test_builder.BuilderTests.test_rule_with_variables) ... ok test_rule_with_xor_condition (tests.python.test_builder.BuilderTests.test_rule_with_xor_condition) ... ok test_add_meta (tests.python.test_parser.ParserTests.test_add_meta) ... ok test_and_condition (tests.python.test_parser.ParserTests.test_and_condition) ... ok test_array_access_condition (tests.python.test_parser.ParserTests.test_array_access_condition) ... ok test_bitwise_and_condition (tests.python.test_parser.ParserTests.test_bitwise_and_condition) ... ok test_bitwise_not_condition (tests.python.test_parser.ParserTests.test_bitwise_not_condition) ... ok test_bitwise_or_condition (tests.python.test_parser.ParserTests.test_bitwise_or_condition) ... ok test_bool_literal_condition (tests.python.test_parser.ParserTests.test_bool_literal_condition) ... ok test_complex_regular_expression_in_fnc_call (tests.python.test_parser.ParserTests.test_complex_regular_expression_in_fnc_call) ... ok test_complex_regular_expression_in_strings (tests.python.test_parser.ParserTests.test_complex_regular_expression_in_strings) ... ok test_contains_condition (tests.python.test_parser.ParserTests.test_contains_condition) ... ok test_divide_condition (tests.python.test_parser.ParserTests.test_divide_condition) ... ok test_double_literal_condition (tests.python.test_parser.ParserTests.test_double_literal_condition) ... ok test_empty_input (tests.python.test_parser.ParserTests.test_empty_input) ... ok test_empty_rule (tests.python.test_parser.ParserTests.test_empty_rule) ... ok test_equal_condition (tests.python.test_parser.ParserTests.test_equal_condition) ... ok test_expression_uids (tests.python.test_parser.ParserTests.test_expression_uids) ... ok test_for_array_condition (tests.python.test_parser.ParserTests.test_for_array_condition) ... ok test_for_dict_condition (tests.python.test_parser.ParserTests.test_for_dict_condition) ... ok test_for_integer_set_condition (tests.python.test_parser.ParserTests.test_for_integer_set_condition) ... ok test_for_string_literal_set_condition (tests.python.test_parser.ParserTests.test_for_string_literal_set_condition) ... ok test_for_string_set_condition (tests.python.test_parser.ParserTests.test_for_string_set_condition) ... ok test_function_call_condition (tests.python.test_parser.ParserTests.test_function_call_condition) ... ok test_global_private_rule (tests.python.test_parser.ParserTests.test_global_private_rule) ... ok test_global_rule (tests.python.test_parser.ParserTests.test_global_rule) ... ok test_greater_equal_condition (tests.python.test_parser.ParserTests.test_greater_equal_condition) ... ok test_greater_than_condition (tests.python.test_parser.ParserTests.test_greater_than_condition) ... ok test_import (tests.python.test_parser.ParserTests.test_import) ... ok test_include_file (tests.python.test_parser.ParserTests.test_include_file) ... ok test_include_file_2 (tests.python.test_parser.ParserTests.test_include_file_2) ... ok test_include_file_and_import_in_regular_mode (tests.python.test_parser.ParserTests.test_include_file_and_import_in_regular_mode) ... ok test_include_undefined_file_and_import_in_incomplete_mode (tests.python.test_parser.ParserTests.test_include_undefined_file_and_import_in_incomplete_mode) ... ok test_include_undefined_file_in_incomplete_mode (tests.python.test_parser.ParserTests.test_include_undefined_file_in_incomplete_mode) ... ok test_int_function_condition (tests.python.test_parser.ParserTests.test_int_function_condition) ... ok test_int_literal_condition (tests.python.test_parser.ParserTests.test_int_literal_condition) ... ok test_less_equal_condition (tests.python.test_parser.ParserTests.test_less_equal_condition) ... ok test_less_than_condition (tests.python.test_parser.ParserTests.test_less_than_condition) ... ok test_links_between_rules_after_rename (tests.python.test_parser.ParserTests.test_links_between_rules_after_rename) ... ok test_match_count_condition (tests.python.test_parser.ParserTests.test_match_count_condition) ... ok test_match_length_condition (tests.python.test_parser.ParserTests.test_match_length_condition) ... ok test_match_length_with_index_condition (tests.python.test_parser.ParserTests.test_match_length_with_index_condition) ... ok test_match_offset_condition (tests.python.test_parser.ParserTests.test_match_offset_condition) ... ok test_match_offset_with_index_condition (tests.python.test_parser.ParserTests.test_match_offset_with_index_condition) ... ok test_matches_condition (tests.python.test_parser.ParserTests.test_matches_condition) ... ok test_math_module (tests.python.test_parser.ParserTests.test_math_module) ... ok test_minus_condition (tests.python.test_parser.ParserTests.test_minus_condition) ... ok test_modify_meta (tests.python.test_parser.ParserTests.test_modify_meta) ... ok test_modulo_condition (tests.python.test_parser.ParserTests.test_modulo_condition) ... ok test_multiple_parse_phases_with_single_yaramod_instance (tests.python.test_parser.ParserTests.test_multiple_parse_phases_with_single_yaramod_instance) ... ok test_multiple_rules (tests.python.test_parser.ParserTests.test_multiple_rules) ... ok test_multiply_condition (tests.python.test_parser.ParserTests.test_multiply_condition) ... ok test_nonutf_comments (tests.python.test_parser.ParserTests.test_nonutf_comments) ... ok test_not_condition (tests.python.test_parser.ParserTests.test_not_condition) ... ok test_not_equal_condition (tests.python.test_parser.ParserTests.test_not_equal_condition) ... ok test_of_at_condition (tests.python.test_parser.ParserTests.test_of_at_condition) ... ok test_of_at_with_string_set_condition (tests.python.test_parser.ParserTests.test_of_at_with_string_set_condition) ... ok test_of_condition (tests.python.test_parser.ParserTests.test_of_condition) ... ok test_or_condition (tests.python.test_parser.ParserTests.test_or_condition) ... ok test_parentheses_condition (tests.python.test_parser.ParserTests.test_parentheses_condition) ... ok test_parse_elf_dynsym (tests.python.test_parser.ParserTests.test_parse_elf_dynsym) ... ok test_parse_pe_signatures_x_algorithm_oid (tests.python.test_parser.ParserTests.test_parse_pe_signatures_x_algorithm_oid) ... ok test_parse_percentage (tests.python.test_parser.ParserTests.test_parse_percentage) ... ok test_parser_error (tests.python.test_parser.ParserTests.test_parser_error) ... ok test_pe_delayed_imports (tests.python.test_parser.ParserTests.test_pe_delayed_imports) ... ok test_pe_imports (tests.python.test_parser.ParserTests.test_pe_imports) ... ok test_pe_number_of_imported_functions (tests.python.test_parser.ParserTests.test_pe_number_of_imported_functions) ... ok test_plain_strings_with_modifiers (tests.python.test_parser.ParserTests.test_plain_strings_with_modifiers) ... ok test_plus_condition (tests.python.test_parser.ParserTests.test_plus_condition) ... ok test_private_rule (tests.python.test_parser.ParserTests.test_private_rule) ... ok test_regular_expression_character_classes (tests.python.test_parser.ParserTests.test_regular_expression_character_classes) ... ok test_regular_expression_escape_sequences (tests.python.test_parser.ParserTests.test_regular_expression_escape_sequences) ... ok test_regular_expression_meta_characters (tests.python.test_parser.ParserTests.test_regular_expression_meta_characters) ... ok test_regular_expression_quantifiers (tests.python.test_parser.ParserTests.test_regular_expression_quantifiers) ... ok test_regular_expression_quantifiers_nongreedy (tests.python.test_parser.ParserTests.test_regular_expression_quantifiers_nongreedy) ... ok test_regular_expression_suffix_modifiers (tests.python.test_parser.ParserTests.test_regular_expression_suffix_modifiers) ... ok test_remove_import (tests.python.test_parser.ParserTests.test_remove_import) ... ok test_rule_locations (tests.python.test_parser.ParserTests.test_rule_locations) ... ok test_rule_with_hex_string (tests.python.test_parser.ParserTests.test_rule_with_hex_string) ... ok test_rule_with_metas (tests.python.test_parser.ParserTests.test_rule_with_metas) ... ok test_rule_with_plain_strings (tests.python.test_parser.ParserTests.test_rule_with_plain_strings) ... ok test_rule_with_regexp (tests.python.test_parser.ParserTests.test_rule_with_regexp) ... ok test_rule_with_tags (tests.python.test_parser.ParserTests.test_rule_with_tags) ... ok test_rule_with_unordered_sections (tests.python.test_parser.ParserTests.test_rule_with_unordered_sections) ... ok test_rule_with_variable_and_string (tests.python.test_parser.ParserTests.test_rule_with_variable_and_string) ... ok test_rule_with_variables (tests.python.test_parser.ParserTests.test_rule_with_variables) ... ok test_shift_left_condition (tests.python.test_parser.ParserTests.test_shift_left_condition) ... ok test_shift_right_condition (tests.python.test_parser.ParserTests.test_shift_right_condition) ... ok test_simple_regular_expression_in_strings (tests.python.test_parser.ParserTests.test_simple_regular_expression_in_strings) ... ok test_string_at_condition (tests.python.test_parser.ParserTests.test_string_at_condition) ... ok test_string_condition (tests.python.test_parser.ParserTests.test_string_condition) ... ok test_string_in_range_condition (tests.python.test_parser.ParserTests.test_string_in_range_condition) ... ok test_string_locations (tests.python.test_parser.ParserTests.test_string_locations) ... ok test_string_with_invalid_utf8_sequences (tests.python.test_parser.ParserTests.test_string_with_invalid_utf8_sequences) ... ok test_structure_access_condition (tests.python.test_parser.ParserTests.test_structure_access_condition) ... ok test_unary_minus_condition (tests.python.test_parser.ParserTests.test_unary_minus_condition) ... ok test_variable_condition (tests.python.test_parser.ParserTests.test_variable_condition) ... ok test_xor_condition (tests.python.test_parser.ParserTests.test_xor_condition) ... ok test_change_meta_of_rule (tests.python.test_representation.RepresentationTests.test_change_meta_of_rule) ... ok test_custom_module_enhancing_known_module (tests.python.test_representation.RepresentationTests.test_custom_module_enhancing_known_module) ... ok test_custom_module_interface (tests.python.test_representation.RepresentationTests.test_custom_module_interface) ... ok test_get_modulepool (tests.python.test_representation.RepresentationTests.test_get_modulepool) ... ok test_get_string_modifiers (tests.python.test_representation.RepresentationTests.test_get_string_modifiers) ... ok test_get_tokenstream (tests.python.test_representation.RepresentationTests.test_get_tokenstream) ... ok test_get_tokenstream_after_syntax_error_1 (tests.python.test_representation.RepresentationTests.test_get_tokenstream_after_syntax_error_1) ... ok test_get_tokenstream_after_syntax_error_2 (tests.python.test_representation.RepresentationTests.test_get_tokenstream_after_syntax_error_2) ... ok test_get_tokenstream_after_unknown_identifier_error (tests.python.test_representation.RepresentationTests.test_get_tokenstream_after_unknown_identifier_error) ... ok test_get_tokenstream_after_unknown_module_error (tests.python.test_representation.RepresentationTests.test_get_tokenstream_after_unknown_module_error) ... ok test_literals (tests.python.test_representation.RepresentationTests.test_literals) ... ok test_meta_values_interface (tests.python.test_representation.RepresentationTests.test_meta_values_interface) ... ok test_module_interface (tests.python.test_representation.RepresentationTests.test_module_interface) ... ok test_remove_string_modifiers (tests.python.test_representation.RepresentationTests.test_remove_string_modifiers) ... ok test_set_tags_on_a_rule_with_tags (tests.python.test_representation.RepresentationTests.test_set_tags_on_a_rule_with_tags) ... ok test_set_tags_on_a_rule_without_tags (tests.python.test_representation.RepresentationTests.test_set_tags_on_a_rule_without_tags) ... ok test_set_tags_to_empty_list (tests.python.test_representation.RepresentationTests.test_set_tags_to_empty_list) ... ok test_set_tags_to_empty_list_on_a_rule_without_tags (tests.python.test_representation.RepresentationTests.test_set_tags_to_empty_list_on_a_rule_without_tags) ... ok test_cuckoo_function_replacer (tests.python.test_visitor.VisitorTests.test_cuckoo_function_replacer) ... ok test_modifying_visitor_delete_rules (tests.python.test_visitor.VisitorTests.test_modifying_visitor_delete_rules) ... ok test_modifying_visitor_eq_expression (tests.python.test_visitor.VisitorTests.test_modifying_visitor_eq_expression) ... ok test_modifying_visitor_inpact_on_regexp_expression (tests.python.test_visitor.VisitorTests.test_modifying_visitor_inpact_on_regexp_expression) ... ok test_modifying_visitor_or_deleter (tests.python.test_visitor.VisitorTests.test_modifying_visitor_or_deleter) ... ok test_pe_iconhash_deleter (tests.python.test_visitor.VisitorTests.test_pe_iconhash_deleter) ... ok test_rule_inserter (tests.python.test_visitor.VisitorTests.test_rule_inserter) ... ok test_simple_modifying_visitor (tests.python.test_visitor.VisitorTests.test_simple_modifying_visitor) ... ok test_empty_file (tests.python.test_builder.BuilderTests.test_empty_file) ... ok test_empty_rule (tests.python.test_builder.BuilderTests.test_empty_rule) ... ok test_multiple_rules (tests.python.test_builder.BuilderTests.test_multiple_rules) ... ok test_pure_imports (tests.python.test_builder.BuilderTests.test_pure_imports) ... ok test_rule_with_and_condition (tests.python.test_builder.BuilderTests.test_rule_with_and_condition) ... ok test_rule_with_and_condition_with_comments (tests.python.test_builder.BuilderTests.test_rule_with_and_condition_with_comments) ... ok test_rule_with_and_condition_with_comments_behind (tests.python.test_builder.BuilderTests.test_rule_with_and_condition_with_comments_behind) ... ok test_rule_with_array_access_condition (tests.python.test_builder.BuilderTests.test_rule_with_array_access_condition) ... ok test_rule_with_bitwise_and_condition (tests.python.test_builder.BuilderTests.test_rule_with_bitwise_and_condition) ... ok test_rule_with_bitwise_not_condition (tests.python.test_builder.BuilderTests.test_rule_with_bitwise_not_condition) ... ok test_rule_with_bitwise_or_condition (tests.python.test_builder.BuilderTests.test_rule_with_bitwise_or_condition) ... ok test_rule_with_comments (tests.python.test_builder.BuilderTests.test_rule_with_comments) ... ok test_rule_with_complex_condition (tests.python.test_builder.BuilderTests.test_rule_with_complex_condition) ... ok test_rule_with_custom_modules (tests.python.test_builder.BuilderTests.test_rule_with_custom_modules) ... ok test_rule_with_defined_condition (tests.python.test_builder.BuilderTests.test_rule_with_defined_condition) ... ok test_rule_with_dictionary_access_condition (tests.python.test_builder.BuilderTests.test_rule_with_dictionary_access_condition) ... ok test_rule_with_divide_condition (tests.python.test_builder.BuilderTests.test_rule_with_divide_condition) ... ok test_rule_with_double_values (tests.python.test_builder.BuilderTests.test_rule_with_double_values) ... ok test_rule_with_eq_condition (tests.python.test_builder.BuilderTests.test_rule_with_eq_condition) ... ok test_rule_with_for_loop_over_dictionary (tests.python.test_builder.BuilderTests.test_rule_with_for_loop_over_dictionary) ... ok test_rule_with_function_call_and_oneline_comment (tests.python.test_builder.BuilderTests.test_rule_with_function_call_and_oneline_comment) ... ok test_rule_with_function_call_condition (tests.python.test_builder.BuilderTests.test_rule_with_function_call_condition) ... ok test_rule_with_ge_condition (tests.python.test_builder.BuilderTests.test_rule_with_ge_condition) ... ok test_rule_with_gt_condition (tests.python.test_builder.BuilderTests.test_rule_with_gt_condition) ... ok test_rule_with_hex_string (tests.python.test_builder.BuilderTests.test_rule_with_hex_string) ... ok test_rule_with_le_condition (tests.python.test_builder.BuilderTests.test_rule_with_le_condition) ... ok test_rule_with_lt_condition (tests.python.test_builder.BuilderTests.test_rule_with_lt_condition) ... ok test_rule_with_match_count_condition (tests.python.test_builder.BuilderTests.test_rule_with_match_count_condition) ... ok test_rule_with_match_in_range_condition (tests.python.test_builder.BuilderTests.test_rule_with_match_in_range_condition) ... ok test_rule_with_match_length_condition (tests.python.test_builder.BuilderTests.test_rule_with_match_length_condition) ... ok test_rule_with_match_length_with_index_condition (tests.python.test_builder.BuilderTests.test_rule_with_match_length_with_index_condition) ... ok test_rule_with_match_offset_condition (tests.python.test_builder.BuilderTests.test_rule_with_match_offset_condition) ... ok test_rule_with_match_offset_with_index_condition (tests.python.test_builder.BuilderTests.test_rule_with_match_offset_with_index_condition) ... ok test_rule_with_metas (tests.python.test_builder.BuilderTests.test_rule_with_metas) ... ok test_rule_with_minus_condition (tests.python.test_builder.BuilderTests.test_rule_with_minus_condition) ... ok test_rule_with_modifiers (tests.python.test_builder.BuilderTests.test_rule_with_modifiers) ... ok test_rule_with_modulo_condition (tests.python.test_builder.BuilderTests.test_rule_with_modulo_condition) ... ok test_rule_with_multiply_condition (tests.python.test_builder.BuilderTests.test_rule_with_multiply_condition) ... ok test_rule_with_neq_condition (tests.python.test_builder.BuilderTests.test_rule_with_neq_condition) ... ok test_rule_with_not_condition (tests.python.test_builder.BuilderTests.test_rule_with_not_condition) ... ok test_rule_with_of_at_offset_condition (tests.python.test_builder.BuilderTests.test_rule_with_of_at_offset_condition) ... ok test_rule_with_of_in_range_condition (tests.python.test_builder.BuilderTests.test_rule_with_of_in_range_condition) ... ok test_rule_with_or_condition (tests.python.test_builder.BuilderTests.test_rule_with_or_condition) ... ok test_rule_with_or_condition_with_comments (tests.python.test_builder.BuilderTests.test_rule_with_or_condition_with_comments) ... ok test_rule_with_or_condition_with_single_comment (tests.python.test_builder.BuilderTests.test_rule_with_or_condition_with_single_comment) ... ok test_rule_with_pe_int_constants_condition (tests.python.test_builder.BuilderTests.test_rule_with_pe_int_constants_condition) ... ok test_rule_with_percentage_of_stringset (tests.python.test_builder.BuilderTests.test_rule_with_percentage_of_stringset) ... ok test_rule_with_plain_string (tests.python.test_builder.BuilderTests.test_rule_with_plain_string) ... ok test_rule_with_plus_condition (tests.python.test_builder.BuilderTests.test_rule_with_plus_condition) ... ok test_rule_with_regexp (tests.python.test_builder.BuilderTests.test_rule_with_regexp) ... ok test_rule_with_shift_left_condition (tests.python.test_builder.BuilderTests.test_rule_with_shift_left_condition) ... ok test_rule_with_shift_right_condition (tests.python.test_builder.BuilderTests.test_rule_with_shift_right_condition) ... ok test_rule_with_string_at_condition (tests.python.test_builder.BuilderTests.test_rule_with_string_at_condition) ... ok test_rule_with_string_id_condition (tests.python.test_builder.BuilderTests.test_rule_with_string_id_condition) ... ok test_rule_with_string_literal_set (tests.python.test_builder.BuilderTests.test_rule_with_string_literal_set) ... ok test_rule_with_string_modifiers (tests.python.test_builder.BuilderTests.test_rule_with_string_modifiers) ... ok test_rule_with_structure_access_condition (tests.python.test_builder.BuilderTests.test_rule_with_structure_access_condition) ... ok test_rule_with_tags (tests.python.test_builder.BuilderTests.test_rule_with_tags) ... ok test_rule_with_unary_minus_condition (tests.python.test_builder.BuilderTests.test_rule_with_unary_minus_condition) ... ok test_rule_with_variable_id_condition (tests.python.test_builder.BuilderTests.test_rule_with_variable_id_condition) ... ok test_rule_with_variables (tests.python.test_builder.BuilderTests.test_rule_with_variables) ... ok test_rule_with_xor_condition (tests.python.test_builder.BuilderTests.test_rule_with_xor_condition) ... ok test_add_meta (tests.python.test_parser.ParserTests.test_add_meta) ... ok test_and_condition (tests.python.test_parser.ParserTests.test_and_condition) ... ok test_array_access_condition (tests.python.test_parser.ParserTests.test_array_access_condition) ... ok test_bitwise_and_condition (tests.python.test_parser.ParserTests.test_bitwise_and_condition) ... ok test_bitwise_not_condition (tests.python.test_parser.ParserTests.test_bitwise_not_condition) ... ok test_bitwise_or_condition (tests.python.test_parser.ParserTests.test_bitwise_or_condition) ... ok test_bool_literal_condition (tests.python.test_parser.ParserTests.test_bool_literal_condition) ... ok test_complex_regular_expression_in_fnc_call (tests.python.test_parser.ParserTests.test_complex_regular_expression_in_fnc_call) ... ok test_complex_regular_expression_in_strings (tests.python.test_parser.ParserTests.test_complex_regular_expression_in_strings) ... ok test_contains_condition (tests.python.test_parser.ParserTests.test_contains_condition) ... ok test_divide_condition (tests.python.test_parser.ParserTests.test_divide_condition) ... ok test_double_literal_condition (tests.python.test_parser.ParserTests.test_double_literal_condition) ... ok test_empty_input (tests.python.test_parser.ParserTests.test_empty_input) ... ok test_empty_rule (tests.python.test_parser.ParserTests.test_empty_rule) ... ok test_equal_condition (tests.python.test_parser.ParserTests.test_equal_condition) ... ok test_expression_uids (tests.python.test_parser.ParserTests.test_expression_uids) ... ok test_for_array_condition (tests.python.test_parser.ParserTests.test_for_array_condition) ... ok test_for_dict_condition (tests.python.test_parser.ParserTests.test_for_dict_condition) ... ok test_for_integer_set_condition (tests.python.test_parser.ParserTests.test_for_integer_set_condition) ... ok test_for_string_literal_set_condition (tests.python.test_parser.ParserTests.test_for_string_literal_set_condition) ... ok test_for_string_set_condition (tests.python.test_parser.ParserTests.test_for_string_set_condition) ... ok test_function_call_condition (tests.python.test_parser.ParserTests.test_function_call_condition) ... ok test_global_private_rule (tests.python.test_parser.ParserTests.test_global_private_rule) ... ok test_global_rule (tests.python.test_parser.ParserTests.test_global_rule) ... ok test_greater_equal_condition (tests.python.test_parser.ParserTests.test_greater_equal_condition) ... ok test_greater_than_condition (tests.python.test_parser.ParserTests.test_greater_than_condition) ... ok test_import (tests.python.test_parser.ParserTests.test_import) ... ok test_include_file (tests.python.test_parser.ParserTests.test_include_file) ... ok test_include_file_2 (tests.python.test_parser.ParserTests.test_include_file_2) ... ok test_include_file_and_import_in_regular_mode (tests.python.test_parser.ParserTests.test_include_file_and_import_in_regular_mode) ... ok test_include_undefined_file_and_import_in_incomplete_mode (tests.python.test_parser.ParserTests.test_include_undefined_file_and_import_in_incomplete_mode) ... ok test_include_undefined_file_in_incomplete_mode (tests.python.test_parser.ParserTests.test_include_undefined_file_in_incomplete_mode) ... ok test_int_function_condition (tests.python.test_parser.ParserTests.test_int_function_condition) ... ok test_int_literal_condition (tests.python.test_parser.ParserTests.test_int_literal_condition) ... ok test_less_equal_condition (tests.python.test_parser.ParserTests.test_less_equal_condition) ... ok test_less_than_condition (tests.python.test_parser.ParserTests.test_less_than_condition) ... ok test_links_between_rules_after_rename (tests.python.test_parser.ParserTests.test_links_between_rules_after_rename) ... ok test_match_count_condition (tests.python.test_parser.ParserTests.test_match_count_condition) ... ok test_match_length_condition (tests.python.test_parser.ParserTests.test_match_length_condition) ... ok test_match_length_with_index_condition (tests.python.test_parser.ParserTests.test_match_length_with_index_condition) ... ok test_match_offset_condition (tests.python.test_parser.ParserTests.test_match_offset_condition) ... ok test_match_offset_with_index_condition (tests.python.test_parser.ParserTests.test_match_offset_with_index_condition) ... ok test_matches_condition (tests.python.test_parser.ParserTests.test_matches_condition) ... ok test_math_module (tests.python.test_parser.ParserTests.test_math_module) ... ok test_minus_condition (tests.python.test_parser.ParserTests.test_minus_condition) ... ok test_modify_meta (tests.python.test_parser.ParserTests.test_modify_meta) ... ok test_modulo_condition (tests.python.test_parser.ParserTests.test_modulo_condition) ... ok test_multiple_parse_phases_with_single_yaramod_instance (tests.python.test_parser.ParserTests.test_multiple_parse_phases_with_single_yaramod_instance) ... ok test_multiple_rules (tests.python.test_parser.ParserTests.test_multiple_rules) ... ok test_multiply_condition (tests.python.test_parser.ParserTests.test_multiply_condition) ... ok test_nonutf_comments (tests.python.test_parser.ParserTests.test_nonutf_comments) ... ok test_not_condition (tests.python.test_parser.ParserTests.test_not_condition) ... ok test_not_equal_condition (tests.python.test_parser.ParserTests.test_not_equal_condition) ... ok test_of_at_condition (tests.python.test_parser.ParserTests.test_of_at_condition) ... ok test_of_at_with_string_set_condition (tests.python.test_parser.ParserTests.test_of_at_with_string_set_condition) ... ok test_of_condition (tests.python.test_parser.ParserTests.test_of_condition) ... ok test_or_condition (tests.python.test_parser.ParserTests.test_or_condition) ... ok test_parentheses_condition (tests.python.test_parser.ParserTests.test_parentheses_condition) ... ok test_parse_elf_dynsym (tests.python.test_parser.ParserTests.test_parse_elf_dynsym) ... ok test_parse_pe_signatures_x_algorithm_oid (tests.python.test_parser.ParserTests.test_parse_pe_signatures_x_algorithm_oid) ... ok test_parse_percentage (tests.python.test_parser.ParserTests.test_parse_percentage) ... ok test_parser_error (tests.python.test_parser.ParserTests.test_parser_error) ... ok test_pe_delayed_imports (tests.python.test_parser.ParserTests.test_pe_delayed_imports) ... ok test_pe_imports (tests.python.test_parser.ParserTests.test_pe_imports) ... ok test_pe_number_of_imported_functions (tests.python.test_parser.ParserTests.test_pe_number_of_imported_functions) ... ok test_plain_strings_with_modifiers (tests.python.test_parser.ParserTests.test_plain_strings_with_modifiers) ... ok test_plus_condition (tests.python.test_parser.ParserTests.test_plus_condition) ... ok test_private_rule (tests.python.test_parser.ParserTests.test_private_rule) ... ok test_regular_expression_character_classes (tests.python.test_parser.ParserTests.test_regular_expression_character_classes) ... ok test_regular_expression_escape_sequences (tests.python.test_parser.ParserTests.test_regular_expression_escape_sequences) ... ok test_regular_expression_meta_characters (tests.python.test_parser.ParserTests.test_regular_expression_meta_characters) ... ok test_regular_expression_quantifiers (tests.python.test_parser.ParserTests.test_regular_expression_quantifiers) ... ok test_regular_expression_quantifiers_nongreedy (tests.python.test_parser.ParserTests.test_regular_expression_quantifiers_nongreedy) ... ok test_regular_expression_suffix_modifiers (tests.python.test_parser.ParserTests.test_regular_expression_suffix_modifiers) ... ok test_remove_import (tests.python.test_parser.ParserTests.test_remove_import) ... ok test_rule_locations (tests.python.test_parser.ParserTests.test_rule_locations) ... ok test_rule_with_hex_string (tests.python.test_parser.ParserTests.test_rule_with_hex_string) ... ok test_rule_with_metas (tests.python.test_parser.ParserTests.test_rule_with_metas) ... ok test_rule_with_plain_strings (tests.python.test_parser.ParserTests.test_rule_with_plain_strings) ... ok test_rule_with_regexp (tests.python.test_parser.ParserTests.test_rule_with_regexp) ... ok test_rule_with_tags (tests.python.test_parser.ParserTests.test_rule_with_tags) ... ok test_rule_with_unordered_sections (tests.python.test_parser.ParserTests.test_rule_with_unordered_sections) ... ok test_rule_with_variable_and_string (tests.python.test_parser.ParserTests.test_rule_with_variable_and_string) ... ok test_rule_with_variables (tests.python.test_parser.ParserTests.test_rule_with_variables) ... ok test_shift_left_condition (tests.python.test_parser.ParserTests.test_shift_left_condition) ... ok test_shift_right_condition (tests.python.test_parser.ParserTests.test_shift_right_condition) ... ok test_simple_regular_expression_in_strings (tests.python.test_parser.ParserTests.test_simple_regular_expression_in_strings) ... ok test_string_at_condition (tests.python.test_parser.ParserTests.test_string_at_condition) ... ok test_string_condition (tests.python.test_parser.ParserTests.test_string_condition) ... ok test_string_in_range_condition (tests.python.test_parser.ParserTests.test_string_in_range_condition) ... ok test_string_locations (tests.python.test_parser.ParserTests.test_string_locations) ... ok test_string_with_invalid_utf8_sequences (tests.python.test_parser.ParserTests.test_string_with_invalid_utf8_sequences) ... ok test_structure_access_condition (tests.python.test_parser.ParserTests.test_structure_access_condition) ... ok test_unary_minus_condition (tests.python.test_parser.ParserTests.test_unary_minus_condition) ... ok test_variable_condition (tests.python.test_parser.ParserTests.test_variable_condition) ... ok test_xor_condition (tests.python.test_parser.ParserTests.test_xor_condition) ... ok test_change_meta_of_rule (tests.python.test_representation.RepresentationTests.test_change_meta_of_rule) ... ok test_custom_module_enhancing_known_module (tests.python.test_representation.RepresentationTests.test_custom_module_enhancing_known_module) ... ok test_custom_module_interface (tests.python.test_representation.RepresentationTests.test_custom_module_interface) ... ok test_get_modulepool (tests.python.test_representation.RepresentationTests.test_get_modulepool) ... ok test_get_string_modifiers (tests.python.test_representation.RepresentationTests.test_get_string_modifiers) ... ok test_get_tokenstream (tests.python.test_representation.RepresentationTests.test_get_tokenstream) ... ok test_get_tokenstream_after_syntax_error_1 (tests.python.test_representation.RepresentationTests.test_get_tokenstream_after_syntax_error_1) ... ok test_get_tokenstream_after_syntax_error_2 (tests.python.test_representation.RepresentationTests.test_get_tokenstream_after_syntax_error_2) ... ok test_get_tokenstream_after_unknown_identifier_error (tests.python.test_representation.RepresentationTests.test_get_tokenstream_after_unknown_identifier_error) ... ok test_get_tokenstream_after_unknown_module_error (tests.python.test_representation.RepresentationTests.test_get_tokenstream_after_unknown_module_error) ... ok test_literals (tests.python.test_representation.RepresentationTests.test_literals) ... ok test_meta_values_interface (tests.python.test_representation.RepresentationTests.test_meta_values_interface) ... ok test_module_interface (tests.python.test_representation.RepresentationTests.test_module_interface) ... ok test_remove_string_modifiers (tests.python.test_representation.RepresentationTests.test_remove_string_modifiers) ... ok test_set_tags_on_a_rule_with_tags (tests.python.test_representation.RepresentationTests.test_set_tags_on_a_rule_with_tags) ... ok test_set_tags_on_a_rule_without_tags (tests.python.test_representation.RepresentationTests.test_set_tags_on_a_rule_without_tags) ... ok test_set_tags_to_empty_list (tests.python.test_representation.RepresentationTests.test_set_tags_to_empty_list) ... ok test_set_tags_to_empty_list_on_a_rule_without_tags (tests.python.test_representation.RepresentationTests.test_set_tags_to_empty_list_on_a_rule_without_tags) ... ok test_find_token (tests.python.test_tokenstream.TokenStreamTests.test_find_token) ... ok test_iteration (tests.python.test_tokenstream.TokenStreamTests.test_iteration) ... ok test_modify_stream (tests.python.test_tokenstream.TokenStreamTests.test_modify_stream) ... ok test_mypy (tests.python.test_typing_stub.TypingStubTests.test_mypy) ... skipped 'MyPy not installed.' test_cuckoo_function_replacer (tests.python.test_visitor.VisitorTests.test_cuckoo_function_replacer) ... ok test_modifying_visitor_delete_rules (tests.python.test_visitor.VisitorTests.test_modifying_visitor_delete_rules) ... ok test_modifying_visitor_eq_expression (tests.python.test_visitor.VisitorTests.test_modifying_visitor_eq_expression) ... ok test_modifying_visitor_inpact_on_regexp_expression (tests.python.test_visitor.VisitorTests.test_modifying_visitor_inpact_on_regexp_expression) ... ok test_modifying_visitor_or_deleter (tests.python.test_visitor.VisitorTests.test_modifying_visitor_or_deleter) ... ok test_pe_iconhash_deleter (tests.python.test_visitor.VisitorTests.test_pe_iconhash_deleter) ... ok test_rule_inserter (tests.python.test_visitor.VisitorTests.test_rule_inserter) ... ok test_simple_modifying_visitor (tests.python.test_visitor.VisitorTests.test_simple_modifying_visitor) ... ok ---------------------------------------------------------------------- Ran 530 tests in 34.999s OK (skipped=1) import "pe" rule rule_with_function_call_condition { condition: pe.is_dll() // Generated } import "pe" rule rule_with_function_call_condition { condition: pe.is_dll() // Generated } ['Testing function overload documentation.', 'Testing function cool overload documentation.'] import "pe" rule rule_with_function_call_condition { condition: pe.is_dll() // Generated } ['Testing function overload documentation.', 'Testing function cool overload documentation.'] make[1]: Leaving directory '/build/reproducible-path/yaramod-3.21.0' create-stamp debian/debhelper-build-stamp dh_prep debian/rules override_dh_auto_install-arch make[1]: Entering directory '/build/reproducible-path/yaramod-3.21.0' dh_auto_install -a -O--buildsystem=cmake cd obj-arm-linux-gnueabihf && make -j3 install DESTDIR=/build/reproducible-path/yaramod-3.21.0/debian/tmp AM_UPDATE_INFO_DIR=no "INSTALL=install --strip-program=true" make[2]: Entering directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' /usr/bin/cmake -S/build/reproducible-path/yaramod-3.21.0 -B/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf --check-build-system CMakeFiles/Makefile.cmake 0 make -f CMakeFiles/Makefile2 preinstall make[3]: Entering directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' make[3]: Nothing to be done for 'preinstall'. make[3]: Leaving directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' Install the project... /usr/bin/cmake -P cmake_install.cmake -- Install configuration: "None" -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/lib/arm-linux-gnueabihf/libyaramod.so.3.21.0 -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/lib/arm-linux-gnueabihf/libyaramod.so.0 -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/lib/arm-linux-gnueabihf/libyaramod.so -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/lib/arm-linux-gnueabihf/libyaramod.a -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/expression_type.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/yara_file.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/modules -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/modules/module.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/modules/module_pool.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/modules/module_content.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/modules/generated -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/modules/generated/module_elf_generated.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/modules/generated/module_cuckoo_deprecated_generated.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/modules/generated/module_string_generated.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/modules/generated/module_console_generated.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/modules/generated/module_macho_generated.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/modules/generated/module_time_generated.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/modules/generated/module_cuckoo_generated.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/modules/generated/module_dex_generated.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/modules/generated/module_math_generated.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/modules/generated/module_list.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/modules/generated/module_magic_generated.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/modules/generated/module_hash_generated.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/modules/generated/module_pe_generated.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/modules/generated/module_dotnet_generated.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/variable.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/meta.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/token.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/symbol.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/features.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/hex_string.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/rule.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/symbols.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/string_modifier.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/plain_string.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/expressions.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/token_stream.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/string.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/regexp.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/sections_summary.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/literal.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/expression.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/types/token_type.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/yaramod.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/parser -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/parser/value.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/parser/location.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/parser/parser_driver.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/parser/uid_generator.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/parser/file_context.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/yaramod_error.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/builder -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/builder/yara_expression_builder.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/builder/yara_file_builder.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/builder/yara_hex_string_builder.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/builder/yara_rule_builder.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/utils -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/utils/modifying_visitor.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/utils/filesystem_operations.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/utils/json.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/utils/utils.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/utils/observing_visitor.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/utils/trie.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/utils/visitor_result.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/utils/visitor.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/include/yaramod/utils/filesystem.h -- Installing: /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/lib/arm-linux-gnueabihf/pkgconfig/yaramod.pc make[2]: Leaving directory '/build/reproducible-path/yaramod-3.21.0/obj-arm-linux-gnueabihf' dh_auto_install -a -O--buildsystem=pybuild I: pybuild base:311: /usr/bin/python3 setup.py install --root /build/reproducible-path/yaramod-3.21.0/debian/tmp /usr/lib/python3/dist-packages/setuptools/dist.py:450: SetuptoolsDeprecationWarning: Invalid dash-separated options !! ******************************************************************************** Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead. By 2024-Sep-26, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details. ******************************************************************************** !! opt = self.warn_dash_deprecation(opt, section) running install /usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !! ******************************************************************************** Please avoid running ``setup.py`` directly. Instead, use pypa/build, pypa/installer or other standards-based tools. See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. ******************************************************************************** !! self.initialize_options() running build running build_py running build_ext running install_lib creating /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/lib/python3.12 creating /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/lib/python3.12/dist-packages creating /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/lib/python3.12/dist-packages/yaramod copying /build/reproducible-path/yaramod-3.21.0/.pybuild/cpython3_3.12/build/yaramod/py.typed -> /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/lib/python3.12/dist-packages/yaramod copying /build/reproducible-path/yaramod-3.21.0/.pybuild/cpython3_3.12/build/yaramod/__init__.pyi -> /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/lib/python3.12/dist-packages/yaramod copying /build/reproducible-path/yaramod-3.21.0/.pybuild/cpython3_3.12/build/yaramod.cpython-312-arm-linux-gnueabihf.so -> /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/lib/python3.12/dist-packages running install_egg_info running egg_info creating yaramod.egg-info writing yaramod.egg-info/PKG-INFO writing dependency_links to yaramod.egg-info/dependency_links.txt writing top-level names to yaramod.egg-info/top_level.txt writing manifest file 'yaramod.egg-info/SOURCES.txt' reading manifest file 'yaramod.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file 'yaramod.egg-info/SOURCES.txt' Copying yaramod.egg-info to /build/reproducible-path/yaramod-3.21.0/debian/tmp/usr/lib/python3.12/dist-packages/yaramod-3.21.0.egg-info Skipping SOURCES.txt running install_scripts make[1]: Leaving directory '/build/reproducible-path/yaramod-3.21.0' dh_install dh_installdocs dh_installchangelogs dh_installexamples dh_python3 -a dh_perl dh_link dh_strip_nondeterminism dh_compress dh_fixperms dh_missing dh_dwz -a dh_strip -a dh_makeshlibs -a dh_shlibdeps -a dpkg-shlibdeps: warning: diversions involved - output may be incorrect diversion by libc6 from: /lib/ld-linux-armhf.so.3 dpkg-shlibdeps: warning: diversions involved - output may be incorrect diversion by libc6 to: /lib/ld-linux-armhf.so.3.usr-is-merged dpkg-shlibdeps: warning: diversions involved - output may be incorrect diversion by libc6 from: /lib/ld-linux-armhf.so.3 dpkg-shlibdeps: warning: diversions involved - output may be incorrect diversion by libc6 to: /lib/ld-linux-armhf.so.3.usr-is-merged dpkg-shlibdeps: warning: symbol __aeabi_atexit@CXXABI_ARM_1.3.3 used by debian/libyaramod0/usr/lib/arm-linux-gnueabihf/libyaramod.so.3.21.0 found in none of the libraries dh_installdeb dh_gencontrol dpkg-gencontrol: warning: Provides field of package python3-yaramod: substitution variable ${python3:Provides} used, but is not defined dpkg-gencontrol: warning: Provides field of package python3-yaramod: substitution variable ${python3:Provides} used, but is not defined dh_md5sums dh_builddeb dpkg-deb: building package 'libyaramod-dev' in '../libyaramod-dev_3.21.0-1.1_armhf.deb'. dpkg-deb: building package 'libyaramod0-dbgsym' in '../libyaramod0-dbgsym_3.21.0-1.1_armhf.deb'. dpkg-deb: building package 'python3-yaramod-dbgsym' in '../python3-yaramod-dbgsym_3.21.0-1.1_armhf.deb'. dpkg-deb: building package 'libyaramod0' in '../libyaramod0_3.21.0-1.1_armhf.deb'. dpkg-deb: building package 'python3-yaramod' in '../python3-yaramod_3.21.0-1.1_armhf.deb'. dpkg-genbuildinfo --build=binary -O../yaramod_3.21.0-1.1_armhf.buildinfo dpkg-genchanges --build=binary -O../yaramod_3.21.0-1.1_armhf.changes dpkg-genchanges: info: binary-only upload (no source code included) dpkg-source --after-build . dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: not including original source code in upload I: copying local configuration I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env I: removing directory /srv/workspace/pbuilder/4857 and its subdirectories I: Current time: Tue Aug 27 21:51:30 -12 2024 I: pbuilder-time-stamp: 1724838690 Wed Aug 28 09:52:25 UTC 2024 I: 1st build successful. Starting 2nd build on remote node virt32z-armhf-rb.debian.net. Wed Aug 28 09:52:25 UTC 2024 I: Preparing to do remote build '2' on virt32z-armhf-rb.debian.net. Wed Aug 28 10:09:20 UTC 2024 I: Deleting $TMPDIR on virt32z-armhf-rb.debian.net. Wed Aug 28 10:09:25 UTC 2024 I: yaramod_3.21.0-1.1_armhf.changes: Format: 1.8 Date: Wed, 03 Jul 2024 17:18:46 -0400 Source: yaramod Binary: libyaramod-dev libyaramod0 libyaramod0-dbgsym python3-yaramod python3-yaramod-dbgsym Architecture: armhf Version: 3.21.0-1.1 Distribution: unstable Urgency: medium Maintainer: Yangfl Changed-By: Boyuan Yang Description: libyaramod-dev - YARA parser for C++ (development headers) libyaramod0 - YARA parser for C++ python3-yaramod - YARA parser for C++ (Python 3 binding) Changes: yaramod (3.21.0-1.1) unstable; urgency=medium . * Non-maintainer upload. * Trigger rebuild against Python 3.12 as the default version. * debian/tests/unittest.sh: Bump hardcoded YARAMOD_VERSION to 3.21.0. Checksums-Sha1: 0c3d82d3b1ac9a1f18946671b10f2c26791eb2af 737308 libyaramod-dev_3.21.0-1.1_armhf.deb c395c4b07b19d653eb9916251e00e25b726d0bc0 12243448 libyaramod0-dbgsym_3.21.0-1.1_armhf.deb 20ba4be6a149cb0fa4682c5e7f7ef7be4b6b7a12 460352 libyaramod0_3.21.0-1.1_armhf.deb 40022c163d31ed9924556f9113e1d80c84ae4c68 10136512 python3-yaramod-dbgsym_3.21.0-1.1_armhf.deb 60cec6f7f8077a927ac131704f48b018bea4efe2 367816 python3-yaramod_3.21.0-1.1_armhf.deb 83e4a1ea3245607d3ae6c2763df1bcad8e9bb77e 8351 yaramod_3.21.0-1.1_armhf.buildinfo Checksums-Sha256: f0026e9f99a9d4611e5d8f809117918fd0a372407905b164f767923baf14930d 737308 libyaramod-dev_3.21.0-1.1_armhf.deb 7b3b63e9780582e87cdb2f6e023489190c388ff7222e14221f7cd609a7f7d9a8 12243448 libyaramod0-dbgsym_3.21.0-1.1_armhf.deb b45cc5bb1abc9279909bf0dc77c5574515f7bd200a15e2f7581f3ee37bddf0ed 460352 libyaramod0_3.21.0-1.1_armhf.deb 3e99e0170c479ac326e3a2d5843c696287aa413bcb64c589c39c6c08a977f114 10136512 python3-yaramod-dbgsym_3.21.0-1.1_armhf.deb e5fb1566e290c12639e1d7a346c6c92870c5585547ad41afffe652329a2aed4a 367816 python3-yaramod_3.21.0-1.1_armhf.deb 13f7f239314d89dbd7a8cff6b7cc6d254f6b8a5a9adf7bdcc6dc26be1b414fba 8351 yaramod_3.21.0-1.1_armhf.buildinfo Files: 756bec634e4311487f1811b502ebe175 737308 libdevel optional libyaramod-dev_3.21.0-1.1_armhf.deb 9bfb11272d8eb765db10e8ba5149538f 12243448 debug optional libyaramod0-dbgsym_3.21.0-1.1_armhf.deb 4d863d5255450e32c3d25a329c46b04b 460352 libs optional libyaramod0_3.21.0-1.1_armhf.deb 5f9fd8be3987485770732242ef06afc9 10136512 debug optional python3-yaramod-dbgsym_3.21.0-1.1_armhf.deb 37fc064fe8639a02802b85fed6bcd10c 367816 python optional python3-yaramod_3.21.0-1.1_armhf.deb 1872e3d055b8c31cf99a6aea9e388b37 8351 libs optional yaramod_3.21.0-1.1_armhf.buildinfo Wed Aug 28 10:09:26 UTC 2024 I: diffoscope 276 will be used to compare the two builds: Running as unit: rb-diffoscope-armhf_6-9861.service 2024-08-28 10:09:32 E: diffoscope.comparators.elf: Command '['objdump --line-numbers --disassemble --demangle --reloc --no-show-raw-insn --section=.text._ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10shared_ptrIN7yaramod6ModuleEEESaISC_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSE_18_Mod_range_hashingENSE_20_Default_ranged_hashENSE_20_Prime_rehash_po {}']' returned non-zero exit status 1. 2024-08-28 10:09:32 E: diffoscope.comparators.elf: Command '['objdump --disassemble --demangle --no-show-raw-insn --section=.text._ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10shared_ptrIN7yaramod6ModuleEEESaISC_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSE_18_Mod_range_hashingENSE_20_Default_ranged_hashENSE_20_Prime_rehash_po {}']' returned non-zero exit status 1. 2024-08-28 10:09:33 E: diffoscope.comparators.elf: Command '['objdump --line-numbers --disassemble --demangle --reloc --no-show-raw-insn --section=.text._ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorS5_bxydSaNS9_14adl_serializerESC_IhSaIhEEvEEESt10_Select1stISH_ESt4lessIvESaISH_EE8_M_eraseEPSt13_Rb_tree_nodeISH_E {}']' returned non-zero exit status 1. 2024-08-28 10:09:33 E: diffoscope.comparators.elf: Command '['objdump --disassemble --demangle --no-show-raw-insn --section=.text._ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorS5_bxydSaNS9_14adl_serializerESC_IhSaIhEEvEEESt10_Select1stISH_ESt4lessIvESaISH_EE8_M_eraseEPSt13_Rb_tree_nodeISH_E {}']' returned non-zero exit status 1. # Profiling output for: /usr/bin/diffoscope --timeout 7200 --html /srv/reproducible-results/rbuild-debian/r-b-build.iKJtymfj/yaramod_3.21.0-1.1.diffoscope.html --text /srv/reproducible-results/rbuild-debian/r-b-build.iKJtymfj/yaramod_3.21.0-1.1.diffoscope.txt --json /srv/reproducible-results/rbuild-debian/r-b-build.iKJtymfj/yaramod_3.21.0-1.1.diffoscope.json --profile=- /srv/reproducible-results/rbuild-debian/r-b-build.iKJtymfj/b1/yaramod_3.21.0-1.1_armhf.changes /srv/reproducible-results/rbuild-debian/r-b-build.iKJtymfj/b2/yaramod_3.21.0-1.1_armhf.changes ## close_archive (total time: 0.001s) 0.000s 44 calls diffoscope.comparators.xz.XzContainer 0.000s 30 calls diffoscope.comparators.tar.TarContainer 0.000s 20 calls diffoscope.comparators.deb.DebContainer 0.000s 14 calls diffoscope.comparators.deb.DebTarContainer 0.000s 2 calls diffoscope.comparators.ar.ArContainer ## command (total time: 1453.961s) 752.194s 3449 calls readelf 588.609s 425 calls diff 102.632s 921 calls objdump 4.262s 6 calls objcopy 3.592s 44 calls xz 2.047s 55 calls strings 0.558s 11 calls nm 0.031s 12 calls cmp 0.031s 12 calls cmp (external) 0.005s 64 calls cmp (internal) ## compare_files (cumulative) (total time: 3985.267s) 765.103s 1 call abc.DotChangesFile 765.032s 5 calls abc.DebFile 764.755s 10 calls abc.XzFile 762.565s 5 calls abc.DebDataTarFile 758.497s 5 calls abc.ElfFile 145.040s 44 calls diffoscope.comparators.elf.ElfCodeSection 9.001s 152 calls diffoscope.comparators.elf.ElfSection 8.874s 8 calls diffoscope.comparators.elf.ElfStringSection 6.143s 1 call abc.ArFile 0.177s 5 calls abc.TarFile 0.032s 3 calls abc.TextFile 0.027s 5 calls abc.Md5sumsFile 0.021s 2 calls diffoscope.comparators.elf.MonkeyPatchedElfSection ## container_extract (total time: 4.237s) 3.594s 44 calls diffoscope.comparators.xz.XzContainer 0.344s 178 calls diffoscope.comparators.deb.DebTarContainer 0.236s 54 calls diffoscope.comparators.deb.DebContainer 0.038s 42 calls diffoscope.comparators.ar.ArContainer 0.026s 44 calls diffoscope.comparators.tar.TarContainer ## diff (total time: 1.777s) 1.777s 1177 calls linediff ## has_same_content_as (total time: 0.045s) 0.029s 25 calls abc.ElfFile 0.007s 5 calls abc.DebDataTarFile 0.002s 10 calls abc.Md5sumsFile 0.002s 13 calls abc.TextFile 0.001s 152 calls diffoscope.comparators.elf.ElfSection 0.001s 10 calls abc.XzFile 0.001s 5 calls abc.TarFile 0.001s 4 calls diffoscope.comparators.utils.libarchive.LibarchiveSymlink 0.001s 5 calls abc.DebFile 0.000s 44 calls diffoscope.comparators.elf.ElfCodeSection 0.000s 1 call abc.DotChangesFile 0.000s 1 call abc.ArFile 0.000s 8 calls diffoscope.comparators.elf.ElfStringSection 0.000s 2 calls diffoscope.comparators.elf.MonkeyPatchedElfSection ## main (total time: 792.703s) 792.701s 2 calls outputs 0.002s 1 call cleanup ## open_archive (total time: 0.001s) 0.000s 44 calls diffoscope.comparators.xz.XzContainer 0.000s 30 calls diffoscope.comparators.tar.TarContainer 0.000s 20 calls diffoscope.comparators.deb.DebContainer 0.000s 14 calls diffoscope.comparators.deb.DebTarContainer 0.000s 2 calls diffoscope.comparators.ar.ArContainer ## output (total time: 26.976s) 20.705s 1 call html 3.576s 1 call text 2.694s 1 call json ## recognizes (total time: 3.009s) 1.784s 1940 calls diffoscope.comparators.utils.archive.ArchiveMember 0.822s 5466 calls diffoscope.comparators.utils.libarchive.LibarchiveMember 0.264s 12 calls diffoscope.comparators.binary.FilesystemFile 0.140s 540 calls diffoscope.comparators.debian.DebControlMember ## specialize (total time: 0.506s) 0.506s 285 calls specialize Finished with result: success Main processes terminated with: code=exited/status=1 Service runtime: 13min 13.166s CPU time consumed: 16min 41.898s Wed Aug 28 10:22:41 UTC 2024 W: Diffoscope claims the build is reproducible, but there is a diffoscope file. Please investigate. Wed Aug 28 10:22:41 UTC 2024 E: yaramod failed to build reproducibly in unstable on armhf. Wed Aug 28 10:24:33 UTC 2024 I: Submitting .buildinfo files to external archives: Wed Aug 28 10:24:33 UTC 2024 I: Submitting 12K b1/yaramod_3.21.0-1.1_armhf.buildinfo.asc Wed Aug 28 10:24:34 UTC 2024 I: Submitting 12K b2/yaramod_3.21.0-1.1_armhf.buildinfo.asc Wed Aug 28 10:24:36 UTC 2024 I: Done submitting .buildinfo files to http://buildinfo.debian.net/api/submit. Wed Aug 28 10:24:36 UTC 2024 I: Done submitting .buildinfo files. Wed Aug 28 10:24:36 UTC 2024 I: Removing signed yaramod_3.21.0-1.1_armhf.buildinfo.asc files: removed './b1/yaramod_3.21.0-1.1_armhf.buildinfo.asc' removed './b2/yaramod_3.21.0-1.1_armhf.buildinfo.asc'