Equation := '(' 'equal' Expression Expression ')';
Expression := Var | AndEx | OrEx | NotEx;
NotEx := '(' 'not' Expression ')';
AndEx := '(' 'and' Expression+ ')';
OrEx := '(' 'or' Expression+ ')';
Var := 'x' | 'y' | 'z';
is probably the easiest complete one to build a parser for; if you want some other language (eg infix operators) then you need a more complicated parser; essentially the grammar morphs to
Equation := DisEx 'equal' DisEx;
DisEx := DisTerm ( 'or' DisTerm) *;
DisTerm := Var | ConEx | NotEx;
Var := 'x' | 'y' | 'z';
ConEx := ConTerm ( 'and' ConTerm ) +;
ConTerm := ExTerm | '(' Expression ')';
NotEx := 'not' ConTerm;
Which is harder to write a parser for.
> sorry my mistake i meant an equation of the type
> 2x - 3y = 3y + x
The term "boolean" in this context means that the elements in your expression are all booleans (i.e. true/false). 2 and 3 are certaintly not true/false valued. What your looking for is a parser for simple mathematical expressions. I'm sure you can find at least one example by searching the forums, or google will give plenty of examples.
Good luck.