hubFS: THE place for F#

. . . are you on The Hub?
Welcome to hubFS: THE place for F# Sign in | Join | Help
in Search

New to Grammar

Last post 02-28-2008, 21:49 by Mee. 0 replies.
Sort Posts: Previous Next
  •  02-28-2008, 21:49 5055

    New to Grammar

    Hi all,

    I am new to Functional programming and trying to see things around. I came across with this BNF grammar defining expressions with operators (x,-, and +) and variables a, b, c, and d.

    <expr>  ::= <thing>| <thing>x<expr>

    <object> ::=<element>|<element> - <object>

    <thing> ::=<object> |<thing>+<object>

    <element>::= a|b|c|d

    How can I get the order of precedence for the operators and also display parse tree for

    a x b – c + d ?

    In addition would you mind explaining me about the operator precedence and rules to be followed in constructing syntax tree?

    Thank you very much in advance,

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems