Menu

#173 bison: m4: Invalid argument

Bison
closed
GnuWin
Binaries (396)
5
2014-10-22
2004-09-10
Anonymous
No

I am getting the error message

"bison: m4: Invalid argument" when i try to generate
parser file. i ma kinda stuck here, do not know whats the
problem is i searched all existing bugs no mention about
this

Let me know if i am missing some thing

Installation info: I downloded the binaries zip file and
unzipped to a folder and updated the path for bison bin
folder

Thanks,
Basavaraj
basavaraj_kn at source forge dot net

Discussion

  • Basavaraj

    Basavaraj - 2004-09-10

    Logged In: YES
    user_id=669945

    Submitted by me

     
  • GnuWin

    GnuWin - 2004-09-17

    Logged In: YES
    user_id=217802

    1) What are the version number and the date of the binaries
    bison.exe and m4.exe?
    2) What is the command line that fails?

     
  • Nobody/Anonymous

    Logged In: NO

    Version: bison (GNU Bison) 1.875

    here is the command line invoking and its failing with error
    message

    c:\work\parser\bison -d -osqlparser_y.c sqlparser.y
    bison: m4: Invalid argument

    Binaries dates:
    bison.exe 251 KB created: 10-Jul-04 3.42.38 PM
    m4.exe 138 KB created: 10-Jul-04 4.19.44 PM

    Let me know if you need any more information

    Thanks,
    BAS

     
  • GnuWin

    GnuWin - 2004-09-22

    Logged In: YES
    user_id=217802

    I can't reproduce this problem. Can you upload (see 'Check to
    Upload ...' below) a small .y file that results in this error?

    Also, does the error occur when you don't give the whole
    path to bison on the command line (for this to work, bison
    and m4 must be in a directory that's in your Path)?

     
  • Basavaraj

    Basavaraj - 2004-09-23

    Logged In: YES
    user_id=669945

    i don't see upload button

     
  • GnuWin

    GnuWin - 2004-09-23

    Logged In: YES
    user_id=217802

    You should login to Sourcefore, first.

     
  • Basavaraj

    Basavaraj - 2004-09-28

    Logged In: YES
    user_id=669945

    Even after loging in with my sourceforge id i did not see any
    update button or link, i am pasting my test grammer here
    below.

    / begingin of test.l file /

    %{

    include <stdio.h>

    include <stdlib.h>

    int mylineno = 0;
    %}

    %%
    . { printf ("Token: %s\n", yytext); }

    %%

    int yywrap ()
    {
    return 1;
    }

    void yyerror (char* str)
    {
    fprintf (stderr, "%s", str);
    }

    / end of test.l file /

    / begining of test.y file /
    %{

    include <stdio.h>

    include <stdlib.h>

    extern int yylex ();
    extern int yywrap ();
    extern void yyerror (char*);

    %}

    %token LEX_TOKEN

    %start token

    %%

    token : LEX_TOKEN { printf ("token parsed\n"); }

    %%

    extern yyparse ();

    int main ()
    {
    yyparse ();
    }

    / end of test.y file /

    command line to generate scanner and parser code.

    bison -d -otest_y.c test.y <--- m4 invalid argument error

    if i copy m4.exe to local folder and execute the above
    command it generates without any problem

     
  • GnuWin

    GnuWin - 2004-09-28

    Logged In: YES
    user_id=217802

    Just above the 'Submit changes' button at the bottom of this
    page, I see:

    Check to Upload and Attach a File:(?)
    Browse...
    File Description:

    Attached Files:
    Name Description Download
    No Files Currently Attached

     
  • GnuWin

    GnuWin - 2004-09-28

    Logged In: YES
    user_id=217802

    Most likely then, you have another m4 in your path
    environment variable before the gnuwin32 one that
    accompanies bison. Check this carefully. If direct inspection
    does not yield any result, then use the command 'which -a
    m4' (http://gnuwin32.sourceforge.net/packages/which.htm).

     
  • Anonymous

    Anonymous - 2014-10-22

    Microsoft Windows [Version 10.0.19042.985]
    (c) Microsoft Corporation. All rights reserved.

    C:\Users\Chaitanya>cd Desktop

    C:\Users\Chaitanya\Desktop>cd flex_program

    C:\Users\Chaitanya\Desktop\flex_program>bison -d ass9.y
    bison: m4: Invalid argument

    C:\Users\Chaitanya\Desktop\flex_program>which -a m4
    'which' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Users\Chaitanya\Desktop\flex_program>

     

    Last edit: Anonymous 2021-05-20