Visual Basic .NET Summary Summary

xiaoxiao2021-03-06  71

From: ms-help: //ms.vscc.2003/ms.msdnqtr.2003feb.2052/vbls7/html/vblrfvbspec12.htm This section summarizes the syntax of the Visual Basic language. For information on how to read syntax, see the syntax representation.

Lexical

START :: = [LogicalLine ] (initial value :: = [logical row ])

LogicalLine :: = [LogicalLineElement ] [Comment] LINETERMINATOR (logical line :: = [logical line elements ] [Note] line end of the line)

LogicalLineElement :: = Whitespace | token (logical elements :: = blank | tag)

Token :: = Identifier | Keyword | Literal | Separator | Operator | Keywords | Text | Deliver | Operators

Character and line

Character :: = (Character :: = )

Row end

LINETERMINATOR: :: = (Row end value :: =) ( () | ( ) | () | ()

Continue

LineContinization :: = Whitespace _ [Whitespace ] LINETERMINATOR (LED continues :: = blank _ [blank ] line end compact

blank

Whitespace :: = | LineContinuation (Blank :: = | Line Continue)

Comment

Comment :: = CommentMarker [Character ] (Note: = Note Tag [Character ])

CommentMarker :: = '| REM (Note Tag :: =' | REM) identifier

Identifier :: = (Identifier :: =) NonescapeDidentifier [TypeCharacter] (non-escape identifier [Type Character]) | ESCAPEDIDENTIFIER (escape identifier)

Nonescapedidentifier :: = (non-escape identifier :: = )

EscapedIdentifier :: = [IdentifierName] (escape identifier :: = [identifier name])

IdentifierName :: = IdentifierStart [IdentifierCharacter ] (Identifier Name :: = Identifier Initial value [identifier character ])

IdentifierStart :: = (identifier initial value :: =) AlphaCharacter | UnderscoreCharacter IdentifierCharacter (Underline Character Identifier)

IdentifierCharacter :: = (Identifier Character :: =) UnderscoreCharacter | AlphaCharacter | NumericCharacter | CombiningCharacter | FormattingCharacter (Format)

AlphaCharacter :: = (Alphabetic characters :: = )

NumericCharacter :: = (Digital Character :: = )

CombiningCharacter :: = (Combination Character :: = )

FormattingCharacter :: = (formatted characters :: = )

UnderscoreCharacter :: = (Underline Character :: = ) IdentifierorKeyword :: = Identifier | Keyword (Identifier or Keyword :: = Identifier | Keywords )

Type character

TypeCharacter :: = (type character :: =) IntegerTypeCharacter (Integer type character) | LongTypeCharacter (Long type character) | DecimalTypeCharacter (Decimal type character) | SingleTypeCharacter (Single type character) | DoubleTypeCharacter (Double type character) | StringTypeCharacter (String type character)

IntegertypeCharacter :: =% (Integer Type Character :: =%)

LongTypeCharacter :: = & (long type character :: = &)

DecimalTypeCharacter :: = @ (Decimal Type Character :: = @)

SingletypeCharacter :: =! (SINGLE Type Character :: =!)

DoubleTypeCharacter :: = # (Double Type Character :: = #)

StringTypeCharacter :: = $ (String Type Character :: = $)

Keyword

KeyWord :: = (Keywords :: = )

text

Literal :: = Booleanliteral | Numericliteral | Stringliteral | Characterliteral | DATELITERAL | NOTING (Text :: = Boolean | Numerical | String | Character | Date | Nothing)

Numericliteral :: = IntegerLiteral | FloatingPointLitral (Numeric :: = Integer | Floating point)

Boolean value

Booleanliteral :: = TRUE | FALSE

Integer

IntegerLiteral :: = INTEGRALLITELALRALUE [IntegralTypeCharacter] (integer :: = integer value [integer character])

IntegrallideralValue :: = Intliteral | HEXLITERAL | OctallITERAL (integer value :: = decimal integer | hexadecimal integer | octal integer)

IntegralTypeCharacter :: = (int character :: =) ShortCharacter (short integer character) | IntegerCharacter (integer character) | LongCharacter (long integer character) | IntegerTypeCharacter (Integer type character) | LongTypeCharacter (Long type character) ShortCharacter :: = S (Short integer character :: = s)

Integercharacter :: = i (integer character :: = i)

Longcharacter :: = L (Long integer character :: = L)

Intliteral :: = DIGIT (Decoction integer :: = digital )

HEXLITERAL :: = & h HEXDIGIT (Hexadecimal integer :: = & h heel digital )

OctallITeral :: = & O Octaldigit (Okimon Elear :: = & O Octic Number )

DIGIT :: = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

HEXDIGIT :: = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | f

Octaldigit (OD) :: = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7

Floating point number

FLOATINGPOINTLITERAL :: = (floating point :: =) floatingpointliteralvalue [floatingpointTypeCharacter] | INTLITERAL FLOATINGPOINTTYPECHARACTER (integer floating point type character)

FloatingPointTypeCharacter :: = (float type characters :: =) SingleCharacter (single-precision character) | DoubleCharacter (double character) | DecimalCharacter (decimal character) | SingleTypeCharacter (Single type character) | DoubleTypeCharacter (Double type character) | DecimalTypeCharacter (Decimal Type character)

SINGLECHARACTER :: = f (single precision character :: = f)

DoubleCharacter :: = R (Double Accuracy Character :: = R)

DecimalCharacter :: = D (Decimal Character :: = D)

FLOATINGPOINTLITERALVALUE :: = (floating point value :: =) INTLITERAL. INTLITERAL [EXPONENT] (integer. Integer [Index]) |. Intliteral [Exponent] (. Integer [Index]) | INTLITERAL EXPONENT (Integer Index) Exponent :: = E [Sign] Intliteral (Index :: = E [Symbol] integer)

Sign (symbol) :: = |

String

Stringliteral :: = "[StringCharacter ]" (String :: = "[String Character ]")

StringCharacter :: = " "" "" "" "" "" "" "

character

Characterliteral :: = "StringCharacter" C (Character :: = "string character" c)

date

DATELITERAL :: = # [Whitespace ] [DateSpace ] [Whitespace ] [TimeValue] [Whitespace ] # (Date :: = # [Blank ] [Date] [Blank ] [Time Value] [Blank ] #)

DateValue :: = MONTHVALUE DATESEPARATOR DayValue Dateseparator YearValue (Date):

DateSeparator :: = / |

TimeValue :: = Hourvalue [: secondValue] [: SecondValue] [Whitespace ] [AMPM] (Time value: = Hour value [: minute value] [: second value] [blank ] [ampm])

MonthValue :: = Intliteral (Month value :: = integer)

DayValue :: = Intliteral (Daily :: = integer)

YearValue :: = Intliteral (Year value :: = integer)

Hourvalue :: = Intliteral (hour value :: = integer)

Minutevalue :: = Intliteral (Minute :: = integer)

SecondValue :: = Intliteral (second value :: = integer)

Ampm :: = Am | PM

Nothing

Nothing :: = Nothing

Separator

Separator :: = (|) |! | # |, |. |:

Operator character

Operator :: = & | * | | - | / | / | ^ | <| = |> Preprocessing Directive

Conditional compile instruction

Source :: = [ConditionyleElement ] (Source :: = [Condition Elements ])

ConditionyleElement :: = Conditionalifgroup | ConditionalConstantDeclaration | Logicalline (conditional elements :: = Condition IF Group | Condition constant declaration | logic)

Conditional constant

ConditionalConstantDeclaration :: = # const IdentifierORKEYWORD = ConstantExpression LINETERMINATOR (Condition constant declaration: = # const identifier or keyword = constant expression row end compact)

Conditional compile statement

Conditionalelseifgroup :: = (Conditions Elseif Group :: =) # Elseif constantexpression [THEN] LINETERMINATOR (# Elseif constant expression [THEN] row end compliance) [ConditionyleElement ] ([conditional element ])

External source instruction

Source :: = [EXTERNALSOUREELEMENT ] (Source :: = [External Source Element ])

ExternalSourceElement :: = ExternalSourceGroup | Logicalline (External Source Element :: = External Source Group | Logistic Rates)

ExternalSourceGroup :: = (External Source Group :: =) # EXTERNALSource (Stringlitral, Intliteral) LINETERMINATOR (# EXTERNALSOURCE (string, integer) row end character) [LogicalLine ] ([logical row ]) # End External Source Lineterminator (# end EXTERNALSOURCE row end compliance)

Regional instruction

START :: = [RegionElement ] (initial value :: = [area element ])

RegionElement :: = RegionGroup | Logicalline (Area Element :: = Area Group | Logistic)

RegionGroup :: = (Region Group :: =) # Region [Nodebug] Stringliteral LINETERMINATOR (# region [nodebug] Character Serial Targes [LogicalLine ] # End Region Lineterminator (# End Region end symbol)

ConditionaleLsegroup :: = (Conditions ELSE Group :: =) # Else Lineterminator (# Else Row end compliance) [ConditionyleElement ] ([Conditional Element ]) General Concept

Accessibility

AccessModifier :: = public | protected | friend | private :: = public | protected | friend | private

Namespace and type name

QualifiedIdentifier :: = (Limited Identifier :: =) Identifier | QualifiedIdentifier .IdentifierORKEYWORD (Limited identifier. Identifier or keyword)

Property block

Attributes :: = (Properties: = )

AttributeList :: = (Properties List :: =) Attribute | AttributeList, Attribute (List, Properties)

Attribute :: = [AttributeModifier:] Typename [([Attributearguments])] (Property :: = [Properties Modes) Type Name [([Properties parameters])])

AttributeModifier :: = askMBLY | Module (Properties Modes :: = askMBLY | MODULE)

Attribute parameters

AttributeArguments :: = (attribute parameter :: =) AttributePositionalArgumentList (Location attribute parameter list) | AttributePositionalArgumentList, VariablePropertyInitializerList (positioning parameter list attribute, the attribute variable initializer list) | VariablePropertyInitializerList (variable initializer attribute list)

AttributePositionAtaLuntList :: = (Property Location Parameter List :: =) ConstantExpression (constant expression) | AttributePositionAlarGumentList, ConstantExpression (attribute location parameter list, constant expression)

VariablePropertyInitializerList :: = (variable initializer attribute list :: =) VariablePropertyInitializer (variable attributes initializers) VariablePropertyInitializerList, VariablePropertyInitializer (an initial value setting attribute item list, the attribute variable initializer)

VariablePropertyInitializer :: = Identifier: = ConstantExpression (Variable Property initial value setting item :: = Identifier: = constant expression) Source file and namespace

Source :: = (Source :: =) [OptionDirective ] [IMPORTSDIRECTIVE ] ([Imports Directive ]) [Attributes] ([Properties]) [NamespaceBody] ([Name Space Body])

Compile option

OptionDirective :: = OptionExPlicitDirective | OptionCOTIONStrictDirective | OptionComparedirective (Option Directive :: = Option Explicit Directive | Option Strict instructions | Option Compare Directive)

OPTION EXPLICIT statement

OptionExPlicitDirective :: = Option Explicit [Onoff] LINETERMINATOR (Option Explicit Directive :: = Option Explicit [Switch] Row end compliance

Onoff (Switch) :: = ON | OFF

Option STRICT statement

OptionstrictDirective :: = Option strict [onoff] LINETERMINATOR (Option Strict instruction :: = Option Strict "

OPTION COMPARE statement

OptionCompaDirective :: = Option Compare CompareOption Lineterminator (Option Compare Directive :: = Option Compare Comparison Selection Row end character)

CompareOption :: = Binary | Text (Compare options :: = binary | text)

IMPORTS statement

ImportsDirective :: = Imports ImportsClauses LINETERMINATOR (Imports Directive :: = Imports IMPORTS Sentence News End Chart)

Importsclauses :: = (Imports clause :: =) Importsclause | importsclauses, importsclause (imports clause, IMPORTS clause)

Importsclause :: = importsaliasclause | regularimportsclause (imports clause :: = imports alias clause | rule imports clause)

Import alias

ImportsaliascLause :: = Identifier = QualifiedIdIdentifier (imports alias clause :: = identifier = limited identifier)

General import

ImportsNamespaceClause :: = QualifiedIdIndifier (imports Name Space Sentence :: = Limited Identifier) ​​Namespace Declaration

NamespaceDeclaration :: = (namespace declaration :: =) Namespace QualifiedIdentifier LineTerminator (Namespace identifier defining line terminator) [NamespaceMemberDeclaration ] ([member of a namespace declaration ]) End Namespace LineTerminator (End Namespace end of line)

Namespace member

NamespaceMemberDeclaration :: = (Name Space Members :: =) NamespaceDeclaration | Typedeclaration (Type Declaration)

Typedeclaration :: = (Type Declaration :: =) Moduledeclaration | NonModuledeclaration (non-module declaration)

NonModuledeclaration :: = (Non-module declaration :: =) ENUMDECLATION | StructureDeclaration | InterfaceDeclaration | ClassDeclaration | DelegatedEclaration

Types of

TypeName :: = QualifiedIndIdentifier | Object | PrimitiTypename | ClassTypenAme | ArrayTypename

Primitive type

PrimitiveTypename :: = NUMERICTYPENAME | Boolean | DATE | Char (primitive type name :: = numeric name | Boolean | DATE | char)

NumericTypename :: = Integraspename | FLOATINGPOINTTYPENAME | DECIMAL (Numeric Name :: = Integer | Floating Point Type | Decimal)

Integratypename :: = byte | short | integer | long (Integer Name :: = BYTE | SHORT | Integer | Long)

FLOATINGPOINTTYPENAME :: = SINGLE | DOUBLE (floating point type name :: = Single | DOUBLE)

enumerate

EnumDeclaration :: = (Enumeration :: =) [Attributes] [Enummodifier ] ENUM Identifier ([Properties] [Enumeration Decoration ] ENUM Identifier) ​​[As Integraspename] LINETERMINATOR ([AS Integer Name] line end ) ENUMMEMEMBERDECLATION (enumeration member declaration ) End enum lineterminator (End Enum line end of ENUMMODIFIER :: = AccessModifier | Shadows (enumeration) "SHADOWS (enumerate :: = Access Demo)

Enumerate

EnummemberDeclaration :: = (Enumeration member declaration :: =) [attributes] Identifier [= constantExpression] LINETERMINATOR ([Properties] identifier [= constant expression] line end compact)

structure

StructDeclaration :: = (struct declaration :: =) [Attributes] [StructModifier ] Structure Identifier LineTerminator ([Properties] [Structure Modifier ] Structure Identifier end of line) [TypeImplementsClause ] ([Implements clause type]) [ StructmemberDeclaration ] ([Structural member declaration ]) End structure Lineterminator (End Structure Row end compliance)

Structuremodifier :: = AccessModifier | Shadows (Structural Model :: = Access Demo | Shadows)

Structural interface implementation

TypeImplementsClause :: = imports implements lineterminator (Type Implements :: = Implements Implementation Row)

Implements :: = (Implementation :: =) Typename (Type Name) | Implements, TypeName (implementation, type name)

Structural member

StructMemberDeclaration :: = (struct member declaration :: =) NonModuleDeclaration (non-module declaration) VariableMemberDeclaration (member variable declarations) | ConstantMemberDeclaration (constant member declaration) | EventMemberDeclaration (event member declarations) | MethodMemberDeclaration (method member declarations) | PropertyMemberDeclaration (attribute member Disclaimer) | SharedConstructOrDeclaration (shared constructor declaration) class

ClassTypename :: = String (Class Type :: = String)

ClassDeclaration :: = (Class Declaration :: =) [Attributes] [ClassModifier ] Class Identifier LINETERMINATOR ([Properties] [Class Model ] Class Identifier Targeting End Charge) [ClassBase] [TypeImplementsClause ] [Type Implements] [ClassmemberDeclaration ] ([class member declaration ]) End Class Lineterminator (End Class line end of the end

Class modifier

ClassModifier :: = AccessModifier | Shadows | Mustinherit | Notinheritable (Class Model :: = Access Demo | Shadows | Mustinherit | Notinheritable)

Basic specification

ClassBase :: = Inherits TypeName Lineterminator (Class :: = Inherits Type Bar "

Class member

ClassMemberDeclaration :: = (class member declaration :: =) NonModuleDeclaration (non-module declaration) | EventMemberDeclaration (event member declarations) | VariableMemberDeclaration (member variable declarations) | ConstantMemberDeclaration (constant member declaration) | MethodMemberDeclaration (method member declarations) | PropertyMemberDeclaration (Properties Member statement) | ConstructorMberDeclaration (constructor member declaration)

Standard module

Moduledeclaration :: = (Module Declaration :: =) [Attributes] [AccessModifier ] Module Identifier LINETERMINATOR ([Properties] [Access Demo ] Module Identifier Overview) [ModuleMemberDeclaration ] ([Module member declaration ]) End module LINETERMINATOR (End Module line end of end compliance) standard module member

ModuleMemberDeclaration :: = (module member declaration :: =) NonModuleDeclaration (non-module declaration) | VariableMemberDeclaration (member variable declarations) | ConstantMemberDeclaration (constant member declaration) | EventMemberDeclaration (event member declarations) | MethodMemberDeclaration (method member declarations) | PropertyMemberDeclaration (Properties Member statement) | SharedConstructOrDeclaration (shared constructor declaration)

interface

InterfaceDeclaration :: = (interface declarations :: =) [Attributes] [InterfaceModifier ] Interface Identifier LineTerminator ([Properties] [Interface modifier ] Interface Identifier end of line) [InterfaceBases ] ([Interface yl ]) [InterfaceMemberDeclaration ] ([Interface member declaration ]) End interface lineterminator (End Interface line end of the end

InterfaceModifier :: = AccessModifier | Shadows (Enumeration Decoration :: = Access Demo | SHADOWS)

Interface inheritance

InterfaceBase :: = Inherits InterfaceBases LINETERMINATOR (Interface Base :: = Inherits Interface Base)

Interfacebases :: = (Interface Base :: =) Typename (Type) InterfaceBases, Typename (interface base, type name)

Member of the interface

InterfaceMemberDeclaration :: = (Interface member declaration :: =) NonModuledeclaration | EventMemberDeclaration | MethodMemberDeclaration | PropertymemberDeclaration (property member declaration)

Array

ArrayTypename :: = Typename ArrayTyPemodifier (Array Type :: = Type Number Type Modulation) ArrayTypeModifier :: = ([RankList]) (Array Type Modifier :: = ([List]))

Ranklist :: = (Rank List :: =), | RankList, (rank list,)

ArrayNameModifier :: = ArrayTypeModifier | ArrayInitializationModifier (array name modifier :: = array type modifier | array initialization modifier)

Delegate

DelegateTypedeclaration :: = (Entrust Type Declaration :: =) [DelegateModifier ] Delegate MethodDeclaration

DelegateModifier :: = AccessModifier | Shadows (Prustic :: = Access Demo | SHADOWS)

Type member

method

MethodmemberDeclaration :: = methodDeclaration | ExternalMethodDeclaration (method member declaration :: = method declaration | external method declaration)

General method declaration

MethodDeclaration :: = SubDeclaration | FunctionDeclaration (method declaration :: = SUB declaration | function declaration)

SubDeclaration :: = (Sub Declaration :: =) [Attributes] [ProcedureModifier ] Sub Identifier [([FormalParameterList])] ([Properties] [Process Modifier ] SUB Identifier [([Distake])]) [ HandlesorImplements] LINETERMINATOR ([Handle or Implementation] Row end compact) [block]) [End Sub Lineterminator] ([End Sub Row end character])

FunctionDeclaration :: = (function declaration :: =) [Attributes] [ProcedureModifier ] Function Identifier ([Properties] [Process Model ] Function Identifier) ​​[([FormalParameterList])] [AS [Attributes] Typename] [Duan Meter]) [AS [Properties] Type Name]] LINETERMINATOR ([Handle or Implementation] Row Fair) [Block] [End Function LINETERMINATOR] ([End Function line end ])

ProcedureModifier :: = (process modifier :: =) AccessModifier (access modifier) ​​| Shadows | Shared | Overridable | NotOverridable | MustOverride | Overrides | OverloadsHandlesOrImplements :: = HandlesClause | MethodImplementsClause (handle or implementation :: = Handles clause | method IMPLEMENTS clause)

External method declaration

ExternalMethodDeclaration :: = ExternalSubDeclaration | ExternalFunctionDeclaration (External Method Declaration :: = External SUB Declaration | External Function Declaration)

ExternalSubDeclaration :: = (Sub external statement :: =) [Attributes] [ExternalMethodModifier ] Declare [CharsetModifier] Sub Identifier ([Properties] [Method external modifier ] Declare [character set modifier] Sub Identifier) ​​LibraryClause [AliasClause] [([FormalParameterList])] LINETERMINATOR (lib clause [alias clause] [([Distake])] row end compact)

ExternalFunctionDeclaration :: = (external function declarations :: =) [Attributes] [ExternalMethodModifier ] Declare [CharsetModifier] Function ([Properties] [Method external modifier ] Declare [character set modifier] Function) Identifier LibraryClause [AliasClause] [( [FormalParameterList])] (Identifier lib clause [alias clause] [([Distreens])]) [AS [Attributes] Typename] LINETERMINATOR ([AS [Properties] Type Name] line end compact)

ExternalMethodModifier :: = AccessModifier | Shadows | Overloads (External Method Model :: = Access Demo | Shadows | OVERLOADS)

CharseTModifier :: = ANSI | Unicode | Auto (Character Set Model :: = ANSI | Unicode | Auto)

LibraryClause :: = LIB STRINGLITERAL (lib clause :: = LIB string)

Aliasclause :: = Alias ​​Stringliteral (Alias ​​clause :: = alias string)

Method parameters

FormalParameterList :: = (Distin :: =) FormalParameter | FormalParameterList, FormalParameter (Distance) FormalParameter :: = (Participation :: =) [Attributes] ParameterModifier Identifier [As Typename] [Property] Parameter Modifier Identifier [AS Type]) [= constantExpression] ([= constant expression])

ParameterModifier :: = byref | Byval | Optional | Paramarray (Parameter Modifier :: = BYVAL | BYREF | OPTIONAL | Paramarray)

Interface method implementation

ImplementscLause :: = [Implements ImplementsList] (Implements Association :: = [Implements Implements List])

ImplementsList :: = (Implements List :: =) InterfaceMemberspecifier | ImplementsList, InterfaceMembspecifier (IMPLEMENTS list, interface member specifier)

Interfacememberspecifier :: = TypeName. Identifier (Interface Member Indicator :: = Type Name. Identifier)

Event processing

Handlesclause :: = [Handles EventHandLSLIST] (Handles clause :: = [Handles event handles list])

EventHandleslist :: = (Event Handles List :: =) EventMemberspecifier | EventHandLSLIST, EventMemberspecifier (Event Handles list, event member specifier)

EventMemberspecifier :: = (Event member specification :: =) Identifier. [Identifier.] Identifier (identifier. [Identifier.] Identifier) ​​mybase. [Identifier.] Identifier (MyBase. [Identifier.] Identifier)

Constructor

ConstructormemberDeclaration :: = instanceconstructordordIclaration | SharedConstructOrDeclaration (constructor) :: = instance constructor declaration | shared constructor declaration)

Example constructor

InstanceConstructOrDeclaration :: = (instance constructor declaration :: =) [attributes] [InstanceConstructorModifier ] Sub New ([Properties] [instance constructor modifier ] Sub new) [([FormalParameterList])] LINETERMINATOR ([[ Table]] Row end compact) [Block]) End Sub LINETERMINATOR (End Sub Rows End Frequency) InstanceConstructorModifier :: = AccessModifier | Overloads (instance constructor modifier :: = Access modifier | Overloads)

Shared constructor

SharedConstructOrDeclaration :: = (shared constructor declaration :: =) [attributes] Shared Sub new [()] LINETERMINATOR ([Properties] Shared Sub New [()] row end compliance) [block]) End Sub Lineterminator (End Sub end character)

event

EventMemberDeclaration :: = (event member declaration :: =) [Attributes] [EventModifiers ] Event Identifier ParametersOrType ([property] [event modifier ] Event identifier parameter or type) [ImplementsClause] LineTerminator ([Implements clause] end of line symbol)

Parametersortype :: = (Parameter or Type :: =) [([FormalParameterList])] ([[([Distake])]) | AS Typename (AS Type)

constant

ConstantMemberDeclaration :: = (constant member statement :: =) [attributes] [constantModifier ] const Identifier [as typename] = ([Properties] [constant modifier ] constant identifier [AS type name] =) constantExpression LINETERMINATOR (constant expression Row end compliance)

ConstantModifier :: = AccessModifiers | Shadows (constant modifier :: = Access Demo | Shadows)

variable

VariableMemberDeclaration :: = (Variable Member Statement :: =) [Attributes] [VariableModifier ] [DIM] VariableDeclarators Lineterminator ([Properties] [Variable Modifier ] [DIM] Variable Declaring Variety end compliance

VariableModifier :: = AccessModifiers | Shadows | Shared | ReadOnly | WithEvents (variable access modifiers modifier :: = | Shadows | Shared | ReadOnly | WithEvents) VariableDeclarators :: = (variable declarations symbol :: =) VariableDeclarator (variable declarator) | VariableDeclarators, VariableDeclarator (variable declare, variable declaration)

VariableDeclarator :: = (Variable Reperse :: =) VariableIdentifiers [As TypeName] | VariableIdentifier [As [new] typeename [(argumentlist)]] [= variableinitializer] ([AS [new] type name [(parameter list)]] [= variable initial value setting item])

VariableIdentifiers :: = (Variable Identifier :: =) VariableIdentifier | VariableIdentifiers, VariableIdentifier (variable identifier, variable identifier)

VariableIdentifier :: = Identifier [ArrayNameModifier] (Variable Identifier :: = Identifier [array name modifier])

Variable initial value setting item

VariableInitializer :: = RegularInitializer | ArrayElementInitializer (Variable initial value setting item :: = rule initial value setting item | array element initial value setting item)

Rule initial value setting item

RegularInitializer :: = Expression (Rule initial value setting item :: = expression)

Array element initial value setting item

ArrayElementInitializer :: = {[variableInitializerlist]} (array element initial value setting item :: = {[Variable initial value setting list]})

VariableInitializerlist :: = (Variable initial value setting item list :: =) VariableInitializer (Variable initial value setting) | VariableInitializerList, VariableInitializer (Variable initial value setting list, variable initial value setting)

VariableInitializer :: = expression | ArrayElementInitializer (Variable initial value setting item :: = expression | array element initial value setting item)

Array size initial value setting item

ArrayInitializationModifier :: = (InitializationRankList) (Array Initialization Modifier :: = (Initialization List))

InitializationRanklist :: = (Initial Rank List :: =) Expression | InitializationRankList, Expression (Initial Rank List, Express) Property

PropertymemberDeclaration :: = (Attribute member declaration :: =) [Attributes] PropertyModifier Property Identifier [([FormalParameterList])] ([Property] Property Demo Property Identifier [([Distake])]) [As Typename] [MethodImplementSclause] LINETERMINATOR ([AS Type] [Method IMPLEMENTS Sub] Row Targes) PropertyAccessOrDeclaration (Attribute Accessor Declaration ) [End Property LINETERMINATOR]

PropertyModifier :: = ProcedureModifier | Default | Readonly | Writeonly (Properties Modifier :: = Process Model | Default | Readonly | Writeonly)

PropertyAccessOrDeclaration :: = PropertyGetDeclaration | PropertySetDeclaration (Property Accessor) :: = Property Get Declaration | Property Set Declaration)

Getter declaration

PropertygetDeclaration :: = (Attribute GET Declaration :: =) [Attributes] Get LINETERMINATOR ([Properties] GET Row end compliance) [block] ([block]) End (End Get)

Setter declaration

PropertySetDeclaration :: = (Attribute Set :: =) [Attributes] Set LINETERMINATOR ([Properties] SET RESIDENT) [Block] ([block]) End set (End Set)

Statement

Piece

Block :: = [LabledLine ] (block :: = [Mark Row ])

Labledline :: = [labelname:] [statements] LINETERMINATOR (Tag row :: = [Label Name:] [State] line end of the end of the line)

Labelname :: = Identifier | Intliteral (Tagname :: = Identifier | Integer)

Statements :: = (Statement :: =) [STATEMENT] | Statements [Statement] (Statement [Statement])

Local declaration statement

LocalDeclarationStatement :: = localmodifier localdeclarator statementterminator (Local declaration statement :: = Local modifier local declare statement end value) LocalModifier :: = DIM | const (Local modifier :: = DIM | const)

LocalDeclarator :: = (Local Declaring :: =) Localidentifiers [As TypeName]) Identifier [ArrayNameModifier] (Identifier [Number Model]) [AS [New] Typename [ ArgumentList])]] [= variableinitializer] ([AS [New] type name [([Parameter List])]] [= Variable initial value setting item])

Localidentifiers :: = (Local Identifier :: =) Identifier [ArrayNameModifier] | LocalIdentifiers, Identifier [ArrayNameModifier] (Local Identifier, Identifier [array modifier])

Localvariablename :: = Identifier (local variable name :: = identifier)

WITH statement

WITHSTATEMENT :: = (with statement :: =) with expression statementterminator (with expression statement end character) [block]) End with statementterminator (end with the end of the end "

SYNCLOCK statement

SyncLockState :: = (SYNCLOCK Statement :: =) SYNCLOCK Expression Statementterminator (SYNCLOCK Expression Statement End Frequency) [Block] ([Block]) End SyncLock Statementterminator (End SyncLock Statement end value)

Event statement

EventStatement :: = (Event Statement :: =) RaiseEventStatement | AddHandlerStatement | RemoveHandlerStatement (REMOVEHANDLER statement)

RaiseEvent statement

RaiseEventState :: = raiseevent EventMemberName (RaiseEvent Statement :: = RaiseEvent Event Member Name)

[([Argumentlist])] StatementTerminator ([([Parameter List])] statement end character)

AddHandler and REMOVEHANDLER statement addHandlerState :: = addHandler Handlerarguments StatementTerminator (AddHandler Statement :: = AddHandler Handler Parameter Statement end value)

RemoveHandlerstate :: = RemoveHandler HandlerarGuments Statementterminator (REMOVEHANDLER statement :: = RemoveHandler handler parameter statement end character)

Handlerarguments :: = EventExpression, ArgumentExpression (handler parameters :: = event expression, parameter expression)

Assigning statement

AssignmentStatement :: = (assignment statement :: =) SimpleAssignmentStatement (simple assignment) | DelegateAssignmentStatement (commissioned assignment) | CompoundAssignmentStatement (compound assignment) | MidAssignmentStatement (Mid assignment)

Simple assignment statement

RegularassignmentState :: = variableExpression = Expression Statementterminator (Rule assignment statement :: = variable expression = expression statement end character)

VariableExpression :: = expression :: = Expression)

Entrusted assignment statement

DelegateAssignmentState :: = (delegate assignment statement :: =) variableExpression = addressof invocationTargeTexpression Statementterminator (Variable Expression = addressof call target expression statement end character)

Composite assignment statement

CompoundassignmentStatement :: = variableExpression CompoundBinaryOperator = (Composite Assigning Statement :: = Variable Expression Composite Binary Operator =) Expression Statementterminator (Expression Statement end value)

CompoundBinaryOperator (composite binary operator) :: = ^ | * | / | / | |

MID assignment statement

MidassignmentStatement :: = MID [$] (VariableExpression, Expression [, Expression]) = Expression Statementterminator ((MID assignment statement :: = MID [$] (variable expression, expression [, expression]) = expression statement ends symbol)

Call statement

InvocationState :: = [CALL] InvocationExpression Statementterminator (Calling Statement :: = [CALL] Call Expression Statement Terminal) Condition Statement

ConditionalState :: = ifStatement | SelectStatement (Conditional State :: = IF Statement | SELECT Statement)

If ... then ... ELSE statement

IfStatement :: = blockifstatement | LineifthenStatement (if statement :: = Block IF statement | line ifthen statement)

BlockifStatement :: = (Block If State :: =) if BooleaneXpression [THEN] StatementTerminator (if Boolean Expressions [THEN] Statement End Valve) [Block] [ELSEIFSTATEMENT ] ([Elseif Statement ] [ElseStatement ] ([ELSE statement]) End if statementterminator (End IF statement ending)

ElseifState :: = (Elseif Statement :: =) Elseif BooleaneXpression [THEN] StatementTerminator (Elseif Boolean Expression [THEN] Statement End Valler) [Block] ([block])

ElseState :: = (ELSE State :: =) Else Statementterminator (ELSE Statement End Frequency) [Block] ([Block])

LineifthenState :: = if BooleaneXpression Then [Statements] :: = if Boolean Expression THEN [State])

[ELSE STATEMENTS] StatementTerminator ([ELSE statement] statement end value

BooleaneXpression :: = Expression (Boolean Expression :: = Expression)

SELECT ... CASE statement

SelectStatement :: = (Select statement :: =) Select [Case] ​​Expression StatementTerminator (Select [Case] ​​Expression statement terminator) [CaseStatement ] ([Case statement ]) [CaseElseStatement] ([CaseElse Statement]) End Select StatementTerminator (End SELECT statement end value)

CaseStatement :: = (CASE statement :: =) Case Caseclauses Statementterminator (Case Case clause statement end character) [block] ([block]) Caseclauses :: = (Case clause :: =) Caseclause (CASE clause) | Caseclauses, Caseclause (CASE clause, Case clause)

Caseclause :: = (Case clause :: =) [IS] ComparisonOperator Expression ([IS] comparison operator expression) | Expression [TO Expression] (Expression [TO Expression])

Comparisonoperator :: = = | <> | <|> | => | = <

CaseElseStatement :: = (CaseElse statement :: =) Case Else Statementterminator (Case Else Statement ending) [block] ([block])

loop statement

LoopStatement :: = (LOOP Statement :: =) Whilestatement (While Statement) | DOLOOPSTATEMENT | FORSTATEMENT | ForeachStatement (Foreach statement)

While ... End While and Do ... loop statement

Whilestatement :: = (While Statement :: =) While BooleaneXpression Statementterminator (While Boolean Expression Statement End Vallation) [Block] ([Block]) End While StatementTerminator (End While Staff end character)

DoLoopStatement :: = (DoLoop statement :: =) Do [WhileOrUntil BooleanExpression] StatementTerminator (Do [While boolean expression or Until] statement terminator) [Block] ([Block]) Loop [WhileOrUntil BooleanExpression] StatementTerminator (Loop [While or Until Boolean expression] Statement end compliance)

Whileuntil :: = While | Until (While or Until :: = While | Until)

For ... NEXT statement

ForStatement :: = For LoopControlVariable = Expression To Expression [Step Expression] StatementTerminator [Block] Next [NextExpressionList] StatementTerminator (For statement :: = For loop control variable = expression To expression [Step expression] statement terminator [Block] Next [next expression list] Statement end character) LoopControlvariable :: = Identifier As Typename | Expression (cyclic control variable :: = identifier AS type name | expression)

NEXTEXPRESSIONLIST:: = (NEXT Expression List :: =) VariableExpression | NEXTEXPRESSIONLIST, VARIABLEEXPRESSION (NEXT Expression List, Variable Expression)

For Each ... Next statement

ForEachStatement :: = For Each LoopControlVariable In Expression StatementTerminator [Block] Next [VariableExpression] StatementTerminator (For Each statement :: = For Each loop control variable expression In statement terminator [Block] the Next [Variable expression] statement terminator)

Abnormal processing statement

ExceptionHandLingState :: = (Exception Processing Statement :: =) StructureDexceptionStatement | UnstructureDexceptionStatement (unstructured exception statement)

Structured abnormal processing statement

StructureDexceptionState :: = (Structured Abnormal Statement :: =) THROWSTATEMENT (THROW Statement) | TRYSTATEMENT (TRY statement)

ThrowStatement :: = throw [expression] Statementterminator (THROW statement :: = throw [expression] statement end character)

TryStatement :: = (TRY State :: =) Try StatementTerminator (Try Statement Targeting) [Block] [CatchStatement ] ([Catch Statement ]) [FinalLystatement] ([Finally Statement]) End StatementTerminator END TRY statement end character)

Finally block

FinallyState :: = (FINALLY Statement :: =) Finally Statementterminator (Finally Statement End Valus) [Block] ([Block]) CATCH block

CatchStatement :: = (Catch Statement :: =) Catch [Identifier As TypeName] [hen BooleaneXpression] Statementterminator (Catch [Identifier AS Name] [WHEN Boolean Expression] Staff end character) [Block] ([block])

Non-structured abnormal processing statement

UnstructuredExceptionState :: = (Non-Structured Exception Scala :: =) ErrorStatement | OneRrorstatement | ResumeStatement (Resume Statement)

Error statement

ErrorStatement :: = Error Expression StatementTerminator (ERROR statement :: = Error expression statement end character)

ON Error statement

OneRRORSTATEMENT :: = ON ERROR ERRORCLASE STATEMENTTERMINATOR (OneRr State :: = On Error Error clause statement ending)

ErrorClause :: = (Error clause :: =) Resume next | goto -1 | goto 0 | Gotostatement (goto statement)

Resume statement

Resumestatement :: = Resume [ResumeClause] StatementTerminator (Resume State :: = Resume [Resume Sentence] Fault)

ResumeClause :: = Next | Labelname (Resume clause :: = Next | Label name)

Control flow statement

ControlFlowState :: = (Control Story :: =) Gotostatement | EXITSTATEMENT | STOPSTATEMENT | ENDSTATEMENT | RETURNSTATEMENT (RETURN statement)

Gotostate :: = goto labelname statementterminator (goto statement :: = goto label name statement end character)

EXITSTATEMENT :: = EXIXIXITKIND Statementterminator (EXIT statement :: = EXIT Exit Type Statement end character)

EXITKIND :: = DO | For | While | SELECT | SUB | FUNCTION | Property | TrystopStatement :: = STOP Statementterminator (STOP statement :: = STOP statement end character)

EndStatement :: = End Statementterminator (End Statement :: = End Statement End "

ReturnStatement :: = RETURN [EXPRESSION] (RETURN Statement :: = RETURN [Expression])

Array processing statement

ArrayHandlingState :: = (Array Processing Statement :: =) RedImStatement | ERaseStatement (ERASE statement)

Redim statement

RedimStatement :: = redim [preserve] Redimclauses statementterminator (Redim expression :: = redim [preserve] redim clause statement end character)

Redimclauses :: = (Redim clause :: =) Redimclauses | redimclause, redimclauses (redim clause, redim clause)

Redimclause :: = VariableExpression ArrayInitializationModifier (Redim clause :: = variable expression array initialization modifier)

ERASE statement

ERASSTATEMENT :: = Erase VariableExpressions Statementterminator (ERASE Statement :: = Erase Variable Expression Statement Targe "

VariableExpressions :: = (Variable Expression :: =) VariableExpression | VariableExpressions, VariableExpression (Variable Expression, Variable Expression)

expression

Expression :: = (Expression :: =) SimpleExpression | InvocationExpression (Call Expression) | MEMBERACCESSEXPRESSION (Member Access Expression) | IndexExpression | New Expression | Castexpression (Force Conversion expression) | TypeOfExpression | OperatorExpression (operator expression)

Constant expression

ConstantExpression :: = Expression (constant expression :: = expression)

Variable expression

VariableExpression :: = expression :: = expression) Event Expressions

EventExpression :: = (Event Expression :: =) Expression. IdentifierORKEYWORD (Expression. Identifier or Keyword) | [MeExpression.] IdentifierorKeyword ([ME expression.] Identifier or keyword) | EventMemberName (event member name )

Simple expression

SimpleExpression :: = (Simple Expression :: =) LiteraleXpression | PARENTHESIZEDEXPRESSION (Expression of Brackets) | MeExpression | MettyPeExpression (Metal Type Expression) | LocalVariableExpression (Local Variable Expression) TypeOfisoperatorExpression (TypeOfis operator expression) | ISOPERATOREXPRESSION (IS operator expression)

Text expression

LiteralExpression :: = Literal (text expression :: = text)

Expression with brackets

ParenthesizedExpression :: = (expression) (Expression with bracket :: = (expression))

ME expression

MeExpression :: = me (ME expression :: = me)

Gettype expression

MettypeExpression :: = gettype (TypeName) (Metay Expression :: = Gettype (Type Name))

Local variable expression

LocalvariableExpression :: = localvariablename (local variable expression :: = Local variable name)

TypeOf ... IS expression

TYPEOFISOPERATOREXPISSION :: = TypeOf Expression IS TypeName (TypeOfis operator expression :: = TypeOf expression IS type name)

IS expression

Isoperatorexpression :: = expression is expness (IS operator expression :: = expression IS expression)

Call expressions

InvocationExpression :: = INVOCATIONTARGETEXPIPRESSION [([argumentlist])] (Call Expression :: = Call Target Expression [([Parameter List])])

InvocationTargeTexpression :: = (Call Target Expression :: =) DelegateExpression | [[Expression].] IdentifierorKeyword ([[Expression].] Identifier or keyword) | Myclass. IdentifierorKeyword (MyClass. Identifier Or keyword) | MyBase. IdentifierorKeyword (MyBase) | MethodMembername DelegateExpression :: = Expression:: = expression)

parameter list

ArgumentList :: = (Parameter List :: =) PositionAlarGumentList, NameDargumentList (List Parameter list, Name Parameter List) | PositionAlargumentList (List Parameter) | NameDargumentList (Name Parameter List)

PositionAlarGumentList :: = (List Parameter List :: =) ArgumentExpression (Parameter Expression) | PositionAlarGumentList, [ArgumentExpression] (List Parameter list, [Parameter Expression])

NameDargumentList :: = (Name Parameter List :: =) Identifier: = ArgumentExpression (Identifier: = Parameter Expression) | NameDargumentList, Identifier: = ArgumentExpression (Name Parameter List, Identifier: = Parameter Expression)

ArgumentExpression :: = expression | DelegateArgumentExpression (parameter expression :: = expression | Entrusted parameter expression)

Entrusted parameter expressions

DelegateArgumentExpression :: = addressof InvocationTargeTexpression (delegate parameter expression :: = addressof call target expression)

Member access expression

MEMBERACCESSEXPIRESSION :: = (Member Access Expression :: =) [[Expression].] IdentifierorKeyword ([[Expression].] Identifier or keyword) | VariableMembername | Propertymembername | ConstantMembername | ConstantMembername (Constant member name) | ENUMMEMBERNAME (enumeration member name) | DictionaryAccessExpression (Dictionary Access Expression)

Dictionary member visits

DictionaryAccessExpression :: = [express]! IdentifierorKeyword (Dictionary Access Expression :: = [Expression]! Identifier or Keyword) Index Expression

IndexExpression :: = Expression (argumentlist) (Index Expression :: = Expression (Parameter List))

New expression

NewExpression :: = (New Expression :: =) ObjectCreationExpression | ArrayCreationExpression | DELEGATECREATIONExpression (delegated to create expressions)

Object creation expression

ObjectCreationExpression :: = new type [([argumentlist])] (Object creation expression :: = new type name [([parameter list])])

Array creation expressions

ArrayCreationExpression :: = (array creation expression :: =) New TypeName (ArgumentList) ArrayElementInitializer (New type name (parameter list) array element initializer) | New ArrayTypeName ArrayElementInitializer (New array type the name of the array element initializer item)

Entrusted to create an expression

DelegateCreationExpression :: = New TypeName (InvocationTargeTexpression) (Entrusted Creating Expressions :: = New Type Name (call target expression))

Forced conversion expression

Castexpression :: = (Forced Conversion Expression :: =) CType (Expression, TypeName) (CTYPE (Expression, Type)) | CASTTARGET (EXPRESSION) (Forced Conversion Target (Expression))

CastTarget :: = CBOOL | CBYTE | CCHAR | CDATE | CDEC | CDBL | CLNG | COBJ | CSHORT | CSNG | CSTR

Operator

OperatorExpression :: = unaryopertyXpression | BinaryOperatueXpression (Operator Expression :: = One Division Operator Expression | Binary Operator Expression)

BinaryOperatorExpression :: = (binary operators expression :: =) ArithmeticOperatorExpression (arithmetic operator expression) | RelationalOperatorExpression (relational operator expression) | LikeOperatorExpression (Like operator expression) | ConcatenationOperatorExpression (Expression concatenation operator) | ShortCircuitLogicalOperatoreXpression | LogicalOperatorExpression | ShiftopertyXpression (shift operator expression) One yuan operator

Unaryoperatorexpression :: = (1 yuan operator expression :: =) unaryplusexpression (1 yuan plus expression) | UnaryminuseXpression (1 yuan minicalnotexpression)

One dollar plus operator

Unaryplusexpression :: = Expression (1 yuan plus expression :: = expression)

One dollar mining operator

UnaryminuseXpression :: = - Expression (1 yuan minus expression :: = - expression)

Logical non-operator

UnaryLogicalNotExpression :: = NOT Expression: = NOT Expression

Arithmetic operator

ArithmeticOperatorExpression :: = (arithmetic operator expression :: =) AdditionOperatorExpression (addition operator expression) | SubtractionOperatorExpression (subtraction operator expression) | MultiplicationOperatorExpression (multiplication operator expression) | DivisionOperatorExpression (Division operator expression) | MODULOOPERATOREXPRESSION (Modular Operator Expression) | ExponentoperatorRessionalXpression (Power Operator Expression)

Addition operator

AdditionOperatorExpression :: = Expression Expression (addition operator expression :: = Expression expression)

Subtraction operator

SubtractionOperatorExpression :: = expression - Expression (subtraction operator expression :: = expression - expression)

Multiplication operator

MULTIPLICATIONOPERATOREXPIPRESSION :: = Expression * Expression (Multiplication Operator Expression :: = Expression * Expression)

Division operator

DivisionOperatorExpression :: = (division operator expression :: =) RegularDivisionOperatorExpression (regular division operator expression) | IntegerDivisionOperatorExpression (integer division operator expression) RegularDivisionOperatorExpression :: = Expression / Expression (regular division operator expression :: = Expression / expression)

IntegerDiVisionOperatorExpression :: = expression / expression (integer division operator expression :: = expression / expression)

MOD operator

MODOPERATOREXPIRESSION :: = Expression Modi Expression (MOD Operator Expression :: = Expression MOD Expression)

Power operator

Exponentoperty ^ Expression :: = express ^ Expression :: ^ ^ ^ ^ ^ ^

Relational operator

RELATIONALOPERATOREXPIPRESSION:: = (Relational Operator Expression :: =) Expression = Expression | Expression <> Expression | Expression Expression (Expression> Expression) | Expression <= Expression | Expression> = Expression (Expression> = Expression)

LIKE operator

LIKEOPERATOREXPIPRESSION :: = Expression Like Expression (Like Operator Expression :: = Expression LIKE Expression)

Serial operator

ConcateNationOperatorExpression :: = Expression & Expression (Series Operator Expression :: = Expression & Expressions)

Logical Operators

LogicalOperatorExpression :: = (Logical Operator Expression :: =) Expression and Expression | Expression or Expression | Expression XOR Expression | Expression Andalso Expression (Expression Andalso Expression) | Expression ORELSE Expression (Expression ORELSE Expression)

Shift operator

转载请注明原文地址:https://www.9cbs.com/read-91373.html

New Post(0)