Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Questions about ambiguity in context-free grammars.
3
votes
Why ambiguous grammars are allowed for operator precedence parser?
An operator precedence parser usually has no ambiguity at all. However, the evaluation order is not determined by the parse tree, but by the operator precedences and associativities. …
12
votes
How do C compilers distinguish casting from grouping?
They can easily be distinguished by a compiler: In the first case, the thing in parentheses is a type, in the second case it isn’t.
Now if you insist on parsing based on a grammar only, that may be a …
1
vote
Big O vs Big $\Theta$ during coding interview
If you mention big-theta many interviewers will think you are wrong because they never heard of it. If you then start debating it, then you fail at what the interview is primarily about: Convincing th …
2
votes
How to prove that Ambiguity is still present in Resolved Production of Dangling Else Problem?
That's what's happened here: The compiler says "in case of ambiguity we decide to use one parse tree and not the other". That makes the language created by grammar + compiler rules unambiguous. …
0
votes
Is there a different resolution of the "dangling else" problem other than "match closest"?
Take a+b+c+d+e and a-b-c-d-e. There are two obvious ways how a grammar could parse these, but there is one way that we use.
In the case of the "dangling else", that's not actually how people look at …