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 6869873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:36:45+00:00 2026-05-27T03:36:45+00:00

When I run bison -d myfile.y it gives the following error: bison: m4: Invalid

  • 0

When I run bison -d myfile.y it gives the following error: bison: m4: Invalid argument. I think the problem is operator precedence but still I can’t resolve the problem. The Make* functions create propositional logic expressions.

yacc file:

%{
#include "global.h"
#include "PLResolution.h"
%}

%token END
%token LEFT_PAREN RIGHT_PAREN
%token BICOND
%token FORWARD_IMPLIC BACKWARD_IMPLIC 
%token OR
%token AND
%token NOT 
%token identifier

%left BICOND
%left BACKWARD_IMPLIC
%left FORWARD_IMPLIC
%left OR
%left AND
%left NOT

%start Input
%%
Input:
/* Empty */
| Input Line
;
Line:
END
| Sentence END
;
Sentence:
AtomicSentence
| ComplexSentence
;
AtomicSentence:
identifier {$$=MakeAtomicSentence($1);}
;
ComplexSentence:
LEFT_PAREN Sentence RIGHT_PAREN
| NOT Sentence {$$=MakeNotSentence($1);}
| Sentence AND Sentence {$$=MakeAndSentence($1, $2);}
| Sentence OR Sentence {$$=MakeOrSentence($1, $2);}
| Sentence FORWARD_IMPLIC Sentence {$$=MakeForwardIMPLIC($1, $2);}
| Sentence BACKWARD_IMPLIC Sentence {$$=MakeBackwardIMPLIC($1, $2);}
| Sentence BICOND Sentence {$$=MakeBICOND($1, $2);}
;
%%
int yyerror(char *s) {
    printf("%s\n",s);
}
int main(void) {
    yyparse()
}
  • 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-05-27T03:36:46+00:00Added an answer on May 27, 2026 at 3:36 am

    The generated code on my platform is unlikely to work for you. However, I found this link which describes similar problems other people have had on Vista with bison and m4. Perhaps the suggested fix will work for you too? It seems to involve copying the m4 binary to the local directory.

    EDIT: and just in case you don’t get it to work, I’ve uploaded the two generated files for you: prop.tab.cc prop.tab.hh. Not sure if they will work at all, but maybe it’ll help.

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

Sidebar

Related Questions

Run jsLint on this fiddle . The script runs, but what is jsLint telling
did anybody worked on flex and bison?? i have an example of them.i run
Run into a rather interesting problem. An element generated as html and inserted into
Run the following in Windows: java -version:1.5+ echo %ERRORLEVEL% If you run it with
run(/test.js) in mongo shell. i always get error run(/test.js) shell: started program /test.js sh2516|
I run into a small problem (Not surprisingly, 'cause I've just started with xcode).
I run into what seems to be a very classical problem: An item and
I run into following code in my project: html: <input type=button id=addmore value=Add more
I run an XPath in Java with the following xml and code: <?xml version=1.0
Run into a tricky problem with db4o and a simple nested structures. Problem: when

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.