public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: John Long <codeblue@inbox.lv>
To: Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
Cc: insight@sourceware.org
Subject: Re: Build problem on OpenBSD MIPS
Date: Thu, 04 Jul 2013 15:39:00 -0000	[thread overview]
Message-ID: <20130704153924.GB9402@inbox.lv> (raw)
In-Reply-To: <000001ce78ca$4da37d10$e8ea7730$@muller@ics-cnrs.unistra.fr>

On Thu, Jul 04, 2013 at 05:22:30PM +0200, Pierre Muller wrote:
>   Maybe it is a problem with the tool that is used
> to generate  the c-exp.c from the c-exp.y source.
> 
> I have the impression that OpenBSD often tends to still use old GNU tools...
> 
>   On my successful build,
> c_print_token is used in YYPRINT macro:
> 
> $ grep YYPRINT c-*.c -n -A 5
> 398:#define YYPRINT(FILE, TYPE, VALUE) c_print_token (FILE, TYPE, VALUE)
> 399-
> 400-/* Line 390 of yacc.c  */
> 401-#line 402 "c-exp.c"
> 402-
> 403-#ifdef short
> --
> 867:# ifdef YYPRINT
> 868-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
> 869-   token YYLEX-NUM.  */
> 870-static const yytype_uint16 yytoknum[] =
> 871-{
> 872-       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
> --
> 1589:# ifdef YYPRINT
> 1590-  if (yytype < YYNTOKENS)
> 1591:    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
> 1592-# else
> 1593-  YYUSE (yyoutput);
> 1594-# endif
> 1595-  switch (yytype)
> 1596-    {
> --
> 5989:/* This is called via the YYPRINT macro when parser debugging is
> 5990-   enabled.  It prints a token's value.  */
> 5991-
> 5992-static void
> 5993-c_print_token (FILE *file, int type, YYSTYPE value)
> 5994-{
> 
> $ head c-exp.c
> /* A Bison parser, made by GNU Bison 2.7.  */
> 
> /* Bison implementation for Yacc-like parsers in C
> 
> Could you check if YYPRINT is used in your c-exp.c file,
> and which tool was used to create it (it will probably be mentioned 
> in the header like here).
> 
> 
> Pierre Muller
> 

Hi, I have no idea what I am doing so I just tried your commands as is. Here
is the output:

grep YYPRINT c-*.c -n -A 5
146:#define YYPRINT(FILE, TYPE, VALUE) c_print_token (FILE, TYPE, VALUE)
147-#line 148 "c-exp.c"
148-#define INT 257
149-#define FLOAT 258
150-#define DECFLOAT 259
151-#define STRING 260
4233:/* This is called via the YYPRINT macro when parser debugging is
4234-   enabled.  It prints a token's value.  */
4235-
4236-static void
4237-c_print_token (FILE *file, int type, YYSTYPE value)
4238-{
user:/tmp/insight-cvs/insight/gdb$ 

head c-exp.c 
#include <stdlib.h>
#include <string.h>
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYLEX yylex()
#define YYEMPTY -1
#define yyclearin (yychar=(YYEMPTY))
#define yyerrok (yyerrflag=0)
#define YYRECOVERING() (yyerrflag!=0)
user:/tmp/insight-cvs/insight/gdb$ 

I don't see that YYPRINT is used anywhere else in c-exp.c

Does the following suggest this isn't going to be used in a normal build?

/* This is called via the YYPRINT macro when parser debugging is
   enabled.  It prints a token's value.  */

static void
c_print_token (FILE *file, int type, YYSTYPE value)
{
  switch (type)
    {
    case INT:
      fprintf (file, "typed_val_int<%s, %s>",
	       TYPE_SAFE_NAME (value.typed_val_int.type),

Thanks,

/jl

  reply	other threads:[~2013-07-04 15:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-04 15:00 John Long
2013-07-04 15:22 ` Pierre Muller
2013-07-04 15:39   ` John Long [this message]
2013-07-04 16:28     ` Pierre Muller
2013-07-04 17:28       ` John Long

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130704153924.GB9402@inbox.lv \
    --to=codeblue@inbox.lv \
    --cc=insight@sourceware.org \
    --cc=pierre.muller@ics-cnrs.unistra.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).