Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- parserClass="com.alacsplugin.parser.AlacsParser"
- extends="com.intellij.extapi.psi.ASTWrapperPsiElement"
- psiClassPrefix="Alacs"
- psiImplClassSuffix="Impl"
- psiPackage="com.alacsplugin.psi.api"
- psiImplPackage="com.alacsplugin.psi.impl"
- elementTypeHolderClass="com.alacsplugin.psi.AlacsTypes"
- elementTypeClass="com.alacsplugin.psi.AlacsElementType"
- tokenTypeClass="com.alacsplugin.psi.AlacsTokenType"
- tokens=[
- digit='regexp:[0-9]'
- crlf='regexp:\n|\r|\r\n'
- upper='regexp:[A-Z]'
- lower='regexp:[a-z]'
- nonZeroDigit='regexp:[1-9]'
- hexDigit='regexp:[0-9a-fA-F]'
- zero='0'
- HEX='regexp:[xX]'
- LEFT_BRACE="{"
- RIGHT_BRACE="}"
- LEFT_BRACKET="["
- RIGHT_BRACKET="]"
- LEFT_PAREN="("
- RIGHT_PAREN=")"
- SEMICOLON=";"
- DOT="."
- COMMA=","
- Q_MARK='"'
- Q_MARK_2="'"
- COLON=":"
- UNDERSCORE="_"
- EQ='='
- TO='=>'
- LARROW='<-'
- LL='<:'
- RR='>:'
- SHARP='#'
- AT='@'
- LLL='<%'
- EPT='!'
- TLD='~'
- space='regexp:\s'
- SLASH='\'
- L='regexp:[lL]'
- floatType='regexp:[fFdD]'
- EXP='regexp:[eE]'
- abstract="abstract"
- case="case"
- catch="catch"
- class="class"
- def="def"
- do="do"
- else="else"
- extends="extends"
- false="false"
- final="final"
- finally="finally"
- for="for"
- forSome="forSome"
- if="if"
- implicit="implicit"
- import="import"
- lazy="lazy"
- macro="macro"
- match="match"
- new="new"
- null="null"
- object="object"
- override="override"
- package="package"
- private="private"
- protected="protected"
- return="return"
- sealed="sealed"
- super="super"
- this="this"
- throw="throw"
- trait="trait"
- try="try"
- true="true"
- type="type"
- val="val"
- var="var"
- while="while"
- with="with"
- yield="yield"
- op_1='+'
- op_2='-'
- op_3='*'
- op_4='/'
- comment='regexp://.*'
- any='regexp:.'
- ]
- }
- Program ::= Def_ // Start Symbol - BlockExpr ???
- letter ::= upper | lower // and Unicode categories Lo, Lt, Nl
- paren ::= '(' | ')' | '[' | ']' | '{' | '}'
- delim ::= "'" | '"' | '.' | ';' | ','
- opchar ::= !(space | upper | lower | digit | paren | delim) any
- printableChar ::= // all characters in [\u0020, \u007F] inclusive
- charEscapeSeq ::= '\' ('b' | 't' | 'n' | 'f' | 'r' | '"' | "'" | '\')
- op ::= opchar {opchar} *
- varid ::= lower idrest
- plainid ::= upper idrest
- | varid
- | op
- id ::= plainid
- | "'" stringLiteral "'"
- idrest ::= {letter | digit} * ['_' op]
- integerLiteral ::= (decimalNumeral | hexNumeral) [L]
- decimalNumeral ::= '0' | nonZeroDigit {digit} *
- hexNumeral ::= '0' HEX hexDigit {hexDigit} *
- floatingPointLiteral
- ::= digit {digit} * '.' digit {digit} * [exponentPart] [floatType]
- | '.' digit {digit} * [exponentPart] [floatType]
- | digit {digit} * exponentPart [floatType]
- | digit {digit} * [exponentPart] floatType
- exponentPart ::= EXP ['+' | '-'] digit {digit} *
- booleanLiteral ::= 'true' | 'false'
- characterLiteral ::= "'" letter "'" // (charNoQuoteOrNewline | UnicodeEscape | charEscapeSeq) -> letter
- stringLiteral ::= '"' {stringElement} * '"'
- | '"""' multiLineChars '"""'
- stringElement ::= letter // charNoDoubleQuoteOrNewline | UnicodeEscape | charEscapeSeq -> letter
- multiLineChars ::= {['"'] ['"'] letter} * {'"'} * // charNoDoubleQuote -> letter
- symbolLiteral ::= "'" plainid
- nl ::= crlf
- semi ::= ';' | nl {nl} *
- Literal ::= ['-'] integerLiteral
- | ['-'] floatingPointLiteral
- | booleanLiteral
- | characterLiteral
- | stringLiteral
- | symbolLiteral
- | 'null'
- QualId ::= id {'.' id} *
- ids ::= id {',' id} *
- Path ::= StableId
- | [id '.'] 'this'
- StableId ::= id
- | Path '.' id
- | [id '.'] 'super' [ClassQualifier] '.' id
- ClassQualifier ::= '[' id ']'
- Type_ ::= FunctionArgTypes '=>' Type_
- | InfixType [ExistentialClause]
- FunctionArgTypes ::= InfixType
- | '(' [ ParamType {',' ParamType } * ] ')'
- ExistentialClause ::= 'forSome' '{' ExistentialDcl {semi ExistentialDcl} * '}'
- ExistentialDcl ::= 'type' TypeDcl
- | 'val' ValDcl
- InfixType ::= CompoundType {id [nl] CompoundType} *
- CompoundType ::= AnnotType {'with' AnnotType} * [Refinement]
- | Refinement
- AnnotType ::= SimpleType {Annotation} *
- SimpleType ::= SimpleType TypeArgs
- | SimpleType '#' id
- | StableId
- | Path '.' 'type'
- | '(' Types ')'
- TypeArgs ::= '[' Types ']'
- Types ::= Type_ {',' Type_} *
- Refinement ::= [nl] '{' RefineStat {semi RefineStat} * '}'
- RefineStat ::= Dcl
- | 'type' TypeDef
- |
- TypePat ::= Type_
- Ascription ::= ':' InfixType
- | ':' Annotation {Annotation} *
- | ':' '_' '*'
- Expr ::= (Bindings | ['implicit'] id | '_') '=>' Expr
- | Expr1
- Expr1 ::= 'if' '(' Expr ')' {nl} * Expr [[semi] 'else' Expr]
- | 'while' '(' Expr ')' {nl} * Expr
- | 'try' ('{' Block '}' | Expr) ['catch' '{' CaseClauses '}'] ['finally' Expr]
- | 'do' Expr [semi] 'while' '(' Expr ')'
- | 'for' ('(' Enumerators ')' | '{' Enumerators '}') {nl} * ['yield'] Expr
- | 'throw' Expr
- | 'return' [Expr]
- | [SimpleExpr '.'] id '=' Expr
- | SimpleExpr1 ArgumentExprs '=' Expr
- | PostfixExpr
- | PostfixExpr Ascription
- | PostfixExpr 'match' '{' CaseClauses '}'
- PostfixExpr ::= InfixExpr [id [nl]]
- InfixExpr ::= PrefixExpr
- | InfixExpr id [nl] InfixExpr
- PrefixExpr ::= ['-' | '+' | '~' | '!'] SimpleExpr
- SimpleExpr ::= 'new' (ClassTemplate | TemplateBody)
- | BlockExpr
- | SimpleExpr1 ['_']
- SimpleExpr1 ::= Literal
- | Path
- | '_'
- | '(' [Exprs] ')'
- | SimpleExpr '.' id
- | SimpleExpr TypeArgs
- | SimpleExpr1 ArgumentExprs
- //| XmlExpr !!!
- Exprs ::= Expr {',' Expr} *
- ArgumentExprs ::= '(' [Exprs] ')'
- | '(' [Exprs ','] PostfixExpr ':' '_' '*' ')'
- | [nl] BlockExpr
- BlockExpr ::= '{' CaseClauses '}'
- | '{' Block '}'
- Block ::= BlockStat {semi BlockStat} * [ResultExpr]
- BlockStat ::= Import_
- | {Annotation} * ['implicit' | 'lazy'] Def_
- | {Annotation} * {LocalModifier} * TmplDef
- | Expr1
- |
- ResultExpr ::= Expr1
- | (Bindings | (['implicit'] id | '_') ':' CompoundType) '=>' Block
- Enumerators ::= Generator {semi Generator} *
- Generator ::= Pattern1 '<-' Expr {[semi] Guard | semi Pattern1 '=' Expr} *
- CaseClauses ::= CaseClause { CaseClause } *
- CaseClause ::= 'case' Pattern [Guard] '=>' Block
- Guard ::= 'if' PostfixExpr
- Pattern ::= Pattern1 { '|' Pattern1 } *
- Pattern1 ::= varid ':' TypePat
- | '_' ':' TypePat
- | Pattern2
- Pattern2 ::= varid ['@' Pattern3]
- | Pattern3
- Pattern3 ::= SimplePattern
- | SimplePattern { id [nl] SimplePattern } *
- SimplePattern ::= '_'
- | varid
- | Literal
- | StableId
- | StableId '(' [Patterns] ')'
- | StableId '(' [Patterns ','] [varid '@'] '_' '*' ')'
- | '(' [Patterns] ')'
- //| XmlPattern !!!
- Patterns ::= Pattern [',' Patterns]
- | '_' *
- TypeParamClause ::= '[' VariantTypeParam {',' VariantTypeParam} * ']'
- FunTypeParamClause::= '[' TypeParam {',' TypeParam} * ']'
- VariantTypeParam ::= {Annotation} * ['+' | '-'] TypeParam
- TypeParam ::= (id | '_') [TypeParamClause] ['>:' Type_] ['<:' Type_]
- {'<%' Type_} * {':' Type_} *
- ParamClauses ::= {ParamClause} * [[nl] '(' 'implicit' Params ')']
- ParamClause ::= [nl] '(' [Params] ')'
- Params ::= Param {',' Param} *
- Param ::= {Annotation} * id [':' ParamType] ['=' Expr]
- ParamType ::= Type_
- | '=>' Type_
- | Type_ '*'
- ClassParamClauses ::= {ClassParamClause} *
- [[nl] '(' 'implicit' ClassParams ')']
- ClassParamClause ::= [nl] '(' [ClassParams] ')'
- ClassParams ::= ClassParam {',' ClassParam} *
- ClassParam ::= {Annotation} * {Modifier} * [('val' | 'var')]
- id ':' ParamType ['=' Expr]
- Bindings ::= '(' Binding {',' Binding} * ')'
- Binding ::= (id | '_') [':' Type_]
- Modifier ::= LocalModifier
- | AccessModifier
- | 'override'
- LocalModifier ::= 'abstract'
- | 'final'
- | 'sealed'
- | 'implicit'
- | 'lazy'
- AccessModifier ::= ('private' | 'protected') [AccessQualifier]
- AccessQualifier ::= '[' (id | 'this') ']'
- Annotation ::= '@' SimpleType {ArgumentExprs} *
- ConstrAnnotation ::= '@' SimpleType ArgumentExprs
- TemplateBody ::= [nl] '{' [SelfType] TemplateStat {semi TemplateStat} * '}'
- TemplateStat ::= Import_
- | {Annotation [nl]} * {Modifier} * Def_
- | {Annotation [nl]} * {Modifier} * Dcl
- | Expr
- |
- SelfType ::= id [':' Type_] '=>'
- | 'this' ':' Type_ '=>'
- Import_ ::= 'import' ImportExpr {',' ImportExpr} *
- ImportExpr ::= StableId '.' (id | '_' | ImportSelectors)
- ImportSelectors ::= '{' {ImportSelector ','} * (ImportSelector | '_') '}'
- ImportSelector ::= id ['=>' id | '=>' '_']
- Dcl ::= 'val' ValDcl
- | 'var' VarDcl
- | 'def' FunDcl
- | 'type' {nl} * TypeDcl
- ValDcl ::= ids ':' Type_
- VarDcl ::= ids ':' Type_
- FunDcl ::= FunSig [':' Type_]
- FunSig ::= id [FunTypeParamClause] ParamClauses
- TypeDcl ::= id [TypeParamClause] ['>:' Type_] ['<:' Type_]
- PatVarDef ::= 'val' PatDef
- | 'var' VarDef
- Def_ ::= PatVarDef
- | 'def' FunDef
- | 'type' {nl} * TypeDef
- | TmplDef
- PatDef ::= Pattern2 {',' Pattern2} * [':' Type_] '=' Expr
- VarDef ::= PatDef
- | ids ':' Type_ '=' '_'
- FunDef ::= FunSig [':' Type_] '=' Expr
- | FunSig [nl] '{' Block '}'
- | 'this' ParamClause ParamClauses
- ('=' ConstrExpr | [nl] ConstrBlock)
- TypeDef ::= id [TypeParamClause] '=' Type_
- TmplDef ::= ['case'] 'class' ClassDef
- | ['case'] 'object' ObjectDef
- | 'trait' TraitDef
- ClassDef ::= id [TypeParamClause] {ConstrAnnotation} * [AccessModifier]
- ClassParamClauses ClassTemplateOpt
- TraitDef ::= id [TypeParamClause] TraitTemplateOpt
- ObjectDef ::= id ClassTemplateOpt
- ClassTemplateOpt ::= 'extends' ClassTemplate | [['extends'] TemplateBody]
- TraitTemplateOpt ::= 'extends' TraitTemplate | [['extends'] TemplateBody]
- ClassTemplate ::= [EarlyDefs] ClassParents [TemplateBody]
- TraitTemplate ::= [EarlyDefs] TraitParents [TemplateBody]
- ClassParents ::= Constr {'with' AnnotType} *
- TraitParents ::= AnnotType {'with' AnnotType} *
- Constr ::= AnnotType {ArgumentExprs} *
- EarlyDefs ::= '{' [EarlyDef {semi EarlyDef} * ] '}' 'with'
- EarlyDef ::= {Annotation [nl]} * {Modifier} * PatVarDef
- ConstrExpr ::= SelfInvocation
- | ConstrBlock
- ConstrBlock ::= '{' SelfInvocation {semi BlockStat} * '}'
- SelfInvocation ::= 'this' ArgumentExprs {ArgumentExprs} *
- TopStatSeq ::= TopStat {semi TopStat} *
- TopStat ::= {Annotation [nl]} * {Modifier} * TmplDef
- | Import_
- | Packaging
- | PackageObject
- |
- Packaging ::= 'package' QualId [nl] '{' TopStatSeq '}'
- PackageObject ::= 'package' 'object' ObjectDef
- CompilationUnit ::= {'package' QualId semi} * TopStatSeq
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement