Ambiguity can refer to two related concepts: 'ambiguous calls' and 'ambiguous grammars'.
Questions tagged [ambiguity]
400 questions
1
vote
2 answers
Problems with LL(1) grammar
I have a 26 rule grammar for a sub-grammar of Mini Java. This grammar is supposed to be non-object-oriented. Anyway, I've been trying to left-factor it and remove left-recursion. However I test it with JFLAP, though, it tells me it is not LL(1). I…

Milad Naseri
- 4,053
- 1
- 27
- 39
1
vote
1 answer
Sending POST parameters with Python using Mechanize
I want to fill out this form using Python:
1
vote
2 answers
How do I solve this reduce/reduce conflict in Bison?
Here is an excerpt from [filename].output
state 94
32 expr: expr . opt_at_type '.' TYPEID '(' opt_expr_list ')'
39 | expr . '+' expr
40 | expr . '-' expr
41 | expr . '*' expr
42 | expr . '/' expr
42 | expr…

Alexander Suraphel
- 10,103
- 10
- 55
- 90
1
vote
2 answers
Optimal ambiguity resolving
I am trying to resolve how to handle ambiguities in ANTLR.
I need to parse identifiers or identifiers with size prefix correctly.
First I came up to this buggy grammar
grammar PrefixProblem;
options
{
language = Java;
}
goal:…

Overdose
- 1,470
- 3
- 16
- 29
0
votes
0 answers
Resolve conflicts between different versions of the same dependent assembly
I am developing with VS 2010 a web site project in C# and target framework is: .NET Framework 3.5.
In the warning tab of Visual Studio, I get the following message, while building the…

Francesco
- 9,947
- 7
- 67
- 110
0
votes
1 answer
ASP.NET MVC error: The call is ambiguous between the following methods or properties
I have a problem.
In my View of a product I have a button to add it to cart which looks like this:
<% using(Html.BeginForm("AddToCart", "Cart")) {%>
<%: Html.HiddenFor(x => x.id_produktu) %>
<%: Html.Hidden("returnUrl",…

Lord_Blizzard
- 25
- 2
- 9
0
votes
1 answer
Why a non-member == operator overloading needed when using a std::pair as a std::unordered_map key
In the below example I have overloaded the conversion functions for uint8_t and bool. And used a pair as the map key with boost::hash.
There was a previous error ambiguity in conversion of 'const Mem' to 'float' (not sure why it's requesting a Mem…

Nalaka Rajamanthri
- 159
- 11
0
votes
2 answers
How to solve overload resolution ambiguity for calling generic overloaded Java class from Kotlin
I try to call a custom Java collection from Kotlin, which implements an add(long value) method in this way:
public class SomeSet {
public void add(int value) { }
public void add(long value) { }
public void add(T value) { …

Tobse
- 1,176
- 1
- 9
- 22
0
votes
1 answer
Euler angles change when using as_euler after from_euler
Could you explain what is happening here?
from scipy.spatial.transform import Rotation as R
euler_angles1 = [ -150, -180, -120 ]
rotation1 = R.from_euler("xyz",…

DavidBoja
- 21
- 1
- 3
0
votes
2 answers
Ambiguous embeding of images in ActionScript3
I get this error
PlayButton.as: Error: Can not resolve a multiname reference unambiguously.
PlayButton_PlayHoverImg (from PlayButton_PlayHoverImg.as) and
buttons:PlayButton_PlayHoverImg (from buttons\PlayButton_PlayHoverImg.as) are…

Vlad
- 2,739
- 7
- 49
- 100
0
votes
0 answers
can anyone tell why its giving me the 'ambiguous' error?
I was writing a code for operator overloading and when i was writing i was getting a constant ambiguity error whenever I used the name of the class outside the class.It said that the name is ambiguous,and i have tried many things but couldnt…

Kartikay Azad
- 1
- 1
0
votes
0 answers
Python bypassing @property getter methods ambiguity
I know that this is a badly written code. But why does this behave this way?
class A:
def __init__(self, f, l):
self.first = f
self.last = l
@property
def first(self):
return self._first
…

arjunsiva
- 315
- 2
- 13
0
votes
1 answer
Removing ambiguity in a grammar
I have a grammar with one production rule:
S → aSbS | bSaS | ∈
This is ambiguous. Is it allowed to remove the ambiguity this way?
S → A|B|∈
A → aS
B → bS
This makes it unambiguous.
Another grammar:
S → A | B
A → aAb | ab
B → abB | ∈
Correction to…

Millennial
- 79
- 7
0
votes
1 answer
Dealing with ambiguity in BNF grammar
I'm trying to build a parser for a DSL I'm building using Irony in .NET and found a problem I can't find a way around. Since it handles BNF I think that any BNF solution will be of help.
I have the following input:
$10 yesterday at drug store…

tucaz
- 6,524
- 6
- 37
- 60
0
votes
0 answers
Why should the access of member of A in inheritance chain D->B,C->A cause ambiguity?
I tried to compile the following code
struct A{
int a;
};
struct B : A{};
struct C : A{};
struct D: B,C{
void f(){
++B::A::a;
}
};
int main()
{}
The compilation of this code resulted in ambiguity error in both clang and gcc.…

Karen Baghdasaryan
- 2,407
- 6
- 24