[11 - Antlr Parser] Add "CC-Praxis-Antlr Parser fuer X-Leer"
This commit is contained in:
@@ -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';
|
||||
Reference in New Issue
Block a user