|
|
whitespace | comment | token |
Carriage_return_character_(U+000D)
| |
|
|
Line_feed_character_(U+000A)
|
|
|
Carriage_return_character_(U+000D) Line_feed_character_(U+000A)
|
|
|
Line_separator_character_(U+2028)
|
|
|
Paragraph_separator_character_(U+2029)
|
Any_character_with_Unicode class_Zs
| |
|
|
Horizontal_tab_character_(U+0009)
|
|
|
Vertical_tab_character_(U+000B)
|
|
|
Form_feed_character_(U+000C)
|
|
|
Any_Unicode_character_except_a new-line-character
|
Carriage_return_character_(U+000D)
| |
|
|
Line_feed_character_(U+000A)
|
|
|
Line_separator_character_(U+2028)
|
|
|
Paragraph_separator_character_(U+2029)
|
|
|
Any_Unicode_character_except_star_(*)
|
Any_Unicode_character_except_slash_(/)
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
The_underscore_character_(_)
|
|
| |
|
| |
|
| |
|
|
A_Unicode_character_of_classes_Lu,_Ll,_Lt,_Lm,_Lo,_or_Nl
| |
|
|
A_Unicode_character_of_classes_Mn_or_Mc
| |
|
|
A_Unicode_character_of_the_class_Nd
| |
|
|
A_Unicode_character_of_theclass_Pc
| |
|
|
A_Unicode_character_of_the_class_Cf
| |
|
|
abstract | as | base | bool | break | byte | case | catch | char | checked | class | const | continue | decimal | default | delegate | do | double | else | enum | event | explicit | extern | false | finally | fixed | float | for | foreach | goto | if | implicit | in | int | interface | internal | is | lock | long | namespace | new | null | object | operator | out | override | params | private | protected | public | readonly | ref | return | sbyte | sealed | short | sizeof | stackalloc | static | string | struct | switch | this | throw | true | try | typeof | uint | ulong | unchecked | unsafe | ushort | using | virtual | void | while |
|
| |
|
| |
|
| |
|
| |
|
|
true | false |
|
|
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
U | u | L | l | UL | Ul | uL | ul | LU | Lu | lU | lu |
|
|
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | a | b | c | d | e | f |
|
| |
|
|
|
|
+ | - |
F | f | D | d | M | m |
|
| |
|
| |
|
|
Any_character_except_'(U+0027),_\(U+005C),_and new-line-character
|
\' | \" | \\ | \0 | \a | \b | \f | \n | \r | \t | \v |
|
|
|
| |
|
| |
|
|
Any_character_except_"(U+0022),_\(U+005C),_and new-line-character
|
|
|
Any_character_except "
|
"" |
null |
{ | } | [ | ] | ( | ) | . | , | : | ; | + | - | * | / | % | & | | | ^ | ! | ~ | = | < | > | ? | ++ | -- | && | || | << | >> | == | != | <= | >= | += | -= | *= | /= | %= | &= | |= | ^= | <<= | >>= | -> |
pp-declaration | pp-conditional | pp-line | pp-diagnostic | pp-region |
|
|
|
|
|
| |
|
|
|
|
true
| |
|
|
false
|
|
| |
|
|
|
|
( whitespace )? # ( whitespace )? elif whitespace pp-expression pp-new-line ( conditional-section )?
|
|
|
|
|
|
| |
|
|
default
|
Any_character_except_"(U+0022),_and new-line
|
|
|
|
|
value-type | reference-type | pointer-type a |
struct-type | enum-type |
type-name | simple-type |
numeric-type | bool |
|
| |
|
|
decimal
|
sbyte | byte | short | ushort | int | uint | long | ulong | char |
float | double |
type-name |
class-type | interface-type | array-type | delegate-type |
type-name | object | string |
type-name |
type-name |
expression |
|
|
|
| |
|
|
|
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
identifier |
|
|
bool | byte | char | decimal | double | float | int | long | object | sbyte | short | string | uint | ulong | ushort |
|
|
this |
|
|
|
|
|
|
typeof ( void )
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
|
| |
|
|
|
| |
|
|
|
| |
|
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
= | += | -= | *= | /= | %= | &= | |= | ^= | <<= | >>= |
|
|
expression |
expression |
|
| |
|
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
default :
|
|
| |
|
| |
|
|
|
|
|
|
|
| |
|
| |
|
| |
|
|
break ;
|
continue ;
|
|
| |
|
|
goto default ;
|
|
| |
|
|
|
|
catch block
|
finally block
|
checked block
|
unchecked block
|
|
|
|
|
|
|
|
|
|
| |
|
| |
|
| |
|
|
new | public | protected | internal | private | abstract | sealed |
|
| |
|
|
|
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
new | public | protected | internal | private |
new | public | protected | internal | private | static | readonly | volatile |
|
|
|
|
|
| |
|
|
new | public | protected | internal | private | static | virtual | sealed | override | abstract | extern |
type | void |
|
|
block | ; |
|
| |
|
|
|
|
ref | out |
new | public | protected | internal | private | static | virtual | sealed | override | abstract | extern |
|
|
block | ; |
|
|
new | public | protected | internal | private | static | virtual | sealed | override | abstract | extern |
|
|
new | public | protected | internal | private | virtual | sealed | override | abstract | extern |
|
|
public | static | extern |
|
| |
|
|
+ | - | ! | ~ | ++ | -- | true | false |
+ | - | * | / | % | & | | | ^ | << | >> | == | != | > | < | >= | <= |
|
|
block | ; |
public | protected | internal | private | extern |
|
|
block | ; |
( extern )? static
| |
|
|
static ( extern )?
|
block | ; |
block | ; |
( attribute-section )* ( struct-modifier )* struct identifier ( struct-interfaces )? struct-body ( ; )?
|
new | public | protected | internal | private |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
type |
,
| |
|
|
|
|
|
|
( attribute-section )* ( interface-modifier )* interface identifier ( interface-base )? interface-body ( ; )?
|
new | public | protected | internal | private |
|
| |
|
| |
|
|
|
| |
|
| |
|
|
|
|
new | public | protected | internal | private |
|
|
|
|
( attribute-section )* ( delegate-modifier )* delegate return-type identifier ( ( formal-parameter-list )? ) ;
|
new | public | protected | internal | private |
|
|
assembly |
|
|
field | event | method | module | param | property | return | type |
|
|
type-name |
|
| |
|
|
|
|
|
|
expression |
unsafe block
|
|
|
void *
|
type |
|
|
|
|
Created from ECMA-334 Standard. Text form of the grammar was brushed a little (this was partially manual work and a probable source of errors if there are any :o( ), parsed to generate the grammar description in an XML format, transformed to EBNF using XSLT, then transformed to DHTML using another XSLT. Enjoy.
Copyright 2002, 2003 Peter Hercek, All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You can receive a copy of the GNU General Public License here.
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~