[ofa-general] Re: [PATCH] osm: QoS parser - fixing yacc command

Sasha Khapyorsky sashak at voltaire.com
Mon Sep 3 05:29:57 PDT 2007


On 15:12 Mon 03 Sep     , Yevgeny Kliteynik wrote:
>  Sasha Khapyorsky wrote:
> > On 01:34 Sun 02 Sep     , Yevgeny Kliteynik wrote:
> >>  Sasha Khapyorsky wrote:
> >>> Hi Ira,
> >>> On 15:55 Fri 31 Aug     , Ira Weiny wrote:
> >>>> We just ran into a problem with this patch applied.
> >>>>
> >>>> It seems that the output file is not y.tab.h but osm_qos_parser_y.h so 
> >>>> should
> >>>> the move be: mv -f osm_qos_parser_y.h 
> >>>> $(srcdir)/../include/opensm/osm_qos_parser_y.h
> >>> I applied this fix for now.
> >>>> weiny2 at woprjr0:~/OpenIB/git-trees/management/opensm/opensm
> >>>> 15:51:42 > ls *.h
> >>>> ls: *.h: No such file or directory
> >>>>
> >>>> weiny2 at woprjr0:~/OpenIB/git-trees/management/opensm/opensm
> >>>> 15:52:02 > bison -d -o ./osm_qos_parser_y.c -p__qos_parser_ 
> >>>> ./osm_qos_parser.y
> >>>>
> >>>> weiny2 at woprjr0:~/OpenIB/git-trees/management/opensm/opensm
> >>>> 15:52:21 > ls *.h
> >>>> osm_qos_parser_y.h
> >>>>
> >>>> weiny2 at woprjr0:~/OpenIB/git-trees/management/opensm/opensm
> >>>> 15:53:17 > bison --version
> >>>> bison (GNU Bison) 1.875c
> >>> I have bison-2.3 and similar results. With yacc-1.9.1 this line doesn't
> >>> work at all. The only "compatible" rules I found are:
> >>>  yacc -d -b osm_qos_parser -p __qos_parser_ ./osm_qos_parser.y
> >>> , or
> >>>  bison -y -d -b osm_qos_parser -p __qos_parser_ ./osm_qos_parser.y
> >>> , and then I get osm_qos_parser.tab.h and osm_qos_parser.tab.c files in
> >>> current directory.
> >>> Yevgeny! Is this could be useful?
> >>  How about dropping all these yacc/bison/lex/flex/version dependent 
> >> commands
> > Is this
> >   $(YACC) -d -b osm_qos_parser -p __qos_parser_ ./osm_qos_parser.y
> > yacc/bison/lex/flex/version dependent?
> 
>  I don't know whether the '-b' flag is yacc/bison version dependent,
>  but what do you gain by using it if the generated file should be moved
>  to another location anyway?

Then it should not be moved at all.

Sasha



More information about the general mailing list