Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
C-sharp language specification.2004.pdf
Скачиваний:
12
Добавлен:
23.08.2013
Размер:
2.55 Mб
Скачать

 

C# LANGUAGE SPECIFICATION

1

single-verbatim-string-literal-character::

2

any character except "

3 quote-escape-sequence::

4""

5null-literal::

6null

7A.1.9 Operators and punctuators

8operator-or-punctuator: one of

9

{

}

[

]

(

)

.

,

:

;

10

+

-

*

/

%

&

|

^

!

~

11

=

<

>

?

++

--

&&

||

==

->

12

!=

<=

>=

+=

-=

*=

/=

%=

&=

|=

13

^=

<<

<<=

::

 

 

 

 

 

 

14 right-shift:

15> >

16right-shift-assignment:

17> >=

18A.1.10 Pre-processing directives

19pp-directive::

20

pp-declaration

 

 

21

pp-conditional

 

 

22

pp-line

 

 

23

pp-diagnostic

 

 

24

pp-region

 

 

25

pp-pragma

 

 

26

pp-new-line::

 

 

27

whitespaceopt single-line-commentopt new-line

 

28

conditional-symbol::

 

 

29

Any identifier-or-keyword except true or false

 

30

pp-expression::

 

 

31

whitespaceopt pp-or-expression whitespaceopt

 

32

pp-or-expression::

 

 

33

pp-and-expression

 

 

34

pp-or-expression whitespaceopt ||

whitespaceopt

pp-and-expression

35

pp-and-expression::

 

 

36

pp-equality-expression

 

 

37

pp-and-expression whitespaceopt &&

whitespaceopt

pp-equality-expression

38

pp-equality-expression::

 

 

39

pp-unary-expression

 

 

40

pp-equality-expression whitespaceopt

== whitespaceopt pp-unary-expression

41

pp-equality-expression whitespaceopt

!= whitespaceopt pp-unary-expression

42

pp-unary-expression::

 

 

43

pp-primary-expression

 

 

44

! whitespaceopt pp-unary-expression

 

438

Annex A Grammar

1

pp-primary-expression::

 

 

2

true

 

 

3

false

 

 

4

conditional-symbol

 

 

5

( whitespaceopt pp-expression

whitespaceopt )

 

6

pp-declaration::

 

 

7

whitespaceopt # whitespaceopt define whitespace conditional-symbol pp-new-line

8

whitespaceopt # whitespaceopt

undef whitespace

conditional-symbol pp-new-line

9

pp-conditional::

 

 

10

pp-if-section pp-elif-sectionsopt

pp-else-sectionopt pp-endif

11

pp-if-section::

 

 

12

whitespaceopt # whitespaceopt if whitespace pp-expression pp-new-line conditional-

13

sectionopt

 

 

14

pp-elif-sections::

 

 

15

pp-elif-section

 

 

16

pp-elif-sections pp-elif-section

 

 

17

pp-elif-section::

 

 

18

whitespaceopt # whitespaceopt elif whitespace pp-expression pp-new-line conditional-

19

sectionopt

 

 

20

pp-else-section::

 

 

21

whitespaceopt # whitespaceopt

else pp-new-line

conditional-sectionopt

22

pp-endif::

 

 

23

whitespaceopt # whitespaceopt endif pp-new-line

 

24

conditional-section::

 

 

25

input-section

 

 

26

skipped-section

 

 

27

skipped-section::

 

 

28

skipped-section-part

 

 

29

skipped-section skipped-section-part

 

30

skipped-section-part::

 

 

31

skipped-charactersopt new-line

 

 

32

pp-directive

 

 

33

skipped-characters::

 

 

34

whitespaceopt not-number-sign input-charactersopt

 

35

not-number-sign::

 

 

36

Any input-character except #

 

 

37

pp-line::

 

 

38

whitespaceopt # whitespaceopt

line whitespaceopt

line-indicator pp-new-line

39

line-indicator::

 

 

40

decimal-digits whitespace file-name

 

41

decimal-digits

 

 

42

identifier-or-keyword

 

 

43 file-name::

44" file-name-characters "

45file-name-characters::

46

file-name-character

47

file-name-characters file-name-character

439

Соседние файлы в предмете Электротехника