grammer vs precedence table

Discussion in 'C++' started by Pallav singh, May 5, 2010.

  1. Pallav singh

    Pallav singh Guest

    Hi

    i have following grammer and predence table for operators
    should user be allowed to write expresion like

    not if ( expressiont ) property_expr

    ++++++++++++++++++++++++++++++++++++++++++
    GRAMMER
    ++++++++++++++++++++++++++++++++++++++++++
    property_expr ::=
    sequence_expr
    | ( property_expr )
    | not property_expr
    | property_expr or property_expr
    | property_expr and property_expr
    | sequence_expr |-> property_expr
    | sequence_expr |=> property_expr
    | if ( expression_or_dist ) property_expr [ else property_expr ]
    | property_instance
    | clocking_event property_expr

    ++++++++++++++++++++++++++++++++++++++++++
    lists the property operators from highest to lowest precedence and
    shows the associativity of the non-unary operators
    ++++++++++++++++++++++++++++++++++++++++++
    operators Associativity
    [*], [=], [->] —
    ## Left
    throughout Right
    within Left
    intersect Left
    not —
    and Left
    or Left
    if...else Right
    |->, |=> Right

    Thanks
    Pallav Singh
     
    Pallav singh, May 5, 2010
    #1
    1. Advertising

  2. Pallav singh

    osmium Guest

    Pallav singh wrote:

    > i have following grammer and predence table for operators
    > should user be allowed to write expresion like
    >
    > not if ( expressiont ) property_expr
    >
    > ++++++++++++++++++++++++++++++++++++++++++
    > GRAMMER
    > ++++++++++++++++++++++++++++++++++++++++++
    > property_expr ::=
    > sequence_expr
    >> ( property_expr )
    >> not property_expr
    >> property_expr or property_expr
    >> property_expr and property_expr
    >> sequence_expr |-> property_expr
    >> sequence_expr |=> property_expr
    >> if ( expression_or_dist ) property_expr [ else property_expr ]
    >> property_instance
    >> clocking_event property_expr

    >
    > ++++++++++++++++++++++++++++++++++++++++++
    > lists the property operators from highest to lowest precedence and
    > shows the associativity of the non-unary operators
    > ++++++++++++++++++++++++++++++++++++++++++
    > operators Associativity
    > [*], [=], [->] —
    > ## Left
    > throughout Right
    > within Left
    > intersect Left
    > not —
    > and Left
    > or Left
    > if...else Right
    >> ->, |=> Right


    I can't figure out what your question is, but if there is a perceived
    disagreement between grammar and precedence I would go with the grammar,
    hands down.
     
    osmium, May 5, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TLOlczyk

    Grammer for crappy HTML.

    TLOlczyk, Jul 2, 2004, in forum: HTML
    Replies:
    4
    Views:
    474
    Whitecrest
    Jul 2, 2004
  2. Venky
    Replies:
    0
    Views:
    557
    Venky
    Jun 27, 2005
  3. Colin King

    More amusing C grammer

    Colin King, Oct 10, 2005, in forum: C Programming
    Replies:
    5
    Views:
    934
    Dave Thompson
    Oct 17, 2005
  4. codefly

    basic grammer error..

    codefly, Dec 16, 2009, in forum: Python
    Replies:
    4
    Views:
    294
    Bruno Desthuilliers
    Dec 16, 2009
  5. trans.  (T. Onoma)

    [Funny] Proper grammer

    trans. (T. Onoma), Sep 19, 2004, in forum: Ruby
    Replies:
    0
    Views:
    109
    trans. (T. Onoma)
    Sep 19, 2004
Loading...

Share This Page