Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about ambiguous-grammar

Read more about ambiguous-grammar

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)

Questions - ambiguous-grammar

Bison reduce/reduce conflict between lambda expression and parenthesized identifier

I'm attempting to write my own programming language at the moment, and I have the following simplified grammar: ... %% prog: stmtlist | %empty; block: "{" stmtlist "}"; stmtlis...
test-img

jinscoe123

grammar

bison

ambiguous-grammar

reduce-reduce-conflict

Votes: 0

Answers: 1

Latest Answer

It's not really an ambiguity. As far as I can see, your language is unambiguous. However, the grammar is not deterministic when restricted to a single lookahead token. The extremely useful counterexam...
test-img

rici

Preferring shift over reduce in parser for language without statement terminators

I'm parsing a language that doesn't have statement terminators like ;. Expressions are defined as the longest sequence of tokens, so 5-5 has to be parsed as a subtraction, not as two statements (liter...
test-img

Moritz Mahringer

parsing

rust

grammar

lr

ambiguous-grammar

Votes: 0

Answers: 1

Latest Answer

The issue you're going to have to confront is how to deal with function calls. I can't really give you any concrete advice based on your question, because the grammar you provide lacks any indication ...
test-img

rici

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved