[11 - Antlr Parser] Add "CC-Praxis-Antlr Parser fuer X-Leer"

This commit is contained in:
2020-05-27 11:23:21 +02:00
parent 7863777f8f
commit 7d7b787c80
15 changed files with 1568 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
/* **********************************************
* Duale Hochschule Baden-Württemberg Karlsruhe
* Prof. Dr. Jörn Eisenbiegler
*
* Vorlesung Übersetzerbau
* Praxis ANTLR-Parser für X
* - Grammatik für Scanner und Parser
*
* **********************************************
*/
grammar X;
options {
language = Java;
output = AST;
}
// AST-Tokens
tokens {
DECL;
STATLIST;
DECLLIST;
UMINUS;
}
@parser::header {package de.dhbw.compiler.antlrxparser;}
@lexer::header {package de.dhbw.compiler.antlrxparser;}
INVALID: .;
program: 'TODO';