answersLogoWhite

0


Best Answer

The grammar is said to be operator precedence grammar, if its right hand side of its production should not have the Empty production or two non-terminal should not be adjacent to each other, then we call it as operator precedence grammar The grammar is said to be operator precedence grammar, if its right hand side of its production should not have the Empty production or two non-terminal should not be adjacent to each other, then we call it as operator precedence grammar

User Avatar

Wiki User

16y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you Know if a grammar is an operator precedence grammar?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you evaluate an expression in hierarchy of operations?

Expressions are evaluated according to the language grammar. Operator precedence and associativity are derived from the grammar in order to aid our understanding, however the order of evaluation is independent of both because the C language standard does not specify operator precedence. The general arithmetic rules of precedence hold for most expressions such that parenthesised operations take precedence over orders followed by multiplication/division operations and finally addition/subtraction operations (as per the PODMAS acronym). Many of the more complex expressions we encounter can generally be evaluated according to the operator precedence table, which includes the associativity, such that operations with higher precedence are bound more tightly (as if with parenthesis) than those with lower precedence.


How can you compare precedence of operators in programming of conversion of infix to postfix?

Each operator has a certain precedence level, usually some numeric value. As you parse the expression, you compare the precedence of each operator with the precedence of the last operator, and you either generate code or you push the operator and its operand(s) on two stacks.


Logical or operator can be compared to what in terms of precedence?

The logical OR operator can be compared to ____ in terms of precedence.


What is precedence between relational operator and arithmetic operator?

Arithmetic operators (+, -, *, /, % ) have greater precedence over relational operators (<, >, <=, >=, ==, !=) in C language.


What is the order of precedence with regard to the operator used in embedded C program?

Operator precedence in embedded C is exactly the same as in standard C.


What pair of brackets can be used to override the precedence of the operators in Excel?

Parentheses or round brackets ( and ) override operator precedence.


What is the C plus plus expression and operator precedence?

Precedence is determined by operators only. Every operator has a precedence in the range 1 through 17, where 1 has the highest precedence. All precedences have left-to-right associativity except 3 and 15 which are right-to-left. Precedence 1: scope-resolution operator Precedence 2: postfix increment/decrement, function-style type cast, function call, array subscripting and selection by reference or pointer. Precedence 3: prefix increment/decrement, unary plus/minus, logical and bitwise NOT, C-style cast, dereferencing, address-of, sizeof, new/new [] and delete/delete []. Precedence 4: pointer to member. Precedence 5: multiplication, division and modulo. Precedence 6: addition and substraction. Precedence 7: bitwise left/right shift. Precedence 8: relational operators (<, <=, > and >=). Precedence 9: equal/not equal operators (= and !=) Precedence 10: bitwise AND Precedence 11: bitwise XOR Precedence 12: bitwise OR Precedence 13: logical AND Precedence 14: llogical OR Precedence 15: ternary conditional, assignment and compound assignment. Precedence 16: throw Precedence 17: comma


Which arithmetic operator have highest precedence?

In all popular high-level programming languages, the order in which operators are interpreted ("operator precedence") is vital to ensuring that all compilers execute instructions in precisely the same manner, as the "order of operations" rule is vital in mathematics. In the case of C and C++, arithmetic operators are executed prior to logic operators. For a detailed description of operator precedence, see the related links below.


What is your primary argument against the operator precedence rules of APL?

I m also looking for this Answer.. Thank you


How many operators in c?

Quite a few. Some of them are: , () [] & * . -> + ++ += - -- -= * / % *= /= %= ! == <= >= < > != << >> >>= <<= & | ^ ~ &&


Associativity has no role to play unless the precedence of operator isHow much memory is required to store a value of type double?

yes


What is operator precedence in c programming?

Operator precedence is often associated with order of evaluation, however order of evaluation and operator precedence are actually undefined in C. Expressions may be evaluated in any order while operator precedence is derived from the language grammar. The concept of operator precedence merely simplifies our understanding. When we think of operator precedence we can imagine a table with 15 rows. When parsing an expression, any operator on a given row takes precedence over those on lower rows. If we also number the rows in ascending order then we can associate each row with a precedence level, such that level 1 has the highest precedence and lower rows have lower precedence. In addition to precedence, each row also has an associativity. Rows 2, 13 and 14 have right-to-left associativity while all others have left-to-right. For instance, the assignment operator appears on row 14 thus the expression a=b=c is evaluated as if it were actually written a=(b=c) rather than (a=b)=c.