Php parser code

Source: Internet
Author: User
A small tool used to check the published file during the previous release, and matched the call of class, method, and function with regular expressions, at that time, the selected method was to use regular expressions in combination with the daily full and incremental update of the custom symbol table. During use, there are often false positives, so I thought of the token_get_all () function, which will

A small tool used to check the published file during the previous release, and matched the call of class, method, and function with regular expressions, at that time, the selected method was to use regular expressions in combination with the daily full and incremental update of the custom symbol table. During use, there are often false positives, so I thought of the token_get_all () function, which will

A small tool used to check the published file during the previous release, and matched the call of class, method, and function with regular expressions, at that time, the selected method was to use regular expressions in combination with the daily full and incremental update of the custom symbol table. During use, there are often false positives, so I thought of the token_get_all () function, which will parse the syntax of your input variables and generate tokens, one value is the constant value of the token in the php parser. Check the php doc and find that only the list is listed, but the corresponding value is not matched .. for code syntax, refer to the corresponding value T_ABSTRACT abstract class (available from PHP 5.0.0) 342 T_AND_EQUAL & = value assignment operator 272 T_ARRAY array (), array syntax 359 T_ARRAY_CAST (array) type conversion 293 T_AS foreach 325 T_BAD_CHARACTER except \ t (0 × 09), \ n (0x0a), and \ r (0x0d) before ASCII 32) any character other than 312 T_BOOLEAN_AND & logical operator 278 T_BOOLEAN_OR | logical operator 277 T_BOOL_CAST (bool) or (boolean) [...]

Original article address: php parser code, thanks to the original author for sharing.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.