forked from jasder/antlr
Merge branch 'master' of github.com:antlr/antlr4 into master
This commit is contained in:
commit
9366718c11
|
@ -249,15 +249,17 @@ YYYY/MM/DD, github id, Full name, email
|
|||
2020/02/21, StochasticTinkr, Daniel Pitts, github@coloraura.com
|
||||
2020/03/17, XsongyangX, Song Yang, songyang1218@gmail.com
|
||||
2020/04/07, deniskyashif, Denis Kyashif, denis.kyashif@gmail.com
|
||||
2020/04/10, agrabski, Adam Grabski, adam.gr@outlook.com
|
||||
2020/04/23, martinvw, Martin van Wingerden, martin@martinvw.nl
|
||||
2020/04/30, TristonianJones, Tristan Swadell, tswadell@google.com
|
||||
2020/05/06, iammosespaulr, Moses Paul R, iammosespaulr@gmail.com
|
||||
2020/05/10, gomerser, Erik Gomersbach, gomerser@gomersba.ch
|
||||
2020/06/04, sigmasoldi3r, Pablo Blanco, pablobc.1995@gmail.com
|
||||
2020/05/22, keywan-ghadami-oxid, Keywan Ghadami, keywan.ghadami@oxid-esales.com
|
||||
2020/05/25, graknol, Sindre van der Linden, graknol@gmail.com
|
||||
2020/05/31, d-markey, David Markey, dmarkey@free.fr
|
||||
2020/06/02, cohomology, Kilian Kilger, kkilger AT gmail.com
|
||||
2020/06/04, IohannRabeson, Iohann Rabeson, iotaka6@gmail.com
|
||||
2020/06/04, sigmasoldi3r, Pablo Blanco, pablobc.1995@gmail.com
|
||||
2020/07/01, sha-N, Shan M Mathews, admin@bluestarqatar.com
|
||||
2020/08/22, stevenjohnstone, Steven Johnstone, steven.james.johnstone@gmail.com
|
||||
2020/09/06, ArthurSonzogni, Sonzogni Arthur, arthursonzogni@gmail.com
|
||||
|
|
|
@ -58,7 +58,7 @@ Match that character or sequence of characters. E.g., ’while’ or ’=’.</t
|
|||
|
||||
<tr>
|
||||
<td>[char set]</td><td>
|
||||
<p>Match one of the characters specified in the character set. Interpret <tt>x-y</tt> as the set of characters between range <tt>x</tt> and <tt>y</tt>, inclusively. The following escaped characters are interpreted as single special characters: <tt>\n</tt>, <tt>\r</tt>, <tt>\b</tt>, <tt>\t</tt>, <tt>\f</tt>, <tt>\uXXXX</tt>, and <tt>\u{XXXXXX}</tt>. To get <tt>]</tt>, <tt>\</tt>, or <tt>-</tt> you must escape them with <tt>\</tt>.</p>
|
||||
<p>Match one of the characters specified in the character set. Interpret <tt>x-y</tt> as the set of characters between range <tt>x</tt> and <tt>y</tt>, inclusively. The following escaped characters are interpreted as single special characters: <tt>\n</tt>, <tt>\r</tt>, <tt>\b</tt>, <tt>\t</tt>, <tt>\f</tt>, <tt>\uXXXX</tt>, and <tt>\u{XXXXXX}</tt>. To get <tt>]</tt> or <tt>\</tt> you must escape them with <tt>\</tt>. To get <tt>-</tt> you must escape it with <tt>\</tt> too, except for the case when <tt>-</tt> is the first or last character in the set.</p>
|
||||
|
||||
<p>You can also include all characters matching Unicode properties (general category, boolean, or enumerated including scripts and blocks) with <tt>\p{PropertyName}</tt> or <tt>\p{EnumProperty=Value}</tt>. (You can invert the test with <tt>\P{PropertyName}</tt> or <tt>\P{EnumProperty=Value}</tt>).</p>
|
||||
|
||||
|
@ -90,6 +90,8 @@ UNICODE_ID : [\p{Alpha}\p{General_Category=Other_Letter}] [\p{Alnum}\p{General_C
|
|||
EMOJI : [\u{1F4A9}\u{1F926}] ; // note Unicode code points > U+FFFF
|
||||
|
||||
DASHBRACK : [\-\]]+ ; // match - or ] one or more times
|
||||
|
||||
DASH : [---] ; // match a single -, i.e., "any character" between - and - (note first and last - not escaped)
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -244,7 +246,8 @@ The mode commands alter the mode stack and hence the mode of the lexer. The 'mor
|
|||
```
|
||||
// Default "mode": Everything OUTSIDE of a tag
|
||||
COMMENT : '<!--' .*? '-->' ;
|
||||
CDATA : '<![CDATA[' .*? ']]>' ;OPEN : '<' -> pushMode(INSIDE) ;
|
||||
CDATA : '<![CDATA[' .*? ']]>' ;
|
||||
OPEN : '<' -> pushMode(INSIDE) ;
|
||||
...
|
||||
XMLDeclOpen : '<?xml' S -> pushMode(INSIDE) ;
|
||||
SPECIAL_OPEN: '<?' Name -> more, pushMode(PROC_INSTR) ;
|
||||
|
|
|
@ -15,7 +15,7 @@ generated by ANTLR4. The runtime provides a common set of tools for using your p
|
|||
Install the runtime with Composer:
|
||||
|
||||
```bash
|
||||
composer install antlr/antlr4
|
||||
composer require antlr4-php-runtime
|
||||
```
|
||||
|
||||
#### 3. Generate your parser
|
||||
|
|
Loading…
Reference in New Issue