You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "junichi11 (via GitHub)" <gi...@apache.org> on 2023/03/22 04:43:40 UTC

[GitHub] [netbeans] junichi11 opened a new pull request, #5695: PHP 8.1: Explicit octal integer literal notation #5026

junichi11 opened a new pull request, #5695:
URL: https://github.com/apache/netbeans/pull/5695

   - https://github.com/apache/netbeans/issues/5026
   - https://wiki.php.net/rfc/explicit_octal_notation
   - Fix lexers
   - Fix `PHP81UnhandledError`
   - Add unit tests for the parser and the lexer
   
   #### PHP 8.1:
   
   ![nb-php81-explicit-octal-integer-literal-notation](https://user-images.githubusercontent.com/738383/226803424-ed5db35f-0089-46bc-88df-1e5308ea3e59.png)
   
   #### PHP 8.0:
   
   ![nb-php81-explicit-octal-integer-literal-notation-with-php80](https://user-images.githubusercontent.com/738383/226803575-574cdf4f-9a24-4899-ac75-4f5f1f43615a.png)
   P 8.0:
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] tmysik merged pull request #5695: PHP 8.1: Explicit octal integer literal notation #5026

Posted by "tmysik (via GitHub)" <gi...@apache.org>.
tmysik merged PR #5695:
URL: https://github.com/apache/netbeans/pull/5695


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] tmysik commented on a diff in pull request #5695: PHP 8.1: Explicit octal integer literal notation #5026

Posted by "tmysik (via GitHub)" <gi...@apache.org>.
tmysik commented on code in PR #5695:
URL: https://github.com/apache/netbeans/pull/5695#discussion_r1145693053


##########
php/php.editor/tools/ASTPHP5Scanner.flex:
##########
@@ -943,6 +944,12 @@ NOWDOC_CHARS=({NEWLINE}*(([^a-zA-Z_\x7f-\xff\n\r][^\n\r]*)|({LABEL}[^a-zA-Z0-9_\
     pushState(ST_IN_SCRIPTING);
 }
 
+<ST_IN_SCRIPTING>{ONUM} {
+    // PHP 8.1: Explicit octal integer literal notation
+    // https://wiki.php.net/rfc/explicit_octal_notation
+    return createFullSymbol(ASTPHP5Symbols.T_LNUMBER);

Review Comment:
   OK, thanks.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] junichi11 commented on a diff in pull request #5695: PHP 8.1: Explicit octal integer literal notation #5026

Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on code in PR #5695:
URL: https://github.com/apache/netbeans/pull/5695#discussion_r1145686415


##########
php/php.editor/tools/ASTPHP5Scanner.flex:
##########
@@ -943,6 +944,12 @@ NOWDOC_CHARS=({NEWLINE}*(([^a-zA-Z_\x7f-\xff\n\r][^\n\r]*)|({LABEL}[^a-zA-Z0-9_\
     pushState(ST_IN_SCRIPTING);
 }
 
+<ST_IN_SCRIPTING>{ONUM} {
+    // PHP 8.1: Explicit octal integer literal notation
+    // https://wiki.php.net/rfc/explicit_octal_notation
+    return createFullSymbol(ASTPHP5Symbols.T_LNUMBER);

Review Comment:
   It should not be correct. Actually, `T_LNUMBER` or `T_DNUMBER` is returned in PHP. (`ONUM` too) So need more checks. However, I don't think there are big effects on the existing features of NB currently.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] tmysik commented on a diff in pull request #5695: PHP 8.1: Explicit octal integer literal notation #5026

Posted by "tmysik (via GitHub)" <gi...@apache.org>.
tmysik commented on code in PR #5695:
URL: https://github.com/apache/netbeans/pull/5695#discussion_r1145670851


##########
php/php.editor/tools/ASTPHP5Scanner.flex:
##########
@@ -943,6 +944,12 @@ NOWDOC_CHARS=({NEWLINE}*(([^a-zA-Z_\x7f-\xff\n\r][^\n\r]*)|({LABEL}[^a-zA-Z0-9_\
     pushState(ST_IN_SCRIPTING);
 }
 
+<ST_IN_SCRIPTING>{ONUM} {
+    // PHP 8.1: Explicit octal integer literal notation
+    // https://wiki.php.net/rfc/explicit_octal_notation
+    return createFullSymbol(ASTPHP5Symbols.T_LNUMBER);

Review Comment:
   Just noticed - for `HNUM` and `BNUM` below, we return `T_DNUMBER` - is that correct?
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] junichi11 commented on a diff in pull request #5695: PHP 8.1: Explicit octal integer literal notation #5026

Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on code in PR #5695:
URL: https://github.com/apache/netbeans/pull/5695#discussion_r1145686415


##########
php/php.editor/tools/ASTPHP5Scanner.flex:
##########
@@ -943,6 +944,12 @@ NOWDOC_CHARS=({NEWLINE}*(([^a-zA-Z_\x7f-\xff\n\r][^\n\r]*)|({LABEL}[^a-zA-Z0-9_\
     pushState(ST_IN_SCRIPTING);
 }
 
+<ST_IN_SCRIPTING>{ONUM} {
+    // PHP 8.1: Explicit octal integer literal notation
+    // https://wiki.php.net/rfc/explicit_octal_notation
+    return createFullSymbol(ASTPHP5Symbols.T_LNUMBER);

Review Comment:
   It should not be correct. Actually, `T_LNUMBER` or `T_DNUMBER` is returned in PHP. (`ONUM` too) So need more checks. However, maybe, I don't think there are big effects on the existing features of NB currently.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] junichi11 commented on a diff in pull request #5695: PHP 8.1: Explicit octal integer literal notation #5026

Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on code in PR #5695:
URL: https://github.com/apache/netbeans/pull/5695#discussion_r1145691485


##########
php/php.editor/tools/ASTPHP5Scanner.flex:
##########
@@ -943,6 +944,12 @@ NOWDOC_CHARS=({NEWLINE}*(([^a-zA-Z_\x7f-\xff\n\r][^\n\r]*)|({LABEL}[^a-zA-Z0-9_\
     pushState(ST_IN_SCRIPTING);
 }
 
+<ST_IN_SCRIPTING>{ONUM} {
+    // PHP 8.1: Explicit octal integer literal notation
+    // https://wiki.php.net/rfc/explicit_octal_notation
+    return createFullSymbol(ASTPHP5Symbols.T_LNUMBER);

Review Comment:
   e.g. 
   ```php
   $hex1 = 0x45fffabcde0000000;
   var_dump($hex1); // double(8.0704412748217E+19)
   
   $hex2 = 0x1f;
   var_dump($hex2); // int(31)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] junichi11 commented on pull request #5695: PHP 8.1: Explicit octal integer literal notation #5026

Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on PR #5695:
URL: https://github.com/apache/netbeans/pull/5695#issuecomment-1480373011

   @tmysik Could you please have a look at this? If there is no problem, let's merge it. Thank you!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] junichi11 commented on a diff in pull request #5695: PHP 8.1: Explicit octal integer literal notation #5026

Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on code in PR #5695:
URL: https://github.com/apache/netbeans/pull/5695#discussion_r1145709527


##########
php/php.editor/tools/ASTPHP5Scanner.flex:
##########
@@ -943,6 +944,12 @@ NOWDOC_CHARS=({NEWLINE}*(([^a-zA-Z_\x7f-\xff\n\r][^\n\r]*)|({LABEL}[^a-zA-Z0-9_\
     pushState(ST_IN_SCRIPTING);
 }
 
+<ST_IN_SCRIPTING>{ONUM} {
+    // PHP 8.1: Explicit octal integer literal notation
+    // https://wiki.php.net/rfc/explicit_octal_notation
+    return createFullSymbol(ASTPHP5Symbols.T_LNUMBER);

Review Comment:
   I'll fix it if we come across a problem :) 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] tmysik commented on a diff in pull request #5695: PHP 8.1: Explicit octal integer literal notation #5026

Posted by "tmysik (via GitHub)" <gi...@apache.org>.
tmysik commented on code in PR #5695:
URL: https://github.com/apache/netbeans/pull/5695#discussion_r1145994093


##########
php/php.editor/tools/ASTPHP5Scanner.flex:
##########
@@ -943,6 +944,12 @@ NOWDOC_CHARS=({NEWLINE}*(([^a-zA-Z_\x7f-\xff\n\r][^\n\r]*)|({LABEL}[^a-zA-Z0-9_\
     pushState(ST_IN_SCRIPTING);
 }
 
+<ST_IN_SCRIPTING>{ONUM} {
+    // PHP 8.1: Explicit octal integer literal notation
+    // https://wiki.php.net/rfc/explicit_octal_notation
+    return createFullSymbol(ASTPHP5Symbols.T_LNUMBER);

Review Comment:
   Sure, np.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists