Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110845 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 40825 invoked from network); 5 Jul 2020 17:59:22 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 Jul 2020 17:59:22 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2362D1804E2 for ; Sun, 5 Jul 2020 09:49:35 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 5 Jul 2020 09:49:34 -0700 (PDT) Received: by mail-wm1-f44.google.com with SMTP id g75so36662756wme.5 for ; Sun, 05 Jul 2020 09:49:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=c52VMW1U7E3aT3yV1+SQ77O2xXJzR1n4849kQLUSTRM=; b=Raz5sbKhGM2CBadfzgzXD+0tPQVMfdP/JTJEyarDhKnp1wegUDMiutbOhlWggJkRIG VnRG9B5B8HdUqzFuoKxvJsi9d4jcyTceXplgebYfBCQLHoDbRlKB5AlydxDLrU7BD3qD lIEgFJafYsyg1vT+U8jQcDgIF5ID0rRuj6YR3HemVrbnXBJgDbBr2UDWlLW76LGLOPQ9 SvpJBoB3xC5EVWEs4O5DmpYmAYtDmbEcGX/yVU7BNYxrBUs/dWC0gKPke6OSiwPwf2wF YgkifNttqUB6HGwxBh3uArUEXcN+DThXdJ9KORYd0CVY41HAGJNvTSYt09BammqeJWe6 91kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=c52VMW1U7E3aT3yV1+SQ77O2xXJzR1n4849kQLUSTRM=; b=dZdMYCjx3JK6usttsB0vvKJ2ezxBnzVLk0GAjit9nfd1VrhjdAi4MXNLNSC+F1REpD 07a3t0ICExoJewOniws2X3Rr005EwE2NVFetkQGyAHFNpCT8IZE6+GnKvR6Tvys/leyB pRAJaIAD6VroMK6rDSQ9fleJvLqXGfpwmb41Oqpa1/81y1oOLW2rS0g3vhB9xHHLS/dQ XcdjZyTd8rgn5zOOi3ZpDR9TVxu+KD5ga62DIgQLrB7FytbbTB7QM025RwpGtKpQ0LjO r8tdu9lht096B+UNdE+uS/oRFXVWvblG96YIhJZ3aXCu/qaJDFInRaQTzs2Ycw5/Hi/w aPXg== X-Gm-Message-State: AOAM530LJY6mWPniUsKST3b3VhQhYTGB00nAjGwMawDbq1jt+ujYwxum TMk22RahIhNZCZmjUkBnOyW/RiUZ X-Google-Smtp-Source: ABdhPJzsfK6iPB5iI+AQZUqGToB3QaSjGig1QUtM1m6a/YmcPoAvtz6bRhSbRZlQjpFsKAKdZTvReg== X-Received: by 2002:a7b:c8c2:: with SMTP id f2mr43489989wml.57.1593967772224; Sun, 05 Jul 2020 09:49:32 -0700 (PDT) Received: from [192.168.0.22] (cpc84253-brig22-2-0-cust114.3-3.cable.virginm.net. [81.108.141.115]) by smtp.googlemail.com with ESMTPSA id z10sm15695549wrm.21.2020.07.05.09.49.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Jul 2020 09:49:31 -0700 (PDT) To: PHP Internals References: <0915B96B-DFF1-4F24-993B-350D36EB9A74@gmail.com> Message-ID: Date: Sun, 5 Jul 2020 17:49:28 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <0915B96B-DFF1-4F24-993B-350D36EB9A74@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [PHP-DEV] Improving output of syntax errors From: rowan.collins@gmail.com (Rowan Tommins) On 29/06/2020 10:42, Claude Pache wrote: > Another way to give the programmer the appropriate information, is > replacing “quoted string” with “single-quoted string” and > “double-quoted string”. > > And while I am thinking about it: a case that tends to cause divergent > squint is: unexpected '"', which you changed into: unexpected token """ I've pushed up a new version of the patch with three new special cases: * unexpected token """ -> unexpected double-quote mark * unexpected quoted string "foo" -> unexpected single-quoted string  "foo" / unexpected double-quoted string "foo" * unexpected illegal character "_" -> unexpected character 0xNN (where _ is almost certainly a control character, and NN is instead the hexadecimal value of the byte) I've updated the example table with a new column showing those additions: https://rwec.co.uk/x/php-parse-errors/comparison.html If there's no other comments or objections, I would appreciate if someone could merge this in so it can be tested in the next alpha :) Regards, -- Rowan Tommins (né Collins) [IMSoP]