Menu

yyparse function in jsgf.h and jsgf_parser.h

Help
Halle
2010-09-29
2012-09-22
  • Halle

    Halle - 2010-09-29

    Hi Nickolay,

    I have an OpenEars user who is getting a build error from the YACC header
    y.tab.h being linked as well as jsgf_parser.h since both of them have a
    function named yyparse -- I'm not sure why y.tab.h is being linked in his
    project and not any of my test projects, but I think that is OpenEars' problem
    and not yours :) . It is probably related to Xcode using GCC which uses Bison
    which contains y.tab.h.

    My quick question for you: One workaround for this issue would be to change
    the name of the yyparse function in the sphinxbase files jsgf.c and
    jsgf_parser.c which are the only places in which yyparse is referenced that
    OpenEars links to, but I wanted to ask whether you thought this could have any
    unforeseen consequences (besides the obvious one that it will also have to be
    changed for all future OpenEars implementations of sphinxbase and in any other
    sphinx files which may start referring to sphinxbase's yyparse in the future).
    Is there some kind of interaction between jsgf.h/jsgf_parser.h and YACC/Bison
    that I'm not seeing such that it's important for the function in the
    sphinxbase source to be named with the same name as the same function in
    y.tab.h?

    Thanks for any advice on this.

     
  • Nickolay V. Shmyrev

    Hello

    I think this file yy.tab.c is built with Xcode which finds yacc file
    (jsgf_parser.y) and automatically invokes yacc without
    proper options. It shouldn't do that. Is there any way to disable this feature
    inside xcode project?

     
  • Halle

    Halle - 2010-09-29

    OK, that would be a lot more graceful -- I'll figure out how to get it to
    ignore the presence of the .y file, I suspect that I can just change the file
    properties inside of the static library project or whether it is part of the
    target or not. Thanks!

     
  • Halle

    Halle - 2010-09-30

    Turned out that it only automatically invokes YACC if extra non-specified
    build options are set, so there isn't anything to fix.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.