Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8206827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:48:20+00:00 2026-06-07T08:48:20+00:00

I faced conflict problem during yacc compilation. Error message below: 24: shift/reduce conflict (shift

  • 0

I faced conflict problem during yacc compilation.

Error message below:

24: shift/reduce conflict (shift 66, reduce 99) on '/'
state 24
arithmetic_leaf : absolute_path .  (99)
absolute_path : absolute_path . '/' relative_path  (102)

Code below:

arithmetic_leaf:  '(' arithmetic_expression ')'
    {
    }
| integer_value
    {
    }
| real_value
    {
    }
| absolute_path
    {
    }
;

absolute_path: '/'
    {
    }
| '/' relative_path
    {
    }
| absolute_path '/' relative_path
    {
    }
;

relative_path: path_segment
    {
    }
| relative_path '/' path_segment
    {
    }
; 

path_segment: V_ATTRIBUTE_IDENTIFIER V_LOCAL_TERM_CODE_REF
    {
    }
| V_ATTRIBUTE_IDENTIFIER '[' V_ARCHETYPE_ID ']'
    {
    }
| V_ATTRIBUTE_IDENTIFIER
    {
    }
; 

At this point, ‘shift/reduce’ conflict will occur.

I don’t know what is the problem. How to solve this conflict?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T08:48:22+00:00Added an answer on June 7, 2026 at 8:48 am

    The conflict (appears to me) to be between the alternatives for absolute_path.

    It appears that a string like '/a/b will match either the absolute_path '/' relative_path rule, or the '/' relative_path rule.

    At least to me, it looks like you just want to eliminate one of the two. I’d probably write it as:

    absolute_path: '/'
                 | '/' relative_path
                 ;
    

    Alternatively, it might make more sense to allow a relative_path to just be an empty string, in which case, you could end up with something like:

    absolute_path: '/' relative_path
                 ;
    
    relative_path:
                 | path_segment
                 | relative_path '/' path_segment
                 ;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I faced a problem while using threading for the first time, In an SWT
I faced a problem - I need to use a macro value both as
I faced a problem regarding loading ResourceBundle at server-side on Seam 2.2 application. In
I faced the error when I tried to capture the POST data from a
i faced a problem while replaying a script created for yahoomail page.The XPath statement
I faced a following problem: generate N unique alphanumeric strings from a restricted alphabet.
I faced a mistake in the code below: if (folderBrowserDialog1->ShowDialog() == DialogResult::OK ) {
I faced a problem in Visual studio 2008.When i click on Sorce Control Explorer(Views->
i faced a lot of problem while comparing two NSDate with different format though
I faced a new problem. I'm writing a messenger in Java+Swing and I chose

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.