免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1008 | 回复: 0
打印 上一主题 下一主题

[Linux资讯] 各位大神,请教一个问题,我在AIX服务上面安装gdb不成功遇到了下面的问题,怎么破? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-11-23 19:32 |只看该作者 |倒序浏览
我安装的gdb版本是:gdb-7.7.1  
aix版本:AIX bomcht4 1 6 00C72F964C00
gcc:Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++,java --prefix=/opt/freeware --enable-threads --enable-version-specific-runtime-libs --host=powerpc-ibm-aix6.1.0.0 --target=powerpc-ibm-aix6.1.0.0 --build=powerpc-ibm-aix6.1.0.0 --disable-libjava-multilib
Thread model: aix
gcc version 4.2.


在make的时候遇到了yacc的错误,看不懂了。
Target "all" is up to date.
        rm -f stamp-h1
        /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
        test -f config.h || (rm -f stamp-h1 && make stamp-h1)
        yacc -b prefix=__gettext -p plural.c plural.y

yacc: 1285-742 The escape is not valid or pure_parser is not a reserved word. Line 46
make: 1254-004 The error code from the last command is 1.


Stop.
make: 1254-004 The error code from the last command is 2.


Stop.
make: 1254-004 The error code from the last command is 2.


Stop.


请大神们指点啊,我安装7.8遇到这个问题,换成7.7也有,接下来该怎么排除呀,由于不太懂yacc的语法不知道怎么搞了!!


下面是我的机器上面的yac 的man信息,求指教
bash-4.2$ man yacc

yacc Command

Purpose

       Generates an LALR(1) parsing program from input consisting of a context-free grammar specification.

Syntax

       yacc [ -b Prefix ] [ -C ] [ -d ] [ -l ] [ -NnNumber ] [ -NmNumber ] [ -NrNumber ] [ -p Prefix ] [ -s ] [ -t ] [ -v ] [ -y Path ] Grammar

Description

       The yacc command converts a context-free grammar specification into a set of tables for a simple automaton that executes an LALR(1) parsing algorithm. The grammar can be ambiguous;
       specified precedence rules are used to break ambiguities.

       You must compile the output file, y.tab.c, with a C language compiler to produce a yyparse function. This function must be loaded with the yylex lexical analyzer, as well as with
       the main subroutine and the yyerror error-handling subroutine (you must provide these subroutines). The lex command is useful for creating lexical analyzers usable by the yyparse
       subroutine. Simple versions of main and yyerror subroutines are available through the yacc library, liby.a. Also, yacc can be used to generate C++ output.

       You can compile the yacc-generated C file (y.tab.c) with the -DYACC_MSG option to include code necessary to use the Message Facility. When you use this option during compilation,
       error messages generated by the yyparse subroutine and the YYBACKUP macro are extracted from the yacc_user.cat catalog.

       This allows you to receive error messages in languages other than English in non-English locales. If the catalog cannot be found or opened, the yyparse and YYBACKUP subroutines
       display the default English messages.

       The yacc command is affected by the LANG, LC_ALL, LC_CTYPE, and LC_MESSAGES environment variables.

Flags

       Item
            Description
       -b Prefix
            Use Prefix instead of y as the prefix for all output file names. The code file y.tab.c, the header file y.tab.h (created when -d is specified), and the description file
            y.output (created when -v is specified) are changed to Prefix.tab.c, Prefix.tab.h, and Prefix.output, respectively.
       -C
            Produces the y.tab.C file instead of the y.tab.c file for use with a C++ compiler. To use the I/O Stream Library for input and output, define the macro, _CPP_IOSTREAMS.
       -d
            Produces the file y.tab.h. This contains the #define statements that associate the yacc-assigned token codes with your token names. This allows source files other than y.tab.c
            to access the token codes by including this header file.
       -l
            Does not include any #line constructs in y.tab.c. Use this only after the grammar and associated actions are fully debugged.
       -NnNumber
            Changes the size of the token and nonterminal names array to Number. The default value is 8000. Valid values are only those greater than 8000.
       -NmNumber
            Changes the size of the memory states array to Number. Default value is 40000. Valid values are only those greater than 40000.
       -NrNumber
            Changes the internal buffer sizes to handle large grammars. The default value is 2000. Valid values are only those greater than 2000.
       -p Prefix
            Use Prefix instead of yy as the prefix for all external names created by the yacc command. External names affected include: yychar, yylval, yydebug, yyparse( ), yylex( ), and
            yyerror( ). (Previously, -p was used to specify an alternate parser; now, -yPath can be used to specify an alternate parser.)
       -s
            Breaks the yyparse function into several smaller functions. Since its size is somewhat proportional to that of the grammar, it is possible for the yyparse function to become
            too large to compile, optimize, or execute efficiently.
       -t
            Compiles run-time debugging code. By default, this code is not included when y.tab.c is compiled. However, the run-time debugging code is under the control of the preprocessor
            macro, YYDEBUG. If YYDEBUG has a nonzero value, the C compiler (cc) includes the debugging code, regardless of whether the -t flag is used. YYDEBUG should have a value of 0 if
            you don't want the debugging code included by the compiler. Without compiling this code, the yyparse subroutine will have a faster operating speed.

            The -t flag causes compilation of the debugging code, but it does not actually turn on the debug mode. To get debug output, the yydebug variable must be set either by adding

            the C language declaration, int yydebug=1 to the declaration section of the yacc grammar file or by setting yydebug through dbx.
       -v
            Prepares the file y.output. It contains a readable description of the parsing tables and a report on conflicts generated by grammar ambiguities.
       -y Path
            Uses the parser prototype specified by Path instead of the default /usr/lib/yaccpar file. (Previously, -p was used to specify an alternate parser.)

Exit Status

       This command returns the following exit values:
       Item
            Description
       0
            Successful completion.
       >0
            An error occurred.

Examples
       1    The following command:

            yacc  grammar.y
            draws yacc rules from the grammar.y file, and places the output in y.tab.c.
       2    The following command:

            yacc -d grammar.y functions the same as example 1, but it also produces the y.tab.h file which would contain C-style #define statements for each of the tokens defined in the
            grammar.y file.

Files

       Item
            Description
       y.output
            Contains a readable description of the parsing tables and a report on conflicts generated by grammar ambiguities.
       y.tab.c
            Contains an output file.
       y.tab.h
            Contains definitions for token names.
       yacc.tmp
            Temporary file.
       yacc.debug
            Temporary file.
       yacc.acts
            Temporary file.
       /usr/ccs/lib/yaccpar
            Contains parser prototype for C programs.
       /usr/ccs/lib/liby.a
            Contains a run-time library.

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP