master > master: codego - Grammatik
This commit is contained in:
parent
c48f703744
commit
4be6896a0f
@ -1,7 +1,9 @@
|
||||
grammar aussagenlogik;
|
||||
|
||||
// Standardtokens:
|
||||
NUMBER: [0-9]+;
|
||||
NUMBER: [0-9];
|
||||
ZERO: ~[a-zA-Z0-9][0]; // negatives Look-Behind nötig, um konfliktierendes Lexing zu vermeiden
|
||||
ONE: ~[a-zA-Z0-9][1]; // ""
|
||||
WHITESPACE: [ \r\n\t]+ -> skip;
|
||||
LBRACE: '(';
|
||||
RBRACE: ')';
|
||||
@ -24,9 +26,9 @@ open: and2 | and | or2 | or | implies | iff;
|
||||
|
||||
// Schemata für atomische Ausdrücke
|
||||
atomic: taut | contradiction | atom | generic;
|
||||
taut: ('1'|'true');
|
||||
contradiction: ('0'|'false');
|
||||
atom: 'A0' | 'A1' | 'A' NUMBER; // muss A0, A1 wegen falsum/verum extra auflisten
|
||||
taut: (ONE|'true');
|
||||
contradiction: (ZERO|'false');
|
||||
atom: 'A' NUMBER+;
|
||||
// als 'generische' Formeln schreibe bspw. {F}, {G}, usw.
|
||||
generic: LCURLYBRACE TEXT+ RCURLYBRACE | LCURLYBRACE TEXT* ( generic TEXT* )+ RCURLYBRACE;
|
||||
// FIXME: liest Zahlen schlecht ein
|
||||
|
Loading…
Reference in New Issue
Block a user