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

  • SEARCH
  • Home
  • 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 8223299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:38:51+00:00 2026-06-07T14:38:51+00:00

I was trying many many time to solve this conflict. But I don’t know

  • 0

I was trying many many time to solve this conflict.

But I don’t know why occur conflict here.

2 conflicts occur at compliation time.

yacc(bison) error goes:

State 314 conflicts: 1 shift/reduce
State 315 conflicts: 1 shift/reduce

state 314
  7 c_complex_object_id: type_identifier .
  8                    | type_identifier . V_LOCAL_TERM_CODE_REF 

    V_LOCAL_TERM_CODE_REF  shift, and go to state 77
    V_LOCAL_TERM_CODE_REF  [reduce using rule 7 (c_complex_object_id)]
    $default                reduce using rule 7 (c_complex_object_id)

state 315
  127 c_integer_spec:     integer_value .
  184 ordinal:            integer_value . SYM_INTERVAL_DELIM V_QUALIFIED_TERM_CODE_REF
  201 integer_list_value: integer_value . ',' integer_value
  203                   | integer_value . ',' SYM_LIST_CONTINUE

    SYM_INTERVAL_DELIM  shift, and go to state 380
    ','                 shift, and go to state 200
    SYM_INTERVAL_DELIM  [reduce using rule 127 (c_integer_spec)]
    $default             reduce using rule 127 (c_integer_spec)

state 77
  8 c_complex_object_id: type_identifier V_LOCAL_TERM_CODE_REF .

    $default  reduce using rule 8 (c_complex_object_id)

state 380
  184 ordinal: integer_value SYM_INTERVAL_DELIM . V_QUALIFIED_TERM_CODE_REF

    V_QUALIFIED_TERM_CODE_REF  shift, and go to state 422

state 200
  201 integer_list_value: integer_value ',' . integer_value
  203                        | integer_value ',' . SYM_LIST_CONTINUE

    V_INTEGER          shift, and go to state 2
    SYM_LIST_CONTINUE  shift, and go to state 276
    '+'                     shift, and go to state 170
    '-'                     shift, and go to state 171

    integer_value  go to state 277

...

yacc source goes:

c_complex_object_id
    : type_identifier 
    | type_identifier V_LOCAL_TERM_CODE_REF 
    ; 

type_identifier
    : '(' V_TYPE_IDENTIFIER ')' 
    | '(' V_GENERIC_TYPE_IDENTIFIER ')' 
    | V_TYPE_IDENTIFIER 
    | V_GENERIC_TYPE_IDENTIFIER 
    ;

c_integer_spec
    : integer_value 
    | integer_list_value 
    | integer_interval_value 
    ; 

c_integer
    : c_integer_spec 
    | c_integer_spec ';' integer_value 
    | c_integer_spec ';' error 
    ; 

ordinal
    : integer_value SYM_INTERVAL_DELIM V_QUALIFIED_TERM_CODE_REF 
    ; 

integer_list_value
    : integer_value ',' integer_value 
    | integer_value ',' SYM_LIST_CONTINUE 
    ; 

integer_value
    : V_INTEGER
    | '+' V_INTEGER
    | '-' V_INTEGER
    ;

I have two problems above. What’s wrong with it?

  • 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-07T14:38:52+00:00Added an answer on June 7, 2026 at 2:38 pm

    Let’s consider the messages from the first shift/reduce conflict. You can read the period (".") as a pointer. What the message says, more or less in English, is

    "When I’m in state 299, and I have recognized a type_identifier, I must decide whether to reduce by rule 7 (recognize c_complex_object_id : type_identifier) or to shift to state 63 (continue scanning for a V_LOCAL_TERM_CODE_REF)."

    Usually a conflict like this comes about when the production not yet recognized (V_LOCAL_TERM_CODE_REF) is optional.

    Your definition of the tokens V_LOCAL_TERM_CODE_REF, etc. looks OK as far as I can tell from your comment.

    It’s hard to diagnose this further without seeing the yacc diagnostic output for state 63. Could you edit your question to show the output for state 63? It might tell us something.

    I found some lecture notes by Pete Jinks that might be useful background for you. You might also read some of the other questions listed in the right column of this page, under the "Related" heading.

    Update

    In one way, you are correct: a shift/reduce conflict can be ignored. bison/yacc will produce a parser that runs, that does something. But it is important to understand why you are ignoring a specific conflict. Then you will understand why the parser, when presented with an input program, parses it the way it does and produces the output that it does. It is not good to say, "oh, this is too complex, I can’t figure it out."

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having the toughest time trying to solve this issue at work. I don't
I've been trying many techniques.. but none helped. I tried margin-bottom: 1em, bottom: 2em,
I'm new to this community, but I've found it really useful time to time.
I was trying to solve this Project Euler Question . I implemented the sieve
I have spent all day trying to solve this with no satisfying results. I
I'm trying to figure the best approach to solve this problem. -- I have
I'm trying to create proper header files which don't include too many other files
I'm trying many time to install Adobe AIR. Normal : Error said... An error
I certainly can't solve this problem by myself after a few many days already
I'm trying to solve a problem, where I have many (on the order of

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.