Skip to content
Snippets Groups Projects
Select Git revision
  • ddb23f18a0c94834d7cf3485a0b5cf011020c92f
  • master default
  • labcomm2006
  • typedefs
  • anders.blomdell
  • typeref
  • pragma
  • compiler-refactoring
  • labcomm2013
  • v2014.4
  • v2006.0
  • v2014.3
  • v2014.2
  • v2014.1
  • v2014.0
  • v2013.0
16 results

LabComm.ast

Blame
  • Forked from Anders Blomdell / LabComm
    90 commits behind the upstream repository.
    LabComm.ast 1.14 KiB
    Program ::= Decl*;
    
    abstract Decl ::= Type <Name:String> /Signature/;
    
    TypeDecl   : Decl;
    SampleDecl : Decl;
    
    //Signatures are in the abstract grammar, so that
    //they can be extended and refined by aspects.
    
    Signature                 ::= SignatureList FlatSignatureList:SignatureList; 
    SignatureList             ::= SignatureLine*;
    abstract SignatureLine 	  ::= <Indent:int> <Comment:String>; 
    abstract DataSignatureLine : SignatureLine;
    ByteArraySignatureLine     : DataSignatureLine ::= <Data:byte[]>;
    IntSignatureLine           : DataSignatureLine ::= <Data:int>;
    StringSignatureLine        : DataSignatureLine ::= <Data:String>;
    TypeRefSignatureLine       : SignatureLine     ::= Decl;
    
    Field ::= Type <Name:String>;
    
    abstract Type;
    VoidType           : Type;
    //SampleRefType      : Type;
    PrimType           : Type ::= <Name:String> <Token:int>;
    UserType           : Type ::= <Name:String>;
    StructType         : Type ::= Field*;
    ParseArrayType     : Type ::= Type Dim*;
    abstract ArrayType : Type ::= Type Exp*;
    VariableArrayType  : ArrayType;
    FixedArrayType     : ArrayType;
    
    Dim ::= Exp*;
    
    abstract Exp;
    IntegerLiteral : Exp ::= <Value:String>;
    VariableSize   : Exp;