hi

here is BNF grammer.Can anybody help me to understand it.

<bool exp> -> <bool term> { "&" <bool term>}

<bool exp> -> "!" "(" <bool exp> ")"

<bool exp> -> <relation> { "|" <relation>}
<relation> -> <exp> ("=" | "<" | ">") <exp>
<exp> -> <term> {"+" <term> | "-" <term>}
<term> -> <factor> { "*" <factor> | "/" <factor>}
<factor> -> <number> | "(" <exp> ")"

here.inside double quote marks are terminals symbols,but | alone is a meta-symbol in the grammer.

The last line <factor> -> <number> | "(" <exp> ")"
says that a <factor> is a <number> or a <exp> enclosed in brackets.
The line <term> -> <factor> { "*" <factor> | "/" <factor>} means that a <term> is a <factor> followed by zero or more <factor> things which are preceded by a * or / sign.
With this you should be able to find the rest yourself, otherwise : google BNF grammar.

Is this even C#?

Is this even C#?

No it isn't...

Then why is it in the C# Forum?

Cave ab homine unius libri.
There is to my knowledge no forum on BNF so he might as well have posted it here.

Yeah I guess!

Nice snippet. Why use unsafe code?

Thanks!

I saw some snippets using unsafe code for Image Manipulation. When I compared the two Images the method using the unsafe code looked better.

Can be. Why not use assembler then, it will look even better.

What do you mean by assembler?

You must be joking if you never heard the word "assembler"

I just wanted to know which one(s)! Sorry for the poor wording. I've never made / used an assembler, but I know what one is.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.