新型汉语编程语言 设计开发中............源代码公开,希望有能力的朋友多提意见
Identifier=([a-z]+[A-Z]+[_]+[‘a’>=128])
Identifier=Identifier(Identifier+[0-9])
Sentence=variablestatementSentence|expressionSentence
variablestatementSentence=typeidentifier variableNames;
variableNames=Identifier,variableNames|Identifier|Identifier[]
expressionSentence=
Class=ClassDescription{ClassBoy}
ClassDescription=AccessRight StoreStatus 类 className
AccessRight=公开|私有|保护|e
StoreStatus=静态|动态
className=Identifier
Classboy=Identifier=([a-z]+[A-Z]+[_]+[‘a’>=128])
Identifier=Identifier(Identifier+[0-9])
Sentence=variablestatementSentence|expressionSentence
variablestatementSentence=typeidentifier variableNames;
variableNames=Identifier,variableNames|Identifier|Identifier[]
expressionSentence=
Class=ClassDescription{ClassBoy}
ClassDescription=AccessRight StoreStatus 类 className
AccessRight=公开|私有|保护|e
StoreStatus=静态|动态
className=Identifier
Classboy=
E=E+T|E-T|T
T=T/F|T*F|T%F|F
F=(E)|ID
E=TE’
E’=+TE’|-TE’|e
T=FT’
T’=/FT’|*FT’|%FT’|e
F=(E)|ID
First(F)={( ,ID}
First(T’)={/,*,%,e}
First(T)={(,ID}
First(E’)={+,-,e}
First(E)={(,ID}
Follow(E)={$,)}
Follow(E’)={$,)}
Follow(T)={$,),+,-}
Follow(T’)={$,),+,-,}
Follow(F)={$,),/,*,%,e}