Commit e5d36a8c authored by Sven Robertz's avatar Sven Robertz
Browse files

added abstract grammar

parent 58ee65c5
......@@ -253,6 +253,35 @@ way of supporting the common cases is to include run-time checks for overflow in
and decoders.
\section{The LabComm language}
\subsection{Abstract syntax}
Program ::= Decl*;
abstract Decl ::= Type <Name:String>;
TypeDecl : Decl;
SampleDecl : Decl;
Field ::= Type <Name:String>;
abstract Type;
VoidType : 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;
\section{The LabComm protocol}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment