Browsable Logic Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: markup/scientific/logic/concrete/extracted
Source used for this grammar: Jurgen Vinju, lang::logic::syntax::Booleans, 2011 [GitHub]
Source used for this grammar: Jurgen Vinju, lang::logic::syntax::Propositions, 2011 [GitHub]
Source used for this grammar: Jurgen Vinju, lang::logic::syntax::Truths, 2011 [GitHub]

Summary

Syntax

Formula ::=
	[not]::("!" [arg]::Formula)
Formula ::=
	[true]::"true"
Formula ::=
	[false]::"false"
Formula ::=
	[and]::([lhs]::Formula "&" [rhs]::Formula)
Formula ::=
	[or]::([lhs]::Formula "|" [rhs]::Formula)
Formula ::=
	[fi]::([lhs]::Formula "<=" [rhs]::Formula)
Formula ::=
	[if]::([lhs]::Formula "=>" [rhs]::Formula)
Formula ::=
	[iff]::([lhs]::Formula "<=>" [rhs]::Formula)
Formula ::=
	[id]::ε
False ::=
	"false"
False ::=
	"not" [t]::True
False ::=
	"(" False ")"
False ::=
	[lf]::False "and" [rt]::True
False ::=
	[lf]::False "and" [rf]::False
False ::=
	[lt]::True "and" [rf]::False
False ::=
	[lf]::False "or" [rf]::False
True ::=
	"(" True ")"
True ::=
	"true"
True ::=
	"not" [f]::False
True ::=
	[lt]::True "and" [rt]::True
True ::=
	[lt]::True "or" [rt]::True
True ::=
	[lt]::True "or" [rf]::False
True ::=
	[lf]::False "or" [rt]::True

GrammarLabMaintained by Dr. Vadim Zaytsev a.k.a. @grammarware. Last updated in September 2015. []