python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
ANTLR4 Best practice on token ambiguities: Lexer predicate, or Parser tree walker
I have a question about a certain ambiguity I am encountering in a grammar I am currently working on. Here is the problem, in brief. Consider these two inputs:
1010
0101
In isolation, in my grammar t...
natem
Votes: 0
Answers: 0
Why isn't Kotlin complaining about ambiguity? And why is it calling the secondary constructor?
I was testing something in Kotlin and now I won't be able to sleep properly if I don't find an answer.
Look at this class:
data class Person(
val name: String,
val age: Int? = 0
) {
constr...

Gabriel Guedes
Votes: 0
Answers: 3