Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Erik Jansson
LabComm
Commits
e5d36a8c
Commit
e5d36a8c
authored
May 17, 2013
by
Sven Robertz
Browse files
added abstract grammar
parent
58ee65c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
doc/tech_report.tex
View file @
e5d36a8c
...
...
@@ -253,6 +253,35 @@ way of supporting the common cases is to include run-time checks for overflow in
and decoders.
\appendix
\section
{
The LabComm language
}
\label
{
sec:LanguageGrammar
}
\subsection
{
Abstract syntax
}
\begin{verbatim}
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;
\end{verbatim}
\section
{
The LabComm protocol
}
\label
{
sec:ProtocolGrammar
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment