X-Git-Url: http://nitlanguage.org diff --git a/src/parser/parser_nodes.nit b/src/parser/parser_nodes.nit index 43e3541..6fe5b6c 100644 --- a/src/parser/parser_nodes.nit +++ b/src/parser/parser_nodes.nit @@ -1,872 +1,1277 @@ -# Raw AST node hierarchy. -# This file was generated by SableCC (http://www.sablecc.org/). +# This file is part of NIT ( http://www.nitlanguage.org ). +# +# Copyright 2008-2009 Jean Privat +# Copyright 2009 Jean-Sebastien Gelinas +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# AST nodes of the Nit language +# Was previously based on parser_abs.nit. package parser_nodes +import location + # Root of the AST hierarchy -abstract class PNode +abstract class ANode + var _location: nullable Location + # Location is set during AST building. Once built, location cannon be null + # However, manual instanciated nodes may need mode care + fun location: Location do return _location.as(not null) + # The location of the important part of the node (identifier or whatever) + fun hot_location: Location do return location + init do end + + # Display a message for the colored location of the node + fun debug(message: String) + do + print "{hot_location} {self.class_name}: {message}\n{hot_location.colored_line("0;32")}" + end end # Ancestor of all tokens abstract class Token -special PNode + super ANode + fun text: String is abstract + fun text=(text: String) is abstract + + redef fun to_s: String do + return "'{text}'" + end end # Ancestor of all productions abstract class Prod -special PNode + super ANode + fun location=(l: Location) do _location = l + readable var _n_annotations: nullable AAnnotations = null end class TEol -special Token + super Token + redef fun to_s + do + return "end of line" + end end class TComment -special Token + super Token end -class TKwpackage -special Token +abstract class TokenKeyword + super Token + redef fun to_s + do + return "keyword '{text}'" + end +end +class TKwmodule + super TokenKeyword end class TKwimport -special Token + super TokenKeyword end class TKwclass -special Token + super TokenKeyword end class TKwabstract -special Token + super TokenKeyword end class TKwinterface -special Token -end -class TKwuniversal -special Token + super TokenKeyword end -class TKwspecial -special Token +class TKwenum + super TokenKeyword end class TKwend -special Token + super TokenKeyword end class TKwmeth -special Token + super TokenKeyword end class TKwtype -special Token -end -class TKwattr -special Token + super TokenKeyword end class TKwinit -special Token + super TokenKeyword end class TKwredef -special Token + super TokenKeyword end class TKwis -special Token + super TokenKeyword end class TKwdo -special Token + super TokenKeyword end class TKwreadable -special Token + super TokenKeyword end class TKwwritable -special Token + super TokenKeyword end class TKwvar -special Token + super TokenKeyword end class TKwintern -special Token + super TokenKeyword end class TKwextern -special Token + super TokenKeyword end class TKwprotected -special Token + super TokenKeyword end class TKwprivate -special Token + super TokenKeyword end class TKwintrude -special Token + super TokenKeyword end class TKwif -special Token + super TokenKeyword end class TKwthen -special Token + super TokenKeyword end class TKwelse -special Token + super TokenKeyword end class TKwwhile -special Token + super TokenKeyword +end +class TKwloop + super TokenKeyword end class TKwfor -special Token + super TokenKeyword end class TKwin -special Token + super TokenKeyword end class TKwand -special Token + super TokenKeyword end class TKwor -special Token + super TokenKeyword end class TKwnot -special Token + super TokenKeyword end class TKwreturn -special Token + super TokenKeyword end class TKwcontinue -special Token + super TokenKeyword end class TKwbreak -special Token + super TokenKeyword end class TKwabort -special Token + super TokenKeyword end class TKwassert -special Token + super TokenKeyword end class TKwnew -special Token + super TokenKeyword end class TKwisa -special Token + super TokenKeyword end class TKwonce -special Token + super TokenKeyword end class TKwsuper -special Token + super TokenKeyword end class TKwself -special Token + super TokenKeyword end class TKwtrue -special Token + super TokenKeyword end class TKwfalse -special Token + super TokenKeyword end class TKwnull -special Token + super TokenKeyword +end +class TKwas + super TokenKeyword +end +class TKwnullable + super TokenKeyword +end +class TKwisset + super TokenKeyword +end +class TKwlabel + super TokenKeyword +end +class TKwdebug + super Token end class TOpar -special Token + super Token end class TCpar -special Token + super Token end class TObra -special Token + super Token end class TCbra -special Token + super Token end class TComma -special Token + super Token end class TColumn -special Token + super Token end class TQuad -special Token + super Token end class TAssign -special Token + super Token +end +abstract class TokenOperator + super Token + redef fun to_s + do + return "operator '{text}'" + end end class TPluseq -special Token + super TokenOperator end class TMinuseq -special Token + super TokenOperator end class TDotdotdot -special Token + super TokenOperator end class TDotdot -special Token + super TokenOperator end class TDot -special Token + super TokenOperator end class TPlus -special Token + super TokenOperator end class TMinus -special Token + super TokenOperator end class TStar -special Token + super TokenOperator end class TSlash -special Token + super TokenOperator end class TPercent -special Token + super TokenOperator end class TEq -special Token + super TokenOperator end class TNe -special Token + super TokenOperator end class TLt -special Token + super TokenOperator end class TLe -special Token + super TokenOperator +end +class TLl + super TokenOperator end class TGt -special Token + super TokenOperator end class TGe -special Token + super TokenOperator +end +class TGg + super TokenOperator end class TStarship -special Token + super TokenOperator +end +class TBang + super TokenOperator +end +class TAt + super Token end class TClassid -special Token + super Token + redef fun to_s + do + do return "type identifier '{text}'" + end end class TId -special Token + super Token + redef fun to_s + do + do return "identifier '{text}'" + end end class TAttrid -special Token + super Token + redef fun to_s + do + do return "attribute '{text}'" + end +end +abstract class TokenLiteral + super Token + redef fun to_s + do + do return "literal value '{text}'" + end end class TNumber -special Token + super TokenLiteral end class TFloat -special Token + super TokenLiteral end class TChar -special Token + super TokenLiteral end class TString -special Token + super TokenLiteral end class TStartString -special Token + super TokenLiteral end class TMidString -special Token + super TokenLiteral end class TEndString -special Token + super Token end -class EOF -special Token +class TBadString + super Token + redef fun to_s + do + do return "malformed string {text}" + end end -class PError -special EOF +class TBadChar + super Token + redef fun to_s + do + do return "malformed character {text}" + end +end +class TExternCodeSegment + super Token +end +class EOF + super Token + redef fun to_s + do + return "end of file" + end +end +class AError + super EOF +end +class ALexerError + super AError +end +class AParserError + super AError end - -class PModule special Prod end -class PPackagedecl special Prod end -class PImport special Prod end -class PVisibility special Prod end -class PClassdef special Prod end -class PClasskind special Prod end -class PFormaldef special Prod end -class PSuperclass special Prod end -class PPropdef special Prod - readable writable attr _n_doc: PDoc -end -class PAble special Prod - readable writable attr _n_kwredef: TKwredef -end -class PMethid special Prod end -class PSignature special Prod end -class PParam -special Prod - readable writable attr _n_id: TId - readable writable attr _n_type: PType -end -class PType special Prod end -class PExpr special Prod end -class PAssignOp special Prod end -class PQualified special Prod end -class PDoc special Prod end class AModule -special PModule - readable writable attr _n_packagedecl: PPackagedecl - readable writable attr _n_imports: List[PImport] - readable writable attr _n_classdefs: List[PClassdef] -end -class APackagedecl -special PPackagedecl - readable writable attr _n_doc: PDoc - readable writable attr _n_kwpackage: TKwpackage - readable writable attr _n_id: TId -end -class AImport -special PImport - readable writable attr _n_visibility: PVisibility - readable writable attr _n_kwimport: TKwimport - readable writable attr _n_id: TId + super Prod + readable var _n_moduledecl: nullable AModuledecl = null + readable var _n_imports: List[AImport] = new List[AImport] + readable var _n_extern_code_blocks: List[AExternCodeBlock] = new List[AExternCodeBlock] + readable var _n_classdefs: List[AClassdef] = new List[AClassdef] +end +class AModuledecl + super Prod + readable var _n_doc: nullable ADoc = null + readable var _n_kwmodule: TKwmodule + readable var _n_name: AModuleName +end +abstract class AImport super Prod end +class AStdImport + super AImport + readable var _n_visibility: AVisibility + readable var _n_kwimport: TKwimport + readable var _n_name: AModuleName end class ANoImport -special PImport - readable writable attr _n_visibility: PVisibility - readable writable attr _n_kwimport: TKwimport - readable writable attr _n_kwend: TKwend + super AImport + readable var _n_visibility: AVisibility + readable var _n_kwimport: TKwimport + readable var _n_kwend: TKwend end +abstract class AVisibility super Prod end class APublicVisibility -special PVisibility + super AVisibility end class APrivateVisibility -special PVisibility - readable writable attr _n_kwprivate: TKwprivate + super AVisibility + readable var _n_kwprivate: TKwprivate end class AProtectedVisibility -special PVisibility - readable writable attr _n_kwprotected: TKwprotected + super AVisibility + readable var _n_kwprotected: TKwprotected end class AIntrudeVisibility -special PVisibility - readable writable attr _n_kwintrude: TKwintrude -end -class AClassdef -special PClassdef - readable writable attr _n_doc: PDoc - readable writable attr _n_kwredef: TKwredef - readable writable attr _n_visibility: PVisibility - readable writable attr _n_classkind: PClasskind - readable writable attr _n_id: TClassid - readable writable attr _n_formaldefs: List[PFormaldef] - readable writable attr _n_superclasses: List[PSuperclass] - readable writable attr _n_propdefs: List[PPropdef] + super AVisibility + readable var _n_kwintrude: TKwintrude +end +abstract class AClassdef super Prod + readable var _n_propdefs: List[APropdef] = new List[APropdef] +end +class AStdClassdef + super AClassdef + readable var _n_doc: nullable ADoc = null + readable var _n_kwredef: nullable TKwredef = null + readable var _n_visibility: AVisibility + readable var _n_classkind: AClasskind + readable var _n_id: nullable TClassid = null + readable var _n_formaldefs: List[AFormaldef] = new List[AFormaldef] + readable var _n_extern_code_block: nullable AExternCodeBlock = null + readable var _n_superclasses: List[ASuperclass] = new List[ASuperclass] + readable var _n_kwend: TKwend + redef fun hot_location do return n_id.location end class ATopClassdef -special PClassdef - readable writable attr _n_propdefs: List[PPropdef] + super AClassdef end class AMainClassdef -special PClassdef - readable writable attr _n_propdefs: List[PPropdef] + super AClassdef end +abstract class AClasskind super Prod end class AConcreteClasskind -special PClasskind - readable writable attr _n_kwclass: TKwclass + super AClasskind + readable var _n_kwclass: TKwclass end class AAbstractClasskind -special PClasskind - readable writable attr _n_kwabstract: TKwabstract - readable writable attr _n_kwclass: TKwclass + super AClasskind + readable var _n_kwabstract: TKwabstract + readable var _n_kwclass: TKwclass end class AInterfaceClasskind -special PClasskind - readable writable attr _n_kwinterface: TKwinterface + super AClasskind + readable var _n_kwinterface: TKwinterface end -class AUniversalClasskind -special PClasskind - readable writable attr _n_kwuniversal: TKwuniversal +class AEnumClasskind + super AClasskind + readable var _n_kwenum: TKwenum +end +class AExternClasskind + super AClasskind + readable var _n_kwextern: TKwextern + readable var _n_kwclass: nullable TKwclass = null end class AFormaldef -special PFormaldef - readable writable attr _n_id: TClassid - readable writable attr _n_type: PType + super Prod + readable var _n_id: TClassid + readable var _n_type: nullable AType = null end class ASuperclass -special PSuperclass - readable writable attr _n_kwspecial: TKwspecial - readable writable attr _n_type: PType + super Prod + readable var _n_kwsuper: TKwsuper + readable var _n_type: AType +end +abstract class APropdef super Prod + readable var _n_doc: nullable ADoc = null end class AAttrPropdef -special PPropdef - readable writable attr _n_kwredef: TKwredef - readable writable attr _n_visibility: PVisibility - readable writable attr _n_kwattr: TKwattr - readable writable attr _n_id: TAttrid - readable writable attr _n_type: PType - readable writable attr _n_readable: PAble - readable writable attr _n_writable: PAble - readable writable attr _n_expr: PExpr -end -class AMethPropdef -special PPropdef - readable writable attr _n_kwredef: TKwredef - readable writable attr _n_visibility: PVisibility - readable writable attr _n_methid: PMethid - readable writable attr _n_signature: PSignature + super APropdef + readable var _n_kwredef: nullable TKwredef = null + readable var _n_visibility: AVisibility + readable var _n_kwvar: TKwvar + readable var _n_id: nullable TAttrid + readable var _n_id2: nullable TId + readable var _n_type: nullable AType = null + readable var _n_readable: nullable AAble = null + readable var _n_writable: nullable AAble = null + readable var _n_expr: nullable AExpr = null + redef fun hot_location + do + if n_id != null then return n_id.location else return n_id2.location + end +end +abstract class AMethPropdef + super APropdef + readable var _n_kwredef: nullable TKwredef = null + readable var _n_visibility: nullable AVisibility + readable var _n_methid: nullable AMethid = null + readable var _n_signature: nullable ASignature + redef fun hot_location + do + if n_methid != null then + return n_methid.location + else + return location + end + end end class ADeferredMethPropdef -special AMethPropdef - readable writable attr _n_kwmeth: TKwmeth + super AMethPropdef + readable var _n_kwmeth: TKwmeth end class AInternMethPropdef -special AMethPropdef - readable writable attr _n_kwmeth: TKwmeth + super AMethPropdef + readable var _n_kwmeth: TKwmeth +end +abstract class AExternPropdef + super AMethPropdef + readable var _n_extern: nullable TString = null + readable var _n_extern_calls: nullable AExternCalls = null + readable var _n_extern_code_block: nullable AExternCodeBlock = null end class AExternMethPropdef -special AMethPropdef - readable writable attr _n_kwmeth: TKwmeth - readable writable attr _n_extern: TString + super AMethPropdef + super AExternPropdef + readable var _n_kwmeth: TKwmeth end class AConcreteMethPropdef -special AMethPropdef - readable writable attr _n_kwmeth: TKwmeth - readable writable attr _n_block: PExpr + super AMethPropdef + readable var _n_kwmeth: nullable TKwmeth + readable var _n_block: nullable AExpr = null +end +abstract class AInitPropdef + super AMethPropdef end class AConcreteInitPropdef -special AConcreteMethPropdef - readable writable attr _n_kwinit: TKwinit + super AConcreteMethPropdef + super AInitPropdef + readable var _n_kwinit: TKwinit + redef fun hot_location do return n_kwinit.location +end +class AExternInitPropdef + super AExternPropdef + super AInitPropdef + readable var _n_kwnew: TKwnew end class AMainMethPropdef -special AConcreteMethPropdef + super AConcreteMethPropdef +end +class AExternCalls + super Prod + readable var _n_kwimport: TKwimport + readable var _n_extern_calls: List[AExternCall] = new List[AExternCall] +end +abstract class AExternCall + super Prod +end +abstract class APropExternCall +super AExternCall +end +class ALocalPropExternCall +super APropExternCall + readable var _n_methid: AMethid +end +class AFullPropExternCall +super APropExternCall + readable var _n_classid: TClassid + readable var _n_quad: nullable TQuad = null + readable var _n_methid: AMethid +end +class AInitPropExternCall +super APropExternCall + readable var _n_classid: TClassid +end +class ASuperExternCall +super AExternCall + readable var _n_kwsuper: TKwsuper +end +abstract class ACastExternCall +super AExternCall +end +class ACastAsExternCall +super ACastExternCall + readable var _n_from_type: AType + readable var _n_kwas: TKwas + readable var _n_to_type: AType +end +class AAsNullableExternCall +super ACastExternCall + readable var _n_type: AType + readable var _n_kwas: TKwas + readable var _n_kwnullable: TKwnullable +end +class AAsNotNullableExternCall +super ACastExternCall + readable var _n_type: AType + readable var _n_kwas: TKwas + readable var _n_kwnot: TKwnot + readable var _n_kwnullable: TKwnullable end class ATypePropdef -special PPropdef - readable writable attr _n_kwredef: TKwredef - readable writable attr _n_visibility: PVisibility - readable writable attr _n_kwtype: TKwtype - readable writable attr _n_id: TClassid - readable writable attr _n_type: PType + super APropdef + readable var _n_kwredef: nullable TKwredef = null + readable var _n_visibility: AVisibility + readable var _n_kwtype: TKwtype + readable var _n_id: TClassid + readable var _n_type: AType +end +abstract class AAble super Prod + readable var _n_visibility: nullable AVisibility = null + readable var _n_kwredef: nullable TKwredef = null end class AReadAble -special PAble - readable writable attr _n_kwreadable: TKwreadable + super AAble + readable var _n_kwreadable: TKwreadable end class AWriteAble -special PAble - readable writable attr _n_kwwritable: TKwwritable + super AAble + readable var _n_kwwritable: TKwwritable end +abstract class AMethid super Prod end class AIdMethid -special PMethid - readable writable attr _n_id: TId + super AMethid + readable var _n_id: TId end class APlusMethid -special PMethid - readable writable attr _n_plus: TPlus + super AMethid + readable var _n_plus: TPlus end class AMinusMethid -special PMethid - readable writable attr _n_minus: TMinus + super AMethid + readable var _n_minus: TMinus end class AStarMethid -special PMethid - readable writable attr _n_star: TStar + super AMethid + readable var _n_star: TStar end class ASlashMethid -special PMethid - readable writable attr _n_slash: TSlash + super AMethid + readable var _n_slash: TSlash end class APercentMethid -special PMethid - readable writable attr _n_percent: TPercent + super AMethid + readable var _n_percent: TPercent end class AEqMethid -special PMethid - readable writable attr _n_eq: TEq + super AMethid + readable var _n_eq: TEq end class ANeMethid -special PMethid - readable writable attr _n_ne: TNe + super AMethid + readable var _n_ne: TNe end class ALeMethid -special PMethid - readable writable attr _n_le: TLe + super AMethid + readable var _n_le: TLe end class AGeMethid -special PMethid - readable writable attr _n_ge: TGe + super AMethid + readable var _n_ge: TGe end class ALtMethid -special PMethid - readable writable attr _n_lt: TLt + super AMethid + readable var _n_lt: TLt end class AGtMethid -special PMethid - readable writable attr _n_gt: TGt + super AMethid + readable var _n_gt: TGt +end +class ALlMethid + super AMethid + readable writable var _n_ll: TLl +end +class AGgMethid + super AMethid + readable writable var _n_gg: TGg end class ABraMethid -special PMethid - readable writable attr _n_obra: TObra - readable writable attr _n_cbra: TCbra + super AMethid + readable var _n_obra: TObra + readable var _n_cbra: TCbra end class AStarshipMethid -special PMethid - readable writable attr _n_starship: TStarship + super AMethid + readable var _n_starship: TStarship end class AAssignMethid -special PMethid - readable writable attr _n_id: TId - readable writable attr _n_assign: TAssign + super AMethid + readable var _n_id: TId + readable var _n_assign: TAssign end class ABraassignMethid -special PMethid - readable writable attr _n_obra: TObra - readable writable attr _n_cbra: TCbra - readable writable attr _n_assign: TAssign + super AMethid + readable var _n_obra: TObra + readable var _n_cbra: TCbra + readable var _n_assign: TAssign end class ASignature -special PSignature - readable writable attr _n_params: List[PParam] - readable writable attr _n_type: PType + super Prod + readable var _n_opar: nullable TOpar = null + readable var _n_params: List[AParam] = new List[AParam] + readable var _n_cpar: nullable TCpar = null + readable var _n_type: nullable AType = null + readable var _n_closure_decls: List[AClosureDecl] = new List[AClosureDecl] end class AParam -special PParam - readable writable attr _n_dotdotdot: TDotdotdot + super Prod + readable var _n_id: TId + readable var _n_type: nullable AType = null + readable var _n_dotdotdot: nullable TDotdotdot = null +end +class AClosureDecl + super Prod + readable var _n_kwbreak: nullable TKwbreak = null + readable var _n_bang: TBang + readable var _n_id: TId + readable var _n_signature: ASignature + readable var _n_expr: nullable AExpr = null end class AType -special PType - readable writable attr _n_id: TClassid - readable writable attr _n_types: List[PType] + super Prod + readable var _n_kwnullable: nullable TKwnullable = null + readable var _n_id: TClassid + readable var _n_types: List[AType] = new List[AType] end - - - +class ALabel + super Prod + readable var _n_kwlabel: TKwlabel + readable var _n_id: TId +end +abstract class AExpr super Prod end class ABlockExpr -special PExpr - readable writable attr _n_expr: List[PExpr] + super AExpr + readable var _n_expr: List[AExpr] = new List[AExpr] + readable var _n_kwend: nullable TKwend = null end class AVardeclExpr -special PExpr - readable writable attr _n_kwvar: TKwvar - readable writable attr _n_id: TId - readable writable attr _n_type: PType - readable writable attr _n_assign: TAssign - readable writable attr _n_expr: PExpr + super AExpr + readable var _n_kwvar: TKwvar + readable var _n_id: TId + readable var _n_type: nullable AType = null + readable var _n_assign: nullable TAssign = null + readable var _n_expr: nullable AExpr = null end class AReturnExpr -special PExpr - readable writable attr _n_kwreturn: TKwreturn - readable writable attr _n_expr: PExpr + super AExpr + readable var _n_kwreturn: nullable TKwreturn = null + readable var _n_expr: nullable AExpr = null +end +abstract class ALabelable + super Prod + readable var _n_label: nullable ALabel = null end class ABreakExpr -special PExpr - readable writable attr _n_kwbreak: TKwbreak + super AExpr + super ALabelable + readable var _n_kwbreak: TKwbreak + readable var _n_expr: nullable AExpr = null end class AAbortExpr -special PExpr - readable writable attr _n_kwabort: TKwabort + super AExpr + readable var _n_kwabort: TKwabort end class AContinueExpr -special PExpr - readable writable attr _n_kwcontinue: TKwcontinue + super AExpr + super ALabelable + readable var _n_kwcontinue: nullable TKwcontinue = null + readable var _n_expr: nullable AExpr = null end class ADoExpr -special PExpr - readable writable attr _n_kwdo: TKwdo - readable writable attr _n_block: PExpr + super AExpr + super ALabelable + readable var _n_kwdo: TKwdo + readable var _n_block: nullable AExpr = null end class AIfExpr -special PExpr - readable writable attr _n_kwif: TKwif - readable writable attr _n_expr: PExpr - readable writable attr _n_then: PExpr - readable writable attr _n_else: PExpr + super AExpr + readable var _n_kwif: TKwif + readable var _n_expr: AExpr + readable var _n_then: nullable AExpr = null + readable var _n_else: nullable AExpr = null end class AIfexprExpr -special PExpr - readable writable attr _n_kwif: TKwif - readable writable attr _n_expr: PExpr - readable writable attr _n_kwthen: TKwthen - readable writable attr _n_then: PExpr - readable writable attr _n_kwelse: TKwelse - readable writable attr _n_else: PExpr + super AExpr + readable var _n_kwif: TKwif + readable var _n_expr: AExpr + readable var _n_kwthen: TKwthen + readable var _n_then: AExpr + readable var _n_kwelse: TKwelse + readable var _n_else: AExpr end class AWhileExpr -special PExpr - readable writable attr _n_kwwhile: TKwwhile - readable writable attr _n_expr: PExpr - readable writable attr _n_kwdo: TKwdo - readable writable attr _n_block: PExpr + super AExpr + super ALabelable + readable var _n_kwwhile: TKwwhile + readable var _n_expr: AExpr + readable var _n_kwdo: TKwdo + readable var _n_block: nullable AExpr = null +end +class ALoopExpr + super AExpr + super ALabelable + readable var _n_kwloop: TKwloop + readable var _n_block: nullable AExpr = null end class AForExpr -special PExpr - readable writable attr _n_vardecl: PExpr - readable writable attr _n_kwdo: TKwdo - readable writable attr _n_block: PExpr -end -class AForVardeclExpr -special PExpr - readable writable attr _n_kwfor: TKwfor - readable writable attr _n_id: TId - readable writable attr _n_expr: PExpr + super AExpr + super ALabelable + readable var _n_kwfor: TKwfor + readable var _n_ids: List[TId] = new List[TId] + readable var _n_expr: AExpr + readable var _n_kwdo: TKwdo + readable var _n_block: nullable AExpr = null end class AAssertExpr -special PExpr - readable writable attr _n_kwassert: TKwassert - readable writable attr _n_id: TId - readable writable attr _n_expr: PExpr -end -class AAssignFormExpr -special PExpr - readable writable attr _n_assign: TAssign - readable writable attr _n_value: PExpr -end -class AReassignFormExpr -special PExpr - readable writable attr _n_assign_op: PAssignOp - readable writable attr _n_value: PExpr + super AExpr + readable var _n_kwassert: TKwassert + readable var _n_id: nullable TId = null + readable var _n_expr: AExpr + readable var _n_else: nullable AExpr = null +end +abstract class AAssignFormExpr + super AExpr + readable var _n_assign: TAssign + readable var _n_value: AExpr +end +abstract class AReassignFormExpr + super AExpr + readable var _n_assign_op: AAssignOp + readable var _n_value: AExpr end class AOnceExpr -special AProxyExpr - readable writable attr _n_kwonce: TKwonce + super AProxyExpr + readable var _n_kwonce: TKwonce end -class ASendExpr -special PExpr - readable writable attr _n_expr: PExpr +abstract class ASendExpr + super AExpr + readable var _n_expr: AExpr + readable var _n_closure_defs: List[AClosureDef] = new List[AClosureDef] end -class ABinopExpr -special ASendExpr - readable writable attr _n_expr2: PExpr +abstract class ABinopExpr + super ASendExpr + readable var _n_expr2: AExpr end -class ABoolExpr -special PExpr +abstract class ABoolExpr + super AExpr end class AOrExpr -special ABoolExpr - readable writable attr _n_expr: PExpr - readable writable attr _n_expr2: PExpr + super ABoolExpr + readable var _n_expr: AExpr + readable var _n_expr2: AExpr end class AAndExpr -special ABoolExpr - readable writable attr _n_expr: PExpr - readable writable attr _n_expr2: PExpr + super ABoolExpr + readable var _n_expr: AExpr + readable var _n_expr2: AExpr +end +class AOrElseExpr + super ABoolExpr + readable var _n_expr: AExpr + readable var _n_expr2: AExpr end class ANotExpr -special ABoolExpr - readable writable attr _n_kwnot: TKwnot - readable writable attr _n_expr: PExpr + super ABoolExpr + readable var _n_kwnot: TKwnot + readable var _n_expr: AExpr end class AEqExpr -special ABinopExpr + super ABinopExpr end class AEeExpr -special ABoolExpr - readable writable attr _n_expr: PExpr - readable writable attr _n_expr2: PExpr + super ABoolExpr + readable var _n_expr: AExpr + readable var _n_expr2: AExpr end class ANeExpr -special ABinopExpr + super ABinopExpr end class ALtExpr -special ABinopExpr + super ABinopExpr end class ALeExpr -special ABinopExpr + super ABinopExpr +end +class ALlExpr + super ABinopExpr end class AGtExpr -special ABinopExpr + super ABinopExpr end class AGeExpr -special ABinopExpr + super ABinopExpr +end +class AGgExpr + super ABinopExpr end class AIsaExpr -special ABoolExpr - readable writable attr _n_expr: PExpr - readable writable attr _n_type: PType + super ABoolExpr + readable var _n_expr: AExpr + readable var _n_type: AType end class APlusExpr -special ABinopExpr + super ABinopExpr end class AMinusExpr -special ABinopExpr + super ABinopExpr end class AStarshipExpr -special ABinopExpr + super ABinopExpr end class AStarExpr -special ABinopExpr + super ABinopExpr end class ASlashExpr -special ABinopExpr + super ABinopExpr end class APercentExpr -special ABinopExpr + super ABinopExpr end class AUminusExpr -special ASendExpr - readable writable attr _n_minus: TMinus + super ASendExpr + readable var _n_minus: TMinus end class ANewExpr -special PExpr - readable writable attr _n_kwnew: TKwnew - readable writable attr _n_type: PType - readable writable attr _n_id: TId - readable writable attr _n_args: List[PExpr] + super AExpr + readable var _n_kwnew: TKwnew + readable var _n_type: AType + readable var _n_id: nullable TId = null + readable var _n_args: AExprs end -class AAttrFormExpr -special PExpr - readable writable attr _n_expr: PExpr - readable writable attr _n_id: TAttrid +abstract class AAttrFormExpr + super AExpr + readable var _n_expr: AExpr + readable var _n_id: TAttrid end class AAttrExpr -special AAttrFormExpr + super AAttrFormExpr end class AAttrAssignExpr -special AAttrFormExpr -special AAssignFormExpr + super AAttrFormExpr + super AAssignFormExpr end -class ACallFormExpr -special ASendExpr - readable writable attr _n_id: TId - readable writable attr _n_args: List[PExpr] +abstract class ACallFormExpr + super ASendExpr + readable var _n_id: TId + readable var _n_args: AExprs +end +abstract class ASendReassignFormExpr + super ASendExpr + super AReassignFormExpr end class AAttrReassignExpr -special PExpr -special AAttrFormExpr -special AReassignFormExpr + super AExpr + super AAttrFormExpr + super AReassignFormExpr end class ACallExpr -special ACallFormExpr + super ACallFormExpr end class ACallAssignExpr -special ACallFormExpr -special AAssignFormExpr + super ACallFormExpr + super AAssignFormExpr end class ACallReassignExpr -special PExpr -special ACallFormExpr -special AReassignFormExpr + super AExpr + super ACallFormExpr + super ASendReassignFormExpr end class ASuperExpr -special PExpr - readable writable attr _n_qualified: PQualified - readable writable attr _n_kwsuper: TKwsuper - readable writable attr _n_args: List[PExpr] + super AExpr + readable var _n_qualified: nullable AQualified = null + readable var _n_kwsuper: TKwsuper + readable var _n_args: AExprs end class AInitExpr -special ASendExpr - readable writable attr _n_kwinit: TKwinit - readable writable attr _n_args: List[PExpr] + super ASendExpr + readable var _n_kwinit: TKwinit + readable var _n_args: AExprs end -class ABraFormExpr -special ASendExpr - readable writable attr _n_args: List[PExpr] +abstract class ABraFormExpr + super ASendExpr + readable var _n_args: AExprs end class ABraExpr -special ABraFormExpr + super ABraFormExpr end class ABraAssignExpr -special ABraFormExpr -special AAssignFormExpr + super ABraFormExpr + super AAssignFormExpr end -class AVarFormExpr -special PExpr - readable writable attr _n_id: TId +abstract class AVarFormExpr + super AExpr + readable var _n_id: TId end class ABraReassignExpr -special ABraFormExpr -special AReassignFormExpr + super ABraFormExpr + super ASendReassignFormExpr +end +class AClosureCallExpr + super AExpr + readable var _n_id: TId + readable var _n_args: AExprs + readable var _n_closure_defs: List[AClosureDef] = new List[AClosureDef] end class AVarExpr -special AVarFormExpr + super AVarFormExpr end class AVarAssignExpr -special AVarFormExpr -special AAssignFormExpr + super AVarFormExpr + super AAssignFormExpr end class AVarReassignExpr -special AVarFormExpr -special AReassignFormExpr + super AVarFormExpr + super AReassignFormExpr end -class ARangeExpr -special PExpr - readable writable attr _n_expr: PExpr - readable writable attr _n_expr2: PExpr +abstract class ARangeExpr + super AExpr + readable var _n_expr: AExpr + readable var _n_expr2: AExpr end class ACrangeExpr -special ARangeExpr + super ARangeExpr + readable var _n_obra: TObra + readable var _n_cbra: TCbra end class AOrangeExpr -special ARangeExpr + super ARangeExpr + readable var _n_obra: TObra + readable var _n_cbra: TObra end class AArrayExpr -special PExpr - readable writable attr _n_exprs: List[PExpr] + super AExpr + readable var _n_exprs: AExprs end class ASelfExpr -special PExpr - readable writable attr _n_kwself: TKwself + super AExpr + readable var _n_kwself: nullable TKwself end class AImplicitSelfExpr -special ASelfExpr + super ASelfExpr end class ATrueExpr -special ABoolExpr - readable writable attr _n_kwtrue: TKwtrue + super ABoolExpr + readable var _n_kwtrue: TKwtrue end class AFalseExpr -special ABoolExpr - readable writable attr _n_kwfalse: TKwfalse + super ABoolExpr + readable var _n_kwfalse: TKwfalse end class ANullExpr -special PExpr - readable writable attr _n_kwnull: TKwnull + super AExpr + readable var _n_kwnull: TKwnull end class AIntExpr -special PExpr - readable writable attr _n_number: TNumber + super AExpr + readable var _n_number: TNumber end class AFloatExpr -special PExpr - readable writable attr _n_float: TFloat + super AExpr + readable var _n_float: TFloat end class ACharExpr -special PExpr - readable writable attr _n_char: TChar + super AExpr + readable var _n_char: TChar end -class AStringFormExpr -special PExpr +abstract class AStringFormExpr + super AExpr + readable var _n_string: Token end class AStringExpr -special AStringFormExpr - readable writable attr _n_string: TString + super AStringFormExpr end class AStartStringExpr -special AStringFormExpr - readable writable attr _n_string: TStartString + super AStringFormExpr end class AMidStringExpr -special AStringFormExpr - readable writable attr _n_string: TMidString + super AStringFormExpr end class AEndStringExpr -special AStringFormExpr - readable writable attr _n_string: TEndString + super AStringFormExpr end class ASuperstringExpr -special PExpr - readable writable attr _n_exprs: List[PExpr] + super AExpr + readable var _n_exprs: List[AExpr] = new List[AExpr] end class AParExpr -special AProxyExpr -end -class AProxyExpr -special PExpr - readable writable attr _n_expr: PExpr -end + super AProxyExpr + readable var _n_opar: TOpar + readable var _n_cpar: TCpar +end +abstract class AProxyExpr + super AExpr + readable var _n_expr: AExpr +end +class AAsCastExpr + super AExpr + readable var _n_expr: AExpr + readable var _n_kwas: TKwas + readable var _n_opar: TOpar + readable var _n_type: AType + readable var _n_cpar: TCpar +end +class AAsNotnullExpr + super AExpr + readable var _n_expr: AExpr + readable var _n_kwas: TKwas + readable var _n_opar: TOpar + readable var _n_kwnot: TKwnot + readable var _n_kwnull: TKwnull + readable var _n_cpar: TCpar +end +class AIssetAttrExpr + super AAttrFormExpr + readable var _n_kwisset: TKwisset +end +abstract class AExprs + super Prod + readable var _n_exprs: List[AExpr] = new List[AExpr] +end +class ADebugTypeExpr + super AExpr + readable var _n_kwdebug: TKwdebug + readable var _n_kwtype: TKwtype + readable var _n_expr: AExpr + readable var _n_type: AType +end +class AListExprs + super AExprs +end +class AParExprs + super AExprs + readable var _n_opar: TOpar + readable var _n_cpar: TCpar +end +class ABraExprs + super AExprs + readable var _n_obra: TObra + readable var _n_cbra: TCbra +end +abstract class AAssignOp super Prod end class APlusAssignOp -special PAssignOp - readable writable attr _n_pluseq: TPluseq + super AAssignOp + readable var _n_pluseq: TPluseq end class AMinusAssignOp -special PAssignOp - readable writable attr _n_minuseq: TMinuseq + super AAssignOp + readable var _n_minuseq: TMinuseq +end +class AClosureDef + super ALabelable + readable var _n_bang: TBang + readable var _n_id: AClosureId + readable var _n_ids: List[TId] = new List[TId] + readable var _n_kwdo: nullable TKwdo = null + readable var _n_expr: nullable AExpr = null + redef fun hot_location do return n_id.location +end +abstract class AClosureId + super Prod +end +class ASimpleClosureId + super AClosureId + readable var _n_id: TId +end +class ABreakClosureId + super AClosureId + readable var _n_kwbreak: TKwbreak +end +class AModuleName +super Prod + readable var _n_quad: nullable TQuad = null + readable var _n_path: List[TId] = new List[TId] + readable var _n_id: TId +end +class AInLanguage + super Prod + readable var _n_kwin: TKwin + readable var _n_string: TString +end +class AExternCodeBlock + super Prod + readable var _n_in_language: nullable AInLanguage = null + readable var _n_extern_code_segment: TExternCodeSegment end class AQualified -special PQualified - readable writable attr _n_id: List[TId] - readable writable attr _n_classid: TClassid + super Prod + readable var _n_quad: nullable TQuad = null + readable var _n_id: List[TId] = new List[TId] + readable var _n_classid: nullable TClassid = null end class ADoc -special PDoc - readable writable attr _n_comment: List[TComment] + super Prod + readable var _n_comment: List[TComment] = new List[TComment] +end + +class AAnnotations + super Prod + readable var _n_at: nullable TAt = null + readable var _n_opar: nullable TOpar = null + readable var _n_items: List[AAnnotation] = new List[AAnnotation] + readable var _n_cpar: nullable TCpar = null +end +class AAnnotation + super Prod + readable var _n_atid: AAtid + readable var _n_opar: nullable TOpar = null + readable var _n_args: List[AAtArg] = new List[AAtArg] + readable var _n_cpar: nullable TCpar = null +end +abstract class AAtArg + super Prod +end +class ATypeAtArg + super AAtArg + readable var _n_type: AType +end +class AExprAtArg + super AAtArg + readable var _n_expr: AExpr +end +class AAtAtArg + super AAtArg +end +abstract class AAtid + super Prod + readable var _n_id: Token +end +class AIdAtid + super AAtid +end +class AKwexternAtid + super AAtid +end +class AKwinternAtid + super AAtid +end +class AKwreadableAtid + super AAtid +end +class AKwwritableAtid + super AAtid +end +class AKwimportAtid + super AAtid end class Start -special Prod - readable writable attr _n_base: PModule - readable writable attr _n_eof: EOF + super Prod + readable var _n_base: nullable AModule + readable var _n_eof: EOF + init(n_base: nullable AModule, n_eof: EOF) + do + self._n_base = n_base + self._n_eof = n_eof + end end