User Profile

Collapse

Profile Sidebar

Collapse
nina01
nina01
Last Activity: Feb 25 '09, 10:55 PM
Joined: Jan 21 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • nina01
    replied to error: field has incomplete type
    in C
    yes. This is the way we declare a union at bison. In fact, I got it from an exemple I found in a book about flex and bison.
    See more | Go to post

    Leave a comment:


  • nina01
    replied to error: field has incomplete type
    in C
    Thanks donbock for your reply.
    I've tried removing the "typedef" but the error remains the same.
    When I let the "typedef" and remove the "enum" (in "typeval" definition) I start getting too many errors.
    I don't know what I'm doing wrong...
    See more | Go to post

    Leave a comment:


  • nina01
    replied to error: field has incomplete type
    in C
    First of all, thanks for your reply...
    I don't think this is due to cygwin because the program compiled without any problem before I added that enum. :-(
    See more | Go to post

    Leave a comment:


  • nina01
    started a topic error: field has incomplete type
    in C

    error: field has incomplete type

    Hi everybody!!
    I'm actually trying to construct a compiler with flex and bison. But when I try to compile the"lex.yy.c" file on cygwin I keep having this error:

    Code:
    $gcc -c lex.yy.c
    In file included from Simple.l:4
    Simple.y:60: error: field 'typeval' has incomplete type
    In fact, typeval's type is an enum 'type' that I've defined in 'ST.h':
    Code:
    typedef enum type type;
    enum
    ...
    See more | Go to post

  • nina01
    replied to error: expected identifier before ‘(’ token
    in C
    I've renamed the token and now it works.
    Thanks for all those who replied to my question!
    See more | Go to post

    Leave a comment:


  • nina01
    replied to error: expected identifier before ‘(’ token
    in C
    Hi again,
    In fact I removed the lines "EOF=272" & "#define EOF 272" and the error disappeared... I guess there was a name collision or something like that...
    See more | Go to post

    Leave a comment:


  • nina01
    started a topic error: expected identifier before ‘(’ token
    in C

    error: expected identifier before ‘(’ token

    Hi!
    I'm working on a mini compiler with flex and bison. The ".l" and ".y" files are generated successfully. However, when I try to compile the hole thing using the command "gcc -o comp comp.tab.c lex.yy.c ", I keep having this error :-(

    In file included from comp.l:4:
    comp.tab.h:56: error: expected identifier before ‘(’ token


    It's supposed to be a syntax error but I honestly...
    See more | Go to post
    Last edited by pbmods; Jan 23 '09, 11:03 PM. Reason: Added CODE tags.
No activity results to display
Show More
Working...