public class PLParser extends Parser<Sentence>
Sentence -> AtomicSentence : ComplexStence
AtomicSentence -> True : False : P : Q : R : ... // (1)
ComplexSentence -> (Sentence) | [Sentence]
: ~Sentence
: Sentence & Sentence
: Sentence | Sentence
: Sentence => Sentence
: Sentence <=> Sentence
OPERATOR PRECEDENCE: ~, &, |, =>, <=> // (2)
Figure 7.7 A BNF (Backus-Naur Form) grammar of sentences in propositional
logic, along with operator precedences, from highest to lowest.A & B & C & D will be parsed as: (A & (B & (C & D)))
SourceVersion.isIdentifier(CharSequence)lookAheadBufferSize| Constructor and Description |
|---|
PLParser()
Default Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Lexer |
getLexer() |
protected Sentence |
parse()
To be implemented by concrete implementations of this class.
|
public Lexer getLexer()