+2001-11-04 Akim Demaille <akim@epita.fr>
+
+ * src/getargs.c (longopts): Support `--output'. getopt is now
+ able to understand that `--out' is OK: the two racing long options
+ are aliases.
+ (usage): Adjust.
+ * src/lex.h (tok_setopt): Remove, replaced with...
+ (tok_intopt, tok_stropt): these new guys.
+ * src/lex.c (getopt.h): Not needed.
+ (token_buffer, unlexed_token_buffer): Not const.
+ (percent_table): Promote `-' over `_' in directive names.
+ Active `%name-prefix', `file-prefix', and `output'.
+ (parse_percent_token): Accept possible arguments to directives.
+ Promote `-' over `_' in directive names.
+ * doc/bison.texinfo (Decl Summary): Split the list into
+ `directives for grammars' and `directives for bison'.
+ Sort'em.
+ Add description of `%name-prefix', `file-prefix', and `output'.
+ Promote `-' over `_' in directive names.
+ (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
+ Simplify the description of `--name-prefix'.
+ Promote `-' over `_' in directive names.
+ Promote `--output' over `--output-file'.
+ Fix the description of `--defines'.
+ * tests/output.at: Exercise %file-prefix and %output.
+
2001-11-02 Akim Demaille <akim@epita.fr>
* doc/refcard.tex: Update.
uninstall-info-recursive all-recursive install-data-recursive \
install-exec-recursive installdirs-recursive install-recursive \
uninstall-recursive check-recursive installcheck-recursive
-DIST_COMMON = README ./stamp-h1.in ABOUT-NLS AUTHORS COPYING ChangeLog \
- INSTALL Makefile.am Makefile.in NEWS README-alpha THANKS \
- aclocal.m4 config.hin configure configure.in
+DIST_COMMON = README ././stamp-h1.in ./stamp-h1.in ABOUT-NLS AUTHORS \
+ COPYING ChangeLog INSTALL Makefile.am Makefile.in NEWS \
+ README-alpha THANKS aclocal.m4 config.hin configure \
+ configure.in
DIST_SUBDIRS = $(SUBDIRS)
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
fi
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
mkdir $(distdir)
- $(mkinstalldirs) $(distdir)/intl $(distdir)/po $(distdir)/tests
+ $(mkinstalldirs) $(distdir)/./. $(distdir)/intl $(distdir)/po $(distdir)/tests
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
* Fixed CPP guards: 9foo.h uses BISON_9FOO_H instead of 9FOO_H.
+* Fixed some typos in the documentation.
+
* %token MY_EOF 0 is supported.
Before, MY_EOF was silently renumbered as 257.
* doc/refcard.tex is updated.
+
+* %output, %file-prefix, %name-prefix.
+ New.
+
+* --output
+ New, aliasing `--output-file'.
\f
-Changes in version 1.30:
+Changes in version 1.30, 2001-10-26:
* `--defines' and `--graph' have now an optionnal argument which is the
output file name. `-d' and `-g' do not change, they do not take any
* Portability fixes.
\f
-Changes in version 1.29:
+Changes in version 1.29, 2001-09-07:
* The output file does not define const, as this caused problems when used
with common autoconfiguration schemes. If you still use ancient compilers
* @$
Automatic location tracking.
\f
-Changes in version 1.28:
+Changes in version 1.28, 1999-07-06:
* Should compile better now with K&R compilers.
* Generated parsers should now work even on operating systems which do
not provide alloca().
\f
-Changes in version 1.25:
+Changes in version 1.25, 1995-10-16:
* Errors in the input grammar are not fatal; Bison keeps reading
the grammar file, and reports all the errors found in it.
Changes in version 1.20:
Output file does not redefine const for C++.
+
+Local Variables:
+mode: outline
+End:
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2001-07-25.07}
+\def\texinfoversion{2000-12-12.07}
%
-% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
-% 2000, 01 Free Software Foundation, Inc.
+% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+% Free Software Foundation, Inc.
%
% This texinfo.tex file is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
}%
\fi
-% add check for \lastpenalty to plain's definitions. If the last thing
-% we did was a \nobreak, we don't want to insert more space.
-%
-\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
- \removelastskip\penalty-50\smallskip\fi\fi}
-\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
- \removelastskip\penalty-100\medskip\fi\fi}
-\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
- \removelastskip\penalty-200\bigskip\fi\fi}
-
% For @cropmarks command.
% Do @cropmarks to get crop marks.
%
% environments. --karl, 6may93
%{\advance \baselineskip by -\singlespaceskip
%\kern \baselineskip}%
- \setleading\singlespaceskip
+ \setleading \singlespaceskip
}
%% Simple single-character @ commands
\fi
\ifx\empty\imagewidth\else width \imagewidth \fi
\ifx\empty\imageheight\else height \imageheight \fi
- \ifnum\pdftexversion<13
- #1.pdf%
- \else
- {#1.pdf}%
- \fi
+ {#1.pdf}%
\ifnum\pdftexversion < 14 \else
\pdfrefximage \pdflastximage
\fi}
- \def\pdfmkdest#1{{\normalturnoffactive \pdfdest name{#1} xyz}}
+ \def\pdfmkdest#1{\pdfdest name{#1@} xyz}
\def\pdfmkpgn#1{#1@}
\let\linkcolor = \Blue % was Cyan, but that seems light?
\def\endlink{\Black\pdfendlink}
\def\pdfurl#1{%
\begingroup
\normalturnoffactive\def\@{@}%
- \let\value=\expandablevalue
\leavevmode\Red
\startlink attr{/Border [0 0 0]}%
user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
\def\makelink{\addtokens{\toksB}%
{\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
\def\pdflink#1{%
- \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
+ \startlink attr{/Border [0 0 0]} goto name{\mkpgn{#1}}
\linkcolor #1\endlink}
+ \def\mkpgn#1{#1@}
\def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
\fi % \ifx\pdfoutput
% We don't need math for this one.
\def\ttsl{\tenttsl}
-% Default leading.
-\newdimen\textleading \textleading = 13.2pt
-
-% Set the baselineskip to #1, and the lineskip and strut size
-% correspondingly. There is no deep meaning behind these magic numbers
-% used as factors; they just match (closely enough) what Knuth defined.
-%
-\def\lineskipfactor{.08333}
-\def\strutheightpercent{.70833}
-\def\strutdepthpercent {.29167}
-%
-\def\setleading#1{%
- \normalbaselineskip = #1\relax
- \normallineskip = \lineskipfactor\normalbaselineskip
- \normalbaselines
- \setbox\strutbox =\hbox{%
- \vrule width0pt height\strutheightpercent\baselineskip
- depth \strutdepthpercent \baselineskip
- }%
-}
-
% Use Computer Modern fonts at \magstephalf (11pt).
-\newcount\mainmagstep \mainmagstep=\magstephalf
+\newcount\mainmagstep
+\mainmagstep=\magstephalf
% Set the font macro #1 to the font named #2, adding on the
% specified font prefix (normally `cm').
\font\smalli=cmmi9
\font\smallsy=cmsy9
-% Fonts for small examples (8pt).
-\setfont\smallerrm\rmshape{8}{1000}
-\setfont\smallertt\ttshape{8}{1000}
-\setfont\smallerbf\bfshape{10}{800}
-\setfont\smallerit\itshape{8}{1000}
-\setfont\smallersl\slshape{8}{1000}
-\setfont\smallersf\sfshape{8}{1000}
-\setfont\smallersc\scshape{10}{800}
-\setfont\smallerttsl\ttslshape{10}{800}
-\font\smalleri=cmmi8
-\font\smallersy=cmsy8
-
% Fonts for title page:
\setfont\titlerm\rmbshape{12}{\magstep3}
\setfont\titleit\itbshape{10}{\magstep4}
\let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
\let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
\let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl
- \resetmathfonts \setleading{\textleading}}
+ \resetmathfonts}
\def\titlefonts{%
\let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
\let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
\let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
\let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
\let\tenttsl=\smallttsl
- \resetmathfonts \setleading{10.5pt}}
-\def\smallerfonts{%
- \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl
- \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
- \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
- \let\tenttsl=\smallerttsl
- \resetmathfonts \setleading{9.5pt}}
-\let\smallexamplefonts = \smallerfonts
+ \resetmathfonts \setleading{11pt}}
% Set up the default fonts, so we can use them for creating boxes.
%
\oldpage
\endgroup
%
- % Need this before the \...aftertitlepage checks so that if they are
- % in effect the toc pages will come out with page numbers.
- \HEADINGSon
- %
% If they want short, they certainly want long too.
\ifsetshortcontentsaftertitlepage
\shortcontents
\fi
%
\ifpdf \pdfmakepagedesttrue \fi
+ %
+ \HEADINGSon
}
\def\finishtitlepage{%
%
\def\ignore{\doignore{ignore}}
-% Also ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu,
-% @documentdescription, and @direntry text.
+% Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text.
%
\def\ifinfo{\doignore{ifinfo}}
\def\ifhtml{\doignore{ifhtml}}
\def\ifnottex{\doignore{ifnottex}}
\def\html{\doignore{html}}
\def\menu{\doignore{menu}}
-\def\documentdescription{\doignore{documentdescription}}
\def\direntry{\doignore{direntry}}
% @dircategory CATEGORY -- specify a category of the dir file
\let\tenrm=\nullfont \let\tenit=\nullfont \let\tensl=\nullfont
\let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont
\let\tensf=\nullfont
- % Similarly for index fonts.
+ % Similarly for index fonts (mostly for their use in smallexample).
\let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont
\let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont
\let\smallsf=\nullfont
- % Similarly for smallexample fonts.
- \let\smallerrm=\nullfont \let\smallerit=\nullfont \let\smallersl=\nullfont
- \let\smallerbf=\nullfont \let\smallertt=\nullfont \let\smallersc=\nullfont
- \let\smallersf=\nullfont
%
% Don't complain when characters are missing from the fonts.
\tracinglostchars = 0
% Now the real index entry with the fonts.
\toks0 = {#2}%
%
- % If the third (subentry) arg is present, add it to the index
- % line to write.
+ % If third (subentry) arg is present, add it to the index
+ % string. And include a space.
\ifx\thirdarg\emptymacro \else
- \toks0 = \expandafter{\the\toks0{#3}}%
+ \toks0 = \expandafter{\the\toks0 \space #3}%
\fi
%
- % Set up the complete index entry, with both the sort key and
- % the original text, including any font commands. We write
- % three arguments to \entry to the .?? file (four in the
- % subentry case), texindex reduces to two when writing the .??s
- % sorted result.
+ % Set up the complete index entry, with both the sort key
+ % and the original text, including any font commands. We write
+ % three arguments to \entry to the .?? file, texindex reduces to
+ % two when writing the .??s sorted result.
\edef\temp{%
\write\csname#1indfile\endcsname{%
\realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}%
\def\primary #1{\line{#1\hfil}}
\newskip\secondaryindent \secondaryindent=0.5cm
-\def\secondary#1#2{{%
- \parfillskip=0in
- \parskip=0in
- \hangindent=1in
- \hangafter=1
- \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
- \ifpdf
- \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
- \else
- #2
- \fi
- \par
+
+\def\secondary #1#2{
+{\parfillskip=0in \parskip=0in
+\hangindent =1in \hangafter=1
+\noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par
}}
% Define two-column mode, which we use to typeset indexes.
% is reset to zero; thus the \afterenvbreak inserts no space -- but the
% start of the next paragraph will insert \parskip
%
-\def\aboveenvbreak{{%
- \ifnum\lastpenalty < 10000
- \advance\envskipamount by \parskip
- \endgraf
- \ifdim\lastskip<\envskipamount
- \removelastskip
- \penalty-50
- \vskip\envskipamount
- \fi
- \fi
-}}
+\def\aboveenvbreak{{\advance\envskipamount by \parskip
+\endgraf \ifdim\lastskip<\envskipamount
+\removelastskip \penalty-50 \vskip\envskipamount \fi}}
\let\afterenvbreak = \aboveenvbreak
\def\smalllispx{\begingroup
\def\Esmalllisp{\nonfillfinish\endgroup}%
\def\Esmallexample{\nonfillfinish\endgroup}%
- \smallexamplefonts
+ \smallfonts
\lisp
}
\let\Edisplay = \nonfillfinish
\gobble
}
-%
+
% @smalldisplay (when @smallbook): @display plus smaller fonts.
%
\def\smalldisplayx{\begingroup
\def\Esmalldisplay{\nonfillfinish\endgroup}%
- \smallexamplefonts \rm
+ \smallfonts \rm
\display
}
\let\Eformat = \nonfillfinish
\gobble
}
-%
+
% @smallformat (when @smallbook): @format plus smaller fonts.
%
\def\smallformatx{\begingroup
\def\Esmallformat{\nonfillfinish\endgroup}%
- \smallexamplefonts \rm
+ \smallfonts \rm
\format
}
\ifpdf
\leavevmode
\getfilename{#4}%
- {\normalturnoffactive
- \ifnum\filenamelength>0
- \startlink attr{/Border [0 0 0]}%
- goto file{\the\filename.pdf} name{#1}%
- \else
- \startlink attr{/Border [0 0 0]}%
- goto name{#1}%
- \fi
- }%
+ \ifnum\filenamelength>0
+ \startlink attr{/Border [0 0 0]}%
+ goto file{\the\filename.pdf} name{#1@}%
+ \else
+ \startlink attr{/Border [0 0 0]}%
+ goto name{#1@}%
+ \fi
\linkcolor
\fi
%
}%end \catcode `\@=11
+% Set the baselineskip to #1, and the lineskip and strut size
+% correspondingly. There is no deep meaning behind these magic numbers
+% used as factors; they just match (closely enough) what Knuth defined.
+%
+\def\lineskipfactor{.08333}
+\def\strutheightpercent{.70833}
+\def\strutdepthpercent {.29167}
+%
+\def\setleading#1{%
+ \normalbaselineskip = #1\relax
+ \normallineskip = \lineskipfactor\normalbaselineskip
+ \normalbaselines
+ \setbox\strutbox =\hbox{%
+ \vrule width0pt height\strutheightpercent\baselineskip
+ depth \strutdepthpercent \baselineskip
+ }%
+}
+
% @| inserts a changebar to the left of the current line. It should
% surround any changed text. This approach does *not* work if the
% change spans more than two lines of output. To handle that, we would
% Arguments to @image:
% #1 is (mandatory) image filename; we tack on .eps extension.
% #2 is (optional) width, #3 is (optional) height.
-% #4 is (ignored optional) html alt text.
-% #5 is (ignored optional) extension.
-% #6 is just the usual extra ignored arg for parsing this stuff.
-\def\imagexxx#1,#2,#3,#4,#5,#6\finish{%
+% #4 is just the usual extra ignored arg for parsing this stuff.
+\def\imagexxx#1,#2,#3,#4\finish{%
\ifpdf
\centerline{\dopdfimage{#1}{#2}{#3}}%
\else
\setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
\setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
\begingroup
- \catcode`\^^M = 5 % in case we're inside an example
- \normalturnoffactive % allow _ et al. in names
+ \catcode`\^^M = 5 % in case we're inside an example
% If the image is by itself, center it.
\ifvmode
\nobreak\bigskip
}
% Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
-% 4) hoffset; 5) binding offset; 6) topskip. We also call
-% \setleading{\textleading}, so the caller should define \textleading.
-% The caller should also set \parskip.
+% 4) hoffset; 5) binding offset; 6) topskip. Then whoever calls us can
+% set \parskip and call \setleading for \baselineskip.
%
\def\internalpagesizes#1#2#3#4#5#6{%
\voffset = #3\relax
\normaloffset = #4\relax
\bindingoffset = #5\relax
%
- \setleading{\textleading}
- %
\parindent = \defaultparindent
\setemergencystretch
}
-% Use `small' versions.
-%
-\def\smallenvironments{%
- \let\smalldisplay = \smalldisplayx
- \let\smallexample = \smalllispx
- \let\smallformat = \smallformatx
- \let\smalllisp = \smalllispx
-}
-
% @letterpaper (the default).
\def\letterpaper{{\globaldefs = 1
\parskip = 3pt plus 2pt minus 1pt
- \textleading = 13.2pt
+ \setleading{13.2pt}%
%
% If page is nothing but text, make it come out even.
\internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}%
% Use @smallbook to reset parameters for 7x9.5 (or so) format.
\def\smallbook{{\globaldefs = 1
\parskip = 2pt plus 1pt
- \textleading = 12pt
+ \setleading{12pt}%
%
\internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}%
%
\contentsrightmargin = 0pt
\deftypemargin = 0pt
\defbodyindent = .5cm
- \smallenvironments
+ %
+ \let\smalldisplay = \smalldisplayx
+ \let\smallexample = \smalllispx
+ \let\smallformat = \smallformatx
+ \let\smalllisp = \smalllispx
}}
% Use @afourpaper to print on European A4 paper.
\def\afourpaper{{\globaldefs = 1
+ \setleading{12pt}%
\parskip = 3pt plus 2pt minus 1pt
- \textleading = 12pt
%
\internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}%
%
\hfuzz = 1pt
}}
-% Use @afivepaper to print on European A5 paper.
-% From romildo@urano.iceb.ufop.br, 2 July 2000.
-% He also recommends making @example and @lisp be small.
-\def\afivepaper{{\globaldefs = 1
- \parskip = 2pt plus 1pt minus 0.1pt
- \textleading = 12.5pt
- %
- \internalpagesizes{166mm}{120mm}{\voffset}{-8mm}{\bindingoffset}{8pt}%
- %
- \lispnarrowing = 0.2in
- \tolerance = 800
- \hfuzz = 1.2pt
- \contentsrightmargin = 0mm
- \deftypemargin = 0pt
- \defbodyindent = 2mm
- \tableindent = 12mm
- %
- \smallenvironments
-}}
-
% A specific text layout, 24x15cm overall, intended for A4 paper. Top margin
% 29mm, hence bottom margin 28mm, nominal side margin 3cm.
\def\afourlatex{{\globaldefs = 1
- \textleading = 13.6pt
+ \setleading{13.6pt}%
%
\afourpaper
\internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}%
+ %
+ \globaldefs = 0
}}
% Use @afourwide to print on European A4 paper in wide format.
\def\afourwide{%
\afourpaper
\internalpagesizes{6.5in}{9.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}%
+ %
+ \globaldefs = 0
}
% @pagesizes TEXTHEIGHT[,TEXTWIDTH]
\globaldefs = 1
%
\parskip = 3pt plus 2pt minus 1pt
- \setleading{\textleading}%
+ \setleading{13.2pt}%
%
\internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}%
}}
\1f
Indirect:
bison.info-1: 1313
-bison.info-2: 50691
-bison.info-3: 100581
-bison.info-4: 150131
-bison.info-5: 197908
+bison.info-2: 50689
+bison.info-3: 100579
+bison.info-4: 147579
+bison.info-5: 197449
\1f
Tag Table:
(Indirect)
Node: Top\7f1313
-Node: Introduction\7f8969
-Node: Conditions\7f10244
-Node: Copying\7f11708
-Node: Concepts\7f30911
-Node: Language and Grammar\7f31990
-Node: Grammar in Bison\7f37006
-Node: Semantic Values\7f38930
-Node: Semantic Actions\7f41031
-Node: Locations Overview\7f42220
-Node: Bison Parser\7f43667
-Node: Stages\7f45979
-Node: Grammar Layout\7f47262
-Node: Examples\7f48519
-Node: RPN Calc\7f49717
-Node: Rpcalc Decls\7f50691
-Node: Rpcalc Rules\7f52278
-Node: Rpcalc Input\7f54078
-Node: Rpcalc Line\7f55539
-Node: Rpcalc Expr\7f56654
-Node: Rpcalc Lexer\7f58599
-Node: Rpcalc Main\7f61171
-Node: Rpcalc Error\7f61569
-Node: Rpcalc Gen\7f62577
-Node: Rpcalc Compile\7f63726
-Node: Infix Calc\7f64601
-Node: Simple Error Recovery\7f67308
-Node: Location Tracking Calc\7f69197
-Node: Ltcalc Decls\7f69927
-Node: Ltcalc Rules\7f70836
-Node: Ltcalc Lexer\7f72897
-Node: Multi-function Calc\7f75235
-Node: Mfcalc Decl\7f76802
-Node: Mfcalc Rules\7f78825
-Node: Mfcalc Symtab\7f80205
-Node: Exercises\7f86578
-Node: Grammar File\7f87084
-Node: Grammar Outline\7f87932
-Node: C Declarations\7f88666
-Node: Bison Declarations\7f89246
-Node: Grammar Rules\7f89658
-Node: C Code\7f90118
-Node: Symbols\7f91048
-Node: Rules\7f96129
-Node: Recursion\7f97768
-Node: Semantics\7f99487
-Node: Value Type\7f100581
-Node: Multiple Types\7f101253
-Node: Actions\7f102270
-Node: Action Types\7f105055
-Node: Mid-Rule Actions\7f106358
-Node: Locations\7f111928
-Node: Location Type\7f112576
-Node: Actions and Locations\7f113134
-Node: Location Default Action\7f115290
-Node: Declarations\7f116753
-Node: Token Decl\7f118072
-Node: Precedence Decl\7f120085
-Node: Union Decl\7f121636
-Node: Type Decl\7f122480
-Node: Expect Decl\7f123386
-Node: Start Decl\7f124932
-Node: Pure Decl\7f125310
-Node: Decl Summary\7f126987
-Node: Multiple Parsers\7f132370
-Node: Interface\7f133864
-Node: Parser Function\7f134736
-Node: Lexical\7f135571
-Node: Calling Convention\7f136977
-Node: Token Values\7f139748
-Node: Token Positions\7f140897
-Node: Pure Calling\7f141782
-Node: Error Reporting\7f144714
-Node: Action Features\7f146836
-Node: Algorithm\7f150131
-Node: Look-Ahead\7f152424
-Node: Shift/Reduce\7f154556
-Node: Precedence\7f157468
-Node: Why Precedence\7f158119
-Node: Using Precedence\7f159984
-Node: Precedence Examples\7f160952
-Node: How Precedence\7f161653
-Node: Contextual Precedence\7f162802
-Node: Parser States\7f164593
-Node: Reduce/Reduce\7f165836
-Node: Mystery Conflicts\7f169397
-Node: Stack Overflow\7f172783
-Node: Error Recovery\7f174156
-Node: Context Dependency\7f179292
-Node: Semantic Tokens\7f180140
-Node: Lexical Tie-ins\7f183157
-Node: Tie-in Recovery\7f184705
-Node: Debugging\7f186877
-Node: Invocation\7f190178
-Node: Bison Options\7f191430
-Node: Environment Variables\7f195398
-Node: Option Cross Key\7f196246
-Node: VMS Invocation\7f197124
-Node: Table of Symbols\7f197908
-Node: Glossary\7f205547
-Node: Copying This Manual\7f211851
-Node: GNU Free Documentation License\7f212060
-Node: Index\7f231925
+Node: Introduction\7f8967
+Node: Conditions\7f10242
+Node: Copying\7f11706
+Node: Concepts\7f30909
+Node: Language and Grammar\7f31988
+Node: Grammar in Bison\7f37004
+Node: Semantic Values\7f38928
+Node: Semantic Actions\7f41029
+Node: Locations Overview\7f42218
+Node: Bison Parser\7f43665
+Node: Stages\7f45977
+Node: Grammar Layout\7f47260
+Node: Examples\7f48517
+Node: RPN Calc\7f49715
+Node: Rpcalc Decls\7f50689
+Node: Rpcalc Rules\7f52276
+Node: Rpcalc Input\7f54076
+Node: Rpcalc Line\7f55537
+Node: Rpcalc Expr\7f56652
+Node: Rpcalc Lexer\7f58597
+Node: Rpcalc Main\7f61169
+Node: Rpcalc Error\7f61567
+Node: Rpcalc Gen\7f62575
+Node: Rpcalc Compile\7f63724
+Node: Infix Calc\7f64599
+Node: Simple Error Recovery\7f67306
+Node: Location Tracking Calc\7f69195
+Node: Ltcalc Decls\7f69925
+Node: Ltcalc Rules\7f70834
+Node: Ltcalc Lexer\7f72895
+Node: Multi-function Calc\7f75233
+Node: Mfcalc Decl\7f76800
+Node: Mfcalc Rules\7f78823
+Node: Mfcalc Symtab\7f80203
+Node: Exercises\7f86576
+Node: Grammar File\7f87082
+Node: Grammar Outline\7f87930
+Node: C Declarations\7f88664
+Node: Bison Declarations\7f89244
+Node: Grammar Rules\7f89656
+Node: C Code\7f90116
+Node: Symbols\7f91046
+Node: Rules\7f96127
+Node: Recursion\7f97766
+Node: Semantics\7f99485
+Node: Value Type\7f100579
+Node: Multiple Types\7f101251
+Node: Actions\7f102268
+Node: Action Types\7f105053
+Node: Mid-Rule Actions\7f106356
+Node: Locations\7f111926
+Node: Location Type\7f112574
+Node: Actions and Locations\7f113132
+Node: Location Default Action\7f115288
+Node: Declarations\7f116751
+Node: Token Decl\7f118070
+Node: Precedence Decl\7f120083
+Node: Union Decl\7f121634
+Node: Type Decl\7f122478
+Node: Expect Decl\7f123384
+Node: Start Decl\7f124930
+Node: Pure Decl\7f125308
+Node: Decl Summary\7f126985
+Node: Multiple Parsers\7f133113
+Node: Interface\7f134607
+Node: Parser Function\7f135479
+Node: Lexical\7f136314
+Node: Calling Convention\7f137720
+Node: Token Values\7f140491
+Node: Token Positions\7f141640
+Node: Pure Calling\7f142525
+Node: Error Reporting\7f145457
+Node: Action Features\7f147579
+Node: Algorithm\7f150874
+Node: Look-Ahead\7f153167
+Node: Shift/Reduce\7f155299
+Node: Precedence\7f158211
+Node: Why Precedence\7f158862
+Node: Using Precedence\7f160727
+Node: Precedence Examples\7f161695
+Node: How Precedence\7f162396
+Node: Contextual Precedence\7f163545
+Node: Parser States\7f165336
+Node: Reduce/Reduce\7f166579
+Node: Mystery Conflicts\7f170140
+Node: Stack Overflow\7f173526
+Node: Error Recovery\7f174899
+Node: Context Dependency\7f180035
+Node: Semantic Tokens\7f180883
+Node: Lexical Tie-ins\7f183900
+Node: Tie-in Recovery\7f185448
+Node: Debugging\7f187620
+Node: Invocation\7f190921
+Node: Bison Options\7f192173
+Node: Environment Variables\7f195723
+Node: Option Cross Key\7f196571
+Node: VMS Invocation\7f197449
+Node: Table of Symbols\7f198233
+Node: Glossary\7f206201
+Node: Copying This Manual\7f212505
+Node: GNU Free Documentation License\7f212714
+Node: Index\7f232579
\1f
End Tag Table
Bison
*****
- This manual documents version 1.30a of Bison, updated 20 September
+ This manual documents version 1.30a of Bison, updated 4 November
2001.
* Menu:
Bison Declaration Summary
-------------------------
- Here is a summary of all Bison declarations:
+ Here is a summary of the declarations used to define a grammar:
`%union'
Declare the collection of data types that semantic values may have
Declare the expected number of shift-reduce conflicts (*note
Suppressing Conflict Warnings: Expect Decl.).
-`%yacc'
-`%fixed_output_files'
- Pretend the option `--yacc' was given, i.e., imitate Yacc,
- including its naming conventions. *Note Bison Options::, for more.
+
+In order to change the behavior of `bison', use the following
+directives:
+
+`%debug'
+ Output a definition of the macro `YYDEBUG' into the parser file, so
+ that the debugging facilities are compiled. *Note Debugging Your
+ Parser: Debugging.
+
+`%defines'
+ Write an extra output file containing macro definitions for the
+ token type names defined in the grammar and the semantic value type
+ `YYSTYPE', as well as a few `extern' variable declarations.
+
+ If the parser output file is named `NAME.c' then this file is
+ named `NAME.h'.
+
+ This output file is essential if you wish to put the definition of
+ `yylex' in a separate source file, because `yylex' needs to be
+ able to refer to token type codes and the variable `yylval'.
+ *Note Semantic Values of Tokens: Token Values.
+
+`%file-prefix="PREFIX"'
+ Specify a prefix to use for all Bison output file names. The
+ names are chosen as if the input file were named `PREFIX.y'.
`%locations'
Generate the code processing the locations (*note Special Features
grammar does not use it, using `%locations' allows for more
accurate parse error messages.
-`%pure_parser'
- Request a pure (reentrant) parser program (*note A Pure
- (Reentrant) Parser: Pure Decl.).
+`%name-prefix="PREFIX"'
+ Rename the external symbols used in the parser so that they start
+ with PREFIX instead of `yy'. The precise list of symbols renamed
+ is `yyparse', `yylex', `yyerror', `yynerrs', `yylval', `yychar'
+ and `yydebug'. For example, if you use `%name-prefix="c_"', the
+ names become `c_parse', `c_lex', and so on. *Note Multiple
+ Parsers in the Same Program: Multiple Parsers.
-`%no_parser'
+`%no-parser'
Do not include any C code in the parser file; generate tables
only. The parser file contains just `#define' directives and
static variable declarations.
actions into a file named `FILENAME.act', in the form of a
brace-surrounded body fit for a `switch' statement.
-`%no_lines'
+`%no-lines'
Don't generate any `#line' preprocessor commands in the parser
file. Ordinarily Bison writes these commands in the parser file
so that the C compiler and debuggers will associate errors and
directive causes them to associate errors with the parser file,
treating it an independent source file in its own right.
-`%debug'
- Output a definition of the macro `YYDEBUG' into the parser file, so
- that the debugging facilities are compiled. *Note Debugging Your
- Parser: Debugging.
-
-`%defines'
- Write an extra output file containing macro definitions for the
- token type names defined in the grammar and the semantic value type
- `YYSTYPE', as well as a few `extern' variable declarations.
-
- If the parser output file is named `NAME.c' then this file is
- named `NAME.h'.
+`%output="FILENAME"'
+ Specify the FILENAME for the parser file.
- This output file is essential if you wish to put the definition of
- `yylex' in a separate source file, because `yylex' needs to be
- able to refer to token type codes and the variable `yylval'.
- *Note Semantic Values of Tokens: Token Values.
-
-`%verbose'
- Write an extra output file containing verbose descriptions of the
- parser states and what is done for each type of look-ahead token in
- that state.
-
- This file also describes all the conflicts, both those resolved by
- operator precedence and the unresolved ones.
-
- The file's name is made by removing `.tab.c' or `.c' from the
- parser output file name, and adding `.output' instead.
-
- Therefore, if the input file is `foo.y', then the parser file is
- called `foo.tab.c' by default. As a consequence, the verbose
- output file is called `foo.output'.
+`%pure-parser'
+ Request a pure (reentrant) parser program (*note A Pure
+ (Reentrant) Parser: Pure Decl.).
`%token_table'
Generate an array of token names in the parser file. The name of
`YYNSTATES'
The number of parser states (*note Parser States::).
+`%verbose'
+ Write an extra output file containing verbose descriptions of the
+ parser states and what is done for each type of look-ahead token in
+ that state.
+
+ This file also describes all the conflicts, both those resolved by
+ operator precedence and the unresolved ones.
+
+ The file's name is made by removing `.tab.c' or `.c' from the
+ parser output file name, and adding `.output' instead.
+
+ Therefore, if the input file is `foo.y', then the parser file is
+ called `foo.tab.c' by default. As a consequence, the verbose
+ output file is called `foo.output'.
+
+`%yacc'
+`%fixed-output-files'
+ Pretend the option `--yacc' was given, i.e., imitate Yacc,
+ including its naming conventions. *Note Bison Options::, for more.
+
\1f
File: bison.info, Node: Multiple Parsers, Prev: Declarations, Up: Grammar File
request a pure parser (*note A Pure (Reentrant) Parser: Pure Decl.)
then it is a local variable which only the actions can access.
-\1f
-File: bison.info, Node: Action Features, Prev: Error Reporting, Up: Interface
-
-Special Features for Use in Actions
-===================================
-
- Here is a table of Bison constructs, variables and macros that are
-useful in actions.
-
-`$$'
- Acts like a variable that contains the semantic value for the
- grouping made by the current rule. *Note Actions::.
-
-`$N'
- Acts like a variable that contains the semantic value for the Nth
- component of the current rule. *Note Actions::.
-
-`$<TYPEALT>$'
- Like `$$' but specifies alternative TYPEALT in the union specified
- by the `%union' declaration. *Note Data Types of Values in
- Actions: Action Types.
-
-`$<TYPEALT>N'
- Like `$N' but specifies alternative TYPEALT in the union specified
- by the `%union' declaration. *Note Data Types of Values in
- Actions: Action Types.
-
-`YYABORT;'
- Return immediately from `yyparse', indicating failure. *Note The
- Parser Function `yyparse': Parser Function.
-
-`YYACCEPT;'
- Return immediately from `yyparse', indicating success. *Note The
- Parser Function `yyparse': Parser Function.
-
-`YYBACKUP (TOKEN, VALUE);'
- Unshift a token. This macro is allowed only for rules that reduce
- a single value, and only when there is no look-ahead token. It
- installs a look-ahead token with token type TOKEN and semantic
- value VALUE; then it discards the value that was going to be
- reduced by this rule.
-
- If the macro is used when it is not valid, such as when there is a
- look-ahead token already, then it reports a syntax error with a
- message `cannot back up' and performs ordinary error recovery.
-
- In either case, the rest of the action is not executed.
-
-`YYEMPTY'
- Value stored in `yychar' when there is no look-ahead token.
-
-`YYERROR;'
- Cause an immediate syntax error. This statement initiates error
- recovery just as if the parser itself had detected an error;
- however, it does not call `yyerror', and does not print any
- message. If you want to print an error message, call `yyerror'
- explicitly before the `YYERROR;' statement. *Note Error
- Recovery::.
-
-`YYRECOVERING'
- This macro stands for an expression that has the value 1 when the
- parser is recovering from a syntax error, and 0 the rest of the
- time. *Note Error Recovery::.
-
-`yychar'
- Variable containing the current look-ahead token. (In a pure
- parser, this is actually a local variable within `yyparse'.) When
- there is no look-ahead token, the value `YYEMPTY' is stored in the
- variable. *Note Look-Ahead Tokens: Look-Ahead.
-
-`yyclearin;'
- Discard the current look-ahead token. This is useful primarily in
- error rules. *Note Error Recovery::.
-
-`yyerrok;'
- Resume generating error messages immediately for subsequent syntax
- errors. This is useful primarily in error rules. *Note Error
- Recovery::.
-
-`@$'
- Acts like a structure variable containing information on the
- textual position of the grouping made by the current rule. *Note
- Tracking Locations: Locations.
-
-`@N'
- Acts like a structure variable containing information on the
- textual position of the Nth component of the current rule. *Note
- Tracking Locations: Locations.
-
included in translations approved by the Free Software Foundation
instead of in the original English.
+\1f
+File: bison.info, Node: Action Features, Prev: Error Reporting, Up: Interface
+
+Special Features for Use in Actions
+===================================
+
+ Here is a table of Bison constructs, variables and macros that are
+useful in actions.
+
+`$$'
+ Acts like a variable that contains the semantic value for the
+ grouping made by the current rule. *Note Actions::.
+
+`$N'
+ Acts like a variable that contains the semantic value for the Nth
+ component of the current rule. *Note Actions::.
+
+`$<TYPEALT>$'
+ Like `$$' but specifies alternative TYPEALT in the union specified
+ by the `%union' declaration. *Note Data Types of Values in
+ Actions: Action Types.
+
+`$<TYPEALT>N'
+ Like `$N' but specifies alternative TYPEALT in the union specified
+ by the `%union' declaration. *Note Data Types of Values in
+ Actions: Action Types.
+
+`YYABORT;'
+ Return immediately from `yyparse', indicating failure. *Note The
+ Parser Function `yyparse': Parser Function.
+
+`YYACCEPT;'
+ Return immediately from `yyparse', indicating success. *Note The
+ Parser Function `yyparse': Parser Function.
+
+`YYBACKUP (TOKEN, VALUE);'
+ Unshift a token. This macro is allowed only for rules that reduce
+ a single value, and only when there is no look-ahead token. It
+ installs a look-ahead token with token type TOKEN and semantic
+ value VALUE; then it discards the value that was going to be
+ reduced by this rule.
+
+ If the macro is used when it is not valid, such as when there is a
+ look-ahead token already, then it reports a syntax error with a
+ message `cannot back up' and performs ordinary error recovery.
+
+ In either case, the rest of the action is not executed.
+
+`YYEMPTY'
+ Value stored in `yychar' when there is no look-ahead token.
+
+`YYERROR;'
+ Cause an immediate syntax error. This statement initiates error
+ recovery just as if the parser itself had detected an error;
+ however, it does not call `yyerror', and does not print any
+ message. If you want to print an error message, call `yyerror'
+ explicitly before the `YYERROR;' statement. *Note Error
+ Recovery::.
+
+`YYRECOVERING'
+ This macro stands for an expression that has the value 1 when the
+ parser is recovering from a syntax error, and 0 the rest of the
+ time. *Note Error Recovery::.
+
+`yychar'
+ Variable containing the current look-ahead token. (In a pure
+ parser, this is actually a local variable within `yyparse'.) When
+ there is no look-ahead token, the value `YYEMPTY' is stored in the
+ variable. *Note Look-Ahead Tokens: Look-Ahead.
+
+`yyclearin;'
+ Discard the current look-ahead token. This is useful primarily in
+ error rules. *Note Error Recovery::.
+
+`yyerrok;'
+ Resume generating error messages immediately for subsequent syntax
+ errors. This is useful primarily in error rules. *Note Error
+ Recovery::.
+
+`@$'
+ Acts like a structure variable containing information on the
+ textual position of the grouping made by the current rule. *Note
+ Tracking Locations: Locations.
+
+`@N'
+ Acts like a structure variable containing information on the
+ textual position of the Nth component of the current rule. *Note
+ Tracking Locations: Locations.
+
\1f
File: bison.info, Node: Algorithm, Next: Error Recovery, Prev: Interface, Up: Top
Parser: Debugging.
`--locations'
- Pretend that `%locactions' was specified. *Note Decl Summary::.
+ Pretend that `%locations' was specified. *Note Decl Summary::.
`-p PREFIX'
`--name-prefix=PREFIX'
- Rename the external symbols used in the parser so that they start
- with PREFIX instead of `yy'. The precise list of symbols renamed
- is `yyparse', `yylex', `yyerror', `yynerrs', `yylval', `yychar'
- and `yydebug'.
-
- For example, if you use `-p c', the names become `cparse', `clex',
- and so on.
-
- *Note Multiple Parsers in the Same Program: Multiple Parsers.
+ Pretend that `%name-prefix="PREFIX"' was specified. *Note Decl
+ Summary::.
`-l'
`--no-lines'
`-n'
`--no-parser'
- Pretend that `%no_parser' was specified. *Note Decl Summary::.
+ Pretend that `%no-parser' was specified. *Note Decl Summary::.
`-k'
`--token-table'
- Pretend that `%token_table' was specified. *Note Decl Summary::.
+ Pretend that `%token-table' was specified. *Note Decl Summary::.
Adjust the output:
`-d'
- Pretend that `%verbose' was specified, i.e., write an extra output
+`--defines'
+ Pretend that `%defines' was specified, i.e., write an extra output
file containing macro definitions for the token type names defined
in the grammar and the semantic value type `YYSTYPE', as well as a
few `extern' variable declarations. *Note Decl Summary::.
`--defines=DEFINES-FILE'
- The behaviour of -DEFINES is the same than `-d'. The only
- difference is that it has an optionnal argument which is the name
- of the output filename.
+ Same as above, but save in the file DEFINES-FILE.
`-b FILE-PREFIX'
`--file-prefix=PREFIX'
- Specify a prefix to use for all Bison output file names. The
- names are chosen as if the input file were named `PREFIX.c'.
+ Pretend that `%verbose' was specified, i.e, specify prefix to use
+ for all Bison output file names. *Note Decl Summary::.
`-v'
`--verbose'
Pretend that `%verbose' was specified, i.e, write an extra output
file containing verbose descriptions of the grammar and parser.
- *Note Decl Summary::, for more.
+ *Note Decl Summary::.
-`-o OUTFILE'
-`--output-file=OUTFILE'
- Specify the name OUTFILE for the parser file.
+`-o FILENAME'
+`--output=FILENAME'
+ Specify the FILENAME for the parser file.
- The other output files' names are constructed from OUTFILE as
+ The other output files' names are constructed from FILENAME as
described under the `-v' and `-d' options.
`-g'
--name-prefix=PREFIX -p NAME-PREFIX
--no-lines -l
--no-parser -n
- --output-file=OUTFILE -o OUTFILE
+ --output=OUTFILE -o OUTFILE
--token-table -k
--verbose -v
--version -V
-\1f
-File: bison.info, Node: VMS Invocation, Prev: Option Cross Key, Up: Invocation
-
-Invoking Bison under VMS
-========================
-
- The command line syntax for Bison on VMS is a variant of the usual
-Bison command syntax--adapted to fit VMS conventions.
-
- To find the VMS equivalent for any Bison option, start with the long
-option, and substitute a `/' for the leading `--', and substitute a `_'
-for each `-' in the name of the long option. For example, the
-following invocation under VMS:
-
- bison /debug/name_prefix=bar foo.y
-
-is equivalent to the following command under POSIX.
-
- bison --debug --name-prefix=bar foo.y
-
- The VMS file system does not permit filenames such as `foo.tab.c'.
-In the above example, the output file would instead be named
-`foo_tab.c'.
-
included in translations approved by the Free Software Foundation
instead of in the original English.
+\1f
+File: bison.info, Node: VMS Invocation, Prev: Option Cross Key, Up: Invocation
+
+Invoking Bison under VMS
+========================
+
+ The command line syntax for Bison on VMS is a variant of the usual
+Bison command syntax--adapted to fit VMS conventions.
+
+ To find the VMS equivalent for any Bison option, start with the long
+option, and substitute a `/' for the leading `--', and substitute a `_'
+for each `-' in the name of the long option. For example, the
+following invocation under VMS:
+
+ bison /debug/name_prefix=bar foo.y
+
+is equivalent to the following command under POSIX.
+
+ bison --debug --name-prefix=bar foo.y
+
+ The VMS file system does not permit filenames such as `foo.tab.c'.
+In the above example, the output file would instead be named
+`foo_tab.c'.
+
\1f
File: bison.info, Node: Table of Symbols, Next: Glossary, Prev: Invocation, Up: Top
Bison declaration to create a header file meant for the scanner.
*Note Decl Summary::.
+`%file-prefix="PREFIX"'
+ Bison declaration to set tge prefix of the output files. *Note
+ Decl Summary::.
+
`%left'
Bison declaration to assign left associativity to token(s). *Note
Operator Precedence: Precedence Decl.
-`%no_lines'
+`%name-prefix="PREFIX"'
+ Bison declaration to rename the external symbols. *Note Decl
+ Summary::.
+
+`%no-lines'
Bison declaration to avoid generating `#line' directives in the
parser file. *Note Decl Summary::.
Bison declaration to assign non-associativity to token(s). *Note
Operator Precedence: Precedence Decl.
+`%output="FILENAME"'
+ Bison declaration to set the name of the parser file. *Note Decl
+ Summary::.
+
`%prec'
Bison declaration to assign a precedence to a specific rule.
*Note Context-Dependent Precedence: Contextual Precedence.
-`%pure_parser'
+`%pure-parser'
Bison declaration to request a pure (reentrant) parser. *Note A
Pure (Reentrant) Parser: Pure Decl.
Bison declaration to declare token(s) without specifying
precedence. *Note Token Type Names: Token Decl.
-`%token_table'
+`%token-table'
Bison declaration to include a token name table in the parser file.
*Note Decl Summary::.
@cindex declaration summary
@cindex summary, Bison declaration
-Here is a summary of all Bison declarations:
+Here is a summary of the declarations used to define a grammar:
@table @code
@item %union
@item %expect
Declare the expected number of shift-reduce conflicts
(@pxref{Expect Decl, ,Suppressing Conflict Warnings}).
+@end table
-@item %yacc
-@itemx %fixed_output_files
-Pretend the option @option{--yacc} was given, i.e., imitate Yacc,
-including its naming conventions. @xref{Bison Options}, for more.
+@sp 1
+@noindent
+In order to change the behavior of @command{bison}, use the following
+directives:
+
+@table @code
+@item %debug
+Output a definition of the macro @code{YYDEBUG} into the parser file, so
+that the debugging facilities are compiled. @xref{Debugging, ,Debugging
+Your Parser}.
+
+@item %defines
+Write an extra output file containing macro definitions for the token
+type names defined in the grammar and the semantic value type
+@code{YYSTYPE}, as well as a few @code{extern} variable declarations.
+
+If the parser output file is named @file{@var{name}.c} then this file
+is named @file{@var{name}.h}.@refill
+
+This output file is essential if you wish to put the definition of
+@code{yylex} in a separate source file, because @code{yylex} needs to
+be able to refer to token type codes and the variable
+@code{yylval}. @xref{Token Values, ,Semantic Values of Tokens}.@refill
+
+@item %file-prefix="@var{prefix}"
+Specify a prefix to use for all Bison output file names. The names are
+chosen as if the input file were named @file{@var{prefix}.y}.
+
+@c @item %header_extension
+@c Specify the extension of the parser header file generated when
+@c @code{%define} or @samp{-d} are used.
+@c
+@c For example, a grammar file named @file{foo.ypp} and containing a
+@c @code{%header_extension .hh} directive will produce a header file
+@c named @file{foo.tab.hh}
@item %locations
Generate the code processing the locations (@pxref{Action Features,
grammar does not use it, using @samp{%locations} allows for more
accurate parse error messages.
-@item %pure_parser
-Request a pure (reentrant) parser program (@pxref{Pure Decl, ,A Pure
-(Reentrant) Parser}).
+@item %name-prefix="@var{prefix}"
+Rename the external symbols used in the parser so that they start with
+@var{prefix} instead of @samp{yy}. The precise list of symbols renamed
+is @code{yyparse}, @code{yylex}, @code{yyerror}, @code{yynerrs},
+@code{yylval}, @code{yychar} and @code{yydebug}. For example, if you
+use @samp{%name-prefix="c_"}, the names become @code{c_parse},
+@code{c_lex}, and so on. @xref{Multiple Parsers, ,Multiple Parsers in
+the Same Program}.
-@item %no_parser
+@item %no-parser
Do not include any C code in the parser file; generate tables only. The
parser file contains just @code{#define} directives and static variable
declarations.
into a file named @file{@var{filename}.act}, in the form of a
brace-surrounded body fit for a @code{switch} statement.
-@item %no_lines
+@item %no-lines
Don't generate any @code{#line} preprocessor commands in the parser
file. Ordinarily Bison writes these commands in the parser file so that
the C compiler and debuggers will associate errors and object code with
associate errors with the parser file, treating it an independent source
file in its own right.
-@item %debug
-Output a definition of the macro @code{YYDEBUG} into the parser file, so
-that the debugging facilities are compiled. @xref{Debugging, ,Debugging
-Your Parser}.
-
-@item %defines
-Write an extra output file containing macro definitions for the token
-type names defined in the grammar and the semantic value type
-@code{YYSTYPE}, as well as a few @code{extern} variable declarations.
-
-If the parser output file is named @file{@var{name}.c} then this file
-is named @file{@var{name}.h}.@refill
+@item %output="@var{filename}"
+Specify the @var{filename} for the parser file.
-This output file is essential if you wish to put the definition of
-@code{yylex} in a separate source file, because @code{yylex} needs to
-be able to refer to token type codes and the variable
-@code{yylval}. @xref{Token Values, ,Semantic Values of Tokens}.@refill
+@item %pure-parser
+Request a pure (reentrant) parser program (@pxref{Pure Decl, ,A Pure
+(Reentrant) Parser}).
@c @item %source_extension
@c Specify the extension of the parser output file.
@c For example, a grammar file named @file{foo.yy} and containing a
@c @code{%source_extension .cpp} directive will produce a parser file
@c named @file{foo.tab.cpp}
-@c
-@c @item %header_extension
-@c Specify the extension of the parser header file generated when
-@c @code{%define} or @samp{-d} are used.
-@c
-@c For example, a garmmar file named @file{foo.ypp} and containing a
-@c @code{%header_extension .hh} directive will produce a header file
-@c named @file{foo.tab.hh}
-
-@item %verbose
-Write an extra output file containing verbose descriptions of the
-parser states and what is done for each type of look-ahead token in
-that state.
-
-This file also describes all the conflicts, both those resolved by
-operator precedence and the unresolved ones.
-
-The file's name is made by removing @samp{.tab.c} or @samp{.c} from
-the parser output file name, and adding @samp{.output} instead.@refill
-
-Therefore, if the input file is @file{foo.y}, then the parser file is
-called @file{foo.tab.c} by default. As a consequence, the verbose
-output file is called @file{foo.output}.@refill
@item %token_table
Generate an array of token names in the parser file. The name of the
@item YYNSTATES
The number of parser states (@pxref{Parser States}).
@end table
+
+@item %verbose
+Write an extra output file containing verbose descriptions of the
+parser states and what is done for each type of look-ahead token in
+that state.
+
+This file also describes all the conflicts, both those resolved by
+operator precedence and the unresolved ones.
+
+The file's name is made by removing @samp{.tab.c} or @samp{.c} from
+the parser output file name, and adding @samp{.output} instead.@refill
+
+Therefore, if the input file is @file{foo.y}, then the parser file is
+called @file{foo.tab.c} by default. As a consequence, the verbose
+output file is called @file{foo.output}.@refill
+
+@item %yacc
+@itemx %fixed-output-files
+Pretend the option @option{--yacc} was given, i.e., imitate Yacc,
+including its naming conventions. @xref{Bison Options}, for more.
@end table
+
+
+
@node Multiple Parsers
@section Multiple Parsers in the Same Program
Your Parser}.
@item --locations
-Pretend that @code{%locactions} was specified. @xref{Decl Summary}.
+Pretend that @code{%locations} was specified. @xref{Decl Summary}.
@item -p @var{prefix}
@itemx --name-prefix=@var{prefix}
-Rename the external symbols used in the parser so that they start with
-@var{prefix} instead of @samp{yy}. The precise list of symbols renamed
-is @code{yyparse}, @code{yylex}, @code{yyerror}, @code{yynerrs},
-@code{yylval}, @code{yychar} and @code{yydebug}.
-
-For example, if you use @samp{-p c}, the names become @code{cparse},
-@code{clex}, and so on.
-
-@xref{Multiple Parsers, ,Multiple Parsers in the Same Program}.
+Pretend that @code{%name-prefix="@var{prefix}"} was specified.
+@xref{Decl Summary}.
@item -l
@itemx --no-lines
@item -n
@itemx --no-parser
-Pretend that @code{%no_parser} was specified. @xref{Decl Summary}.
+Pretend that @code{%no-parser} was specified. @xref{Decl Summary}.
@item -k
@itemx --token-table
-Pretend that @code{%token_table} was specified. @xref{Decl Summary}.
+Pretend that @code{%token-table} was specified. @xref{Decl Summary}.
@end table
@noindent
@table @option
@item -d
-Pretend that @code{%verbose} was specified, i.e., write an extra output
+@itemx --defines
+Pretend that @code{%defines} was specified, i.e., write an extra output
file containing macro definitions for the token type names defined in
the grammar and the semantic value type @code{YYSTYPE}, as well as a few
@code{extern} variable declarations. @xref{Decl Summary}.
@item --defines=@var{defines-file}
-The behaviour of @var{--defines} is the same than @samp{-d}. The only
-difference is that it has an optionnal argument which is the name of
-the output filename.
+Same as above, but save in the file @var{defines-file}.
@item -b @var{file-prefix}
@itemx --file-prefix=@var{prefix}
-Specify a prefix to use for all Bison output file names. The names are
-chosen as if the input file were named @file{@var{prefix}.c}.
+Pretend that @code{%verbose} was specified, i.e, specify prefix to use
+for all Bison output file names. @xref{Decl Summary}.
@item -v
@itemx --verbose
Pretend that @code{%verbose} was specified, i.e, write an extra output
file containing verbose descriptions of the grammar and
-parser. @xref{Decl Summary}, for more.
+parser. @xref{Decl Summary}.
-@item -o @var{outfile}
-@itemx --output-file=@var{outfile}
-Specify the name @var{outfile} for the parser file.
+@item -o @var{filename}
+@itemx --output=@var{filename}
+Specify the @var{filename} for the parser file.
-The other output files' names are constructed from @var{outfile}
-as described under the @samp{-v} and @samp{-d} options.
+The other output files' names are constructed from @var{filename} as
+described under the @samp{-v} and @samp{-d} options.
@item -g
Output a VCG definition of the LALR(1) grammar automaton computed by
be @file{foo.vcg}.
@item --graph=@var{graph-file}
-The behaviour of @var{--graph} is the same than @samp{-g}. The only
+The behaviour of @var{--graph} is the same than @samp{-g}. The only
difference is that it has an optionnal argument which is the name of
the output graph filename.
@end table
\line{ --name-prefix \leaderfill -p}
\line{ --no-lines \leaderfill -l}
\line{ --no-parser \leaderfill -n}
-\line{ --output-file \leaderfill -o}
+\line{ --output \leaderfill -o}
\line{ --token-table \leaderfill -k}
\line{ --verbose \leaderfill -v}
\line{ --version \leaderfill -V}
--name-prefix=@var{prefix} -p @var{name-prefix}
--no-lines -l
--no-parser -n
---output-file=@var{outfile} -o @var{outfile}
+--output=@var{outfile} -o @var{outfile}
--token-table -k
--verbose -v
--version -V
Bison declaration to create a header file meant for the scanner.
@xref{Decl Summary}.
+@item %file-prefix="@var{prefix}"
+Bison declaration to set tge prefix of the output files. @xref{Decl
+Summary}.
+
@c @item %source_extension
@c Bison declaration to specify the generated parser output file extension.
@c @xref{Decl Summary}.
Bison declaration to assign left associativity to token(s).
@xref{Precedence Decl, ,Operator Precedence}.
-@item %no_lines
+@item %name-prefix="@var{prefix}"
+Bison declaration to rename the external symbols. @xref{Decl Summary}.
+
+@item %no-lines
Bison declaration to avoid generating @code{#line} directives in the
parser file. @xref{Decl Summary}.
Bison declaration to assign non-associativity to token(s).
@xref{Precedence Decl, ,Operator Precedence}.
+@item %output="@var{filename}"
+Bison declaration to set the name of the parser file. @xref{Decl
+Summary}.
+
@item %prec
Bison declaration to assign a precedence to a specific rule.
@xref{Contextual Precedence, ,Context-Dependent Precedence}.
-@item %pure_parser
+@item %pure-parser
Bison declaration to request a pure (reentrant) parser.
@xref{Pure Decl, ,A Pure (Reentrant) Parser}.
Bison declaration to declare token(s) without specifying precedence.
@xref{Token Decl, ,Token Type Names}.
-@item %token_table
+@item %token-table
Bison declaration to include a token name table in the parser file.
@xref{Decl Summary}.
-@set UPDATED 20 September 2001
-@set UPDATED-MONTH September 2001
+@set UPDATED 4 November 2001
+@set UPDATED-MONTH November 2001
@set EDITION 1.30a
@set VERSION 1.30a
-@set UPDATED 20 September 2001
-@set UPDATED-MONTH September 2001
+@set UPDATED 4 November 2001
+@set UPDATED-MONTH November 2001
@set EDITION 1.30a
@set VERSION 1.30a
* Makefile.in.in: Upgrade to gettext-0.10.40.
+2001-11-02 gettextize <bug-gnu-utils@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.10.40.
+
2001-10-10 gettextize <bug-gnu-utils@gnu.org>
* Makefile.in.in: Upgrade to gettext-0.10.40.
msgid ""
msgstr ""
"Project-Id-Version: bison 1.25\n"
-"POT-Creation-Date: 2001-11-01 19:27+0100\n"
+"POT-Creation-Date: 2001-11-02 18:54+0100\n"
"PO-Revision-Date: 1996-10-10 17:54 MET DST\n"
"Last-Translator: Ulrich Drepper <drepper@gnu.ai.mit.edu>\n"
"Language-Team: German <de@li.org>\n"
msgid "symbol %s redefined"
msgstr "Symbol %s noch einmal definiert"
-#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1285
+#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1283
#, c-format
msgid "type redeclaration for %s"
msgstr "erneute Deklaration des Typs für %s"
msgid "`%s' is invalid in %s"
msgstr "»%s« ist in %s nicht erlaubt"
-#: src/reader.c:558 src/reader.c:717
+#: src/reader.c:558 src/reader.c:716
#, fuzzy, c-format
msgid "multiple %s declarations"
msgstr "mehr als eine %start Deklaration"
-#: src/reader.c:560 src/reader.c:897 src/reader.c:922 src/reader.c:1263
+#: src/reader.c:560 src/reader.c:895 src/reader.c:920 src/reader.c:1261
#, fuzzy, c-format
msgid "invalid %s declaration"
msgstr "ungültige %start Deklaration"
msgid "unexpected item: %s"
msgstr "unerwartetes Symbol: %s"
-#: src/reader.c:760 src/reader.c:1089 src/reader.c:1160
+#: src/reader.c:759 src/reader.c:1087 src/reader.c:1158
#, fuzzy, c-format
msgid "unmatched %s"
msgstr "»{« hat kein Gegenstück"
-#: src/reader.c:792
+#: src/reader.c:791
#, fuzzy, c-format
msgid "argument of %%expect is not an integer"
msgstr "Argument von %expect ist keine ganze Zahl"
-#: src/reader.c:838
+#: src/reader.c:837
#, c-format
msgid "unrecognized item %s, expected an identifier"
msgstr "unerwartetes Symbol %s, hier wird ein Bezeichner erwartet"
-#: src/reader.c:862
+#: src/reader.c:859
#, c-format
msgid "expected string constant instead of %s"
msgstr "hier wird eine Zeichenkette erwartet, nicht %s"
-#: src/reader.c:1005
+#: src/reader.c:1003
#, c-format
msgid "unrecognized: %s"
msgstr "unbekannt: %s"
-#: src/reader.c:1010
+#: src/reader.c:1008
msgid "no input grammar"
msgstr "keine Eingabe-Grammatik"
-#: src/reader.c:1015
+#: src/reader.c:1013
#, c-format
msgid "unknown character: %s"
msgstr "unbekanntes Zeichen: %s"
-#: src/reader.c:1183
+#: src/reader.c:1181
#, fuzzy, c-format
msgid "unterminated %guard clause"
msgstr "unbeendeter %%guard Fall"
-#: src/reader.c:1350
+#: src/reader.c:1348
msgid "ill-formed rule: initial symbol not followed by colon"
msgstr ""
"falsch geformte Regel: führendes Symbol wird nicht von einem Semikolon "
"gefolgt"
-#: src/reader.c:1357
+#: src/reader.c:1355
msgid "grammar starts with vertical bar"
msgstr "Grammatik fängt mit einem vertikalen Strich (»|«) an"
-#: src/reader.c:1388
+#: src/reader.c:1386
#, c-format
msgid "rule given for %s, which is a token"
msgstr "Regel für %s vorhanden, welches aber ein Token ist"
-#: src/reader.c:1490
+#: src/reader.c:1488
msgid "two @prec's in a row"
msgstr "zwei @prec Anweisungen nacheinander"
-#: src/reader.c:1498
+#: src/reader.c:1496
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr ""
"%%guard Anweisung vorhanden, jedoch wird %%semantic_parser nicht angegeben"
-#: src/reader.c:1507
+#: src/reader.c:1505
msgid "two actions at end of one rule"
msgstr "Zwei Aktionen am Ende einer Regel"
-#: src/reader.c:1521
+#: src/reader.c:1519
#, c-format
msgid "type clash (`%s' `%s') on default action"
msgstr "Typkonflikt (»%s« »%s«) bei Default Aktion"
-#: src/reader.c:1527
+#: src/reader.c:1525
msgid "empty rule for typed nonterminal, and no action"
msgstr "leere Regel für Nicht-Terminal vmit Typ und keine Aktion"
-#: src/reader.c:1571
+#: src/reader.c:1569
#, c-format
msgid "invalid input: %s"
msgstr "ungültige Eingabe: %s"
-#: src/reader.c:1579
+#: src/reader.c:1577
#, fuzzy, c-format
msgid "too many symbols (tokens plus nonterminals); maximum %d"
msgstr "zu viele Symbols (Token plus Nicht-Terminal); Maximum %s"
-#: src/reader.c:1582
+#: src/reader.c:1580
msgid "no rules in the input grammar"
msgstr "Eingabegrammatik enthält keine Regeln"
-#: src/reader.c:1606
+#: src/reader.c:1604
#, c-format
msgid "symbol %s is used, but is not defined as a token and has no rules"
msgstr ""
"Symbol %s wird benutzt, ist aber nicht als Token definiert und hat keine "
"Regel"
-#: src/reader.c:1712
+#: src/reader.c:1696
+#, fuzzy, c-format
+msgid "tokens %s and %s both assigned number %d"
+msgstr "Token %s und %s haben die selbe nummer %s"
+
+#: src/reader.c:1749
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "Vorrangwertigkeiten für %s und %s widersprechen sich"
-#: src/reader.c:1724
+#: src/reader.c:1761
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "assoc Werte für %s nd %s widersprechen sich"
-#: src/reader.c:1770
-#, fuzzy, c-format
-msgid "tokens %s and %s both assigned number %d"
-msgstr "Token %s und %s haben die selbe nummer %s"
-
-#: src/reader.c:1782
+#: src/reader.c:1800
#, c-format
msgid "the start symbol %s is undefined"
msgstr "das Startsymbol %s ist undefiniert"
-#: src/reader.c:1784
+#: src/reader.c:1802
#, c-format
msgid "the start symbol %s is a token"
msgstr "das Startsymbol %s ist ein Token"
msgid ""
msgstr ""
"Project-Id-Version: GNU bison 1.25\n"
-"POT-Creation-Date: 2001-11-01 19:27+0100\n"
+"POT-Creation-Date: 2001-11-02 18:54+0100\n"
"PO-Revision-Date: 1998-09-21 10:19+0200\n"
"Last-Translator: Nicolás García-Pedrajas <ngarcia-pedrajas@acm.org>\n"
"Language-Team: Spanish <es@li.org>\n"
msgid "symbol %s redefined"
msgstr "redefinido el símbolo %s"
-#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1285
+#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1283
#, c-format
msgid "type redeclaration for %s"
msgstr "redeclaración del tipo de %s"
msgid "`%s' is invalid in %s"
msgstr "`%s' no es válido en %s"
-#: src/reader.c:558 src/reader.c:717
+#: src/reader.c:558 src/reader.c:716
#, fuzzy, c-format
msgid "multiple %s declarations"
msgstr "múltiples declaraciones de %start"
-#: src/reader.c:560 src/reader.c:897 src/reader.c:922 src/reader.c:1263
+#: src/reader.c:560 src/reader.c:895 src/reader.c:920 src/reader.c:1261
#, fuzzy, c-format
msgid "invalid %s declaration"
msgstr "declaración de %start no válida"
msgstr "ítem inesperado: %s"
# Cambio el orden y el sexo. Ahora está "en español". sv
-#: src/reader.c:760 src/reader.c:1089 src/reader.c:1160
+#: src/reader.c:759 src/reader.c:1087 src/reader.c:1158
#, fuzzy, c-format
msgid "unmatched %s"
msgstr "`{' desemparejada"
-#: src/reader.c:792
+#: src/reader.c:791
#, fuzzy, c-format
msgid "argument of %%expect is not an integer"
msgstr "el argumento de %expect no es un entero"
# - cll
# ok - ngp
#
-#: src/reader.c:838
+#: src/reader.c:837
#, c-format
msgid "unrecognized item %s, expected an identifier"
msgstr "no se reconoce el ítem %s, se esperaba un identificador"
-#: src/reader.c:862
+#: src/reader.c:859
#, c-format
msgid "expected string constant instead of %s"
msgstr "se esperaba una cadena constante en lugar de %s"
-#: src/reader.c:1005
+#: src/reader.c:1003
#, c-format
msgid "unrecognized: %s"
msgstr "no reconocido: %s"
-#: src/reader.c:1010
+#: src/reader.c:1008
msgid "no input grammar"
msgstr "no hay gramática de entrada"
-#: src/reader.c:1015
+#: src/reader.c:1013
#, c-format
msgid "unknown character: %s"
msgstr "carácter desconocido: %s"
# mejor que `sin terminar' que me parece más "computerizado" - cll
# quizás un poco cacofónico lo de claúsula inconclusa - ngp
#
-#: src/reader.c:1183
+#: src/reader.c:1181
#, fuzzy, c-format
msgid "unterminated %guard clause"
msgstr "cláusula %%guard sin terminar"
-#: src/reader.c:1350
+#: src/reader.c:1348
msgid "ill-formed rule: initial symbol not followed by colon"
msgstr "regla mal formada: el símbolo inicial no está seguido por :"
-#: src/reader.c:1357
+#: src/reader.c:1355
msgid "grammar starts with vertical bar"
msgstr "la gramática comienza con una barra vertical"
-#: src/reader.c:1388
+#: src/reader.c:1386
#, c-format
msgid "rule given for %s, which is a token"
msgstr "se ha dado una regla para %s, que es un terminal"
-#: src/reader.c:1490
+#: src/reader.c:1488
msgid "two @prec's in a row"
msgstr "dos @prec en una línea"
# Insisto, el empleo de participios a secas me parece como hablar en
# indio. Por favor, permíteme que añada un "está" :) - cll
# ok - ngp
-#: src/reader.c:1498
+#: src/reader.c:1496
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr "%%guard presente pero %%semantic_parser está sin especificar"
-#: src/reader.c:1507
+#: src/reader.c:1505
msgid "two actions at end of one rule"
msgstr "dos acciones al final de una regla"
-#: src/reader.c:1521
+#: src/reader.c:1519
#, c-format
msgid "type clash (`%s' `%s') on default action"
msgstr "los tipos (`%s' `%s') no concuerdan en la acción por defecto"
-#: src/reader.c:1527
+#: src/reader.c:1525
msgid "empty rule for typed nonterminal, and no action"
msgstr "regla vacía para un no terminal con tipo y no hay ninguna acción"
-#: src/reader.c:1571
+#: src/reader.c:1569
#, c-format
msgid "invalid input: %s"
msgstr "entrada no válida: %s"
-#: src/reader.c:1579
+#: src/reader.c:1577
#, fuzzy, c-format
msgid "too many symbols (tokens plus nonterminals); maximum %d"
msgstr "demasiados símbolos (terminales y no terminales); máximo %s"
-#: src/reader.c:1582
+#: src/reader.c:1580
msgid "no rules in the input grammar"
msgstr "no hay reglas en la gramática de entrada"
# `token' se debe traducir como `literal' - cll
# en terminología de compiladores token es más un terminal - ngp
#
-#: src/reader.c:1606
+#: src/reader.c:1604
#, c-format
msgid "symbol %s is used, but is not defined as a token and has no rules"
msgstr ""
"se usa el símbolo %s, pero no está definido como terminal y no tiene reglas"
-#: src/reader.c:1712
+#: src/reader.c:1696
+#, fuzzy, c-format
+msgid "tokens %s and %s both assigned number %d"
+msgstr "los terminales %s y %s tienen asignados ambos el número %s"
+
+#: src/reader.c:1749
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "precedencias en conflicto entre %s y %s"
-#: src/reader.c:1724
+#: src/reader.c:1761
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "conflicto de valores assoc para %s y %s"
-#: src/reader.c:1770
-#, fuzzy, c-format
-msgid "tokens %s and %s both assigned number %d"
-msgstr "los terminales %s y %s tienen asignados ambos el número %s"
-
-#: src/reader.c:1782
+#: src/reader.c:1800
#, c-format
msgid "the start symbol %s is undefined"
msgstr "el símbolo de inicio (axioma) %s no está definido"
-#: src/reader.c:1784
+#: src/reader.c:1802
#, c-format
msgid "the start symbol %s is a token"
msgstr "el símbolo de inicio (axioma) %s es un terminal"
msgid ""
msgstr ""
"Project-Id-Version: bison 1.29f\n"
-"POT-Creation-Date: 2001-11-01 19:27+0100\n"
+"POT-Creation-Date: 2001-11-02 18:54+0100\n"
"PO-Revision-Date: 2001-10-19 17:53+02:00\n"
"Last-Translator: Toomas Soome <tsoome@ut.ee>\n"
"Language-Team: Estonian <et@li.org>\n"
msgid "symbol %s redefined"
msgstr "sümbol %s on uuesti defineeritud"
-#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1285
+#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1283
#, c-format
msgid "type redeclaration for %s"
msgstr "%s tüübi uuesti deklareerimine"
msgid "`%s' is invalid in %s"
msgstr "`%s' ei ole %s sees lubatud"
-#: src/reader.c:558 src/reader.c:717
+#: src/reader.c:558 src/reader.c:716
#, c-format
msgid "multiple %s declarations"
msgstr "korduvad %s deklaratsioonid"
-#: src/reader.c:560 src/reader.c:897 src/reader.c:922 src/reader.c:1263
+#: src/reader.c:560 src/reader.c:895 src/reader.c:920 src/reader.c:1261
#, c-format
msgid "invalid %s declaration"
msgstr "vigane %s deklaratsioon"
msgid "unexpected item: %s"
msgstr "ootamatu element: %s"
-#: src/reader.c:760 src/reader.c:1089 src/reader.c:1160
+#: src/reader.c:759 src/reader.c:1087 src/reader.c:1158
#, c-format
msgid "unmatched %s"
msgstr "puudub %s"
-#: src/reader.c:792
+#: src/reader.c:791
#, c-format
msgid "argument of %%expect is not an integer"
msgstr "%%expect argument ei ole täisarv"
-#: src/reader.c:838
+#: src/reader.c:837
#, c-format
msgid "unrecognized item %s, expected an identifier"
msgstr "tundmatu element %s, eeldasin identifikaatorit"
-#: src/reader.c:862
+#: src/reader.c:859
#, c-format
msgid "expected string constant instead of %s"
msgstr "eeldasin %s asemel sõnekonstanti"
-#: src/reader.c:1005
+#: src/reader.c:1003
#, c-format
msgid "unrecognized: %s"
msgstr "tundmatu: %s"
-#: src/reader.c:1010
+#: src/reader.c:1008
msgid "no input grammar"
msgstr "sisendgrammatikat pole"
-#: src/reader.c:1015
+#: src/reader.c:1013
#, c-format
msgid "unknown character: %s"
msgstr "tundmatu sümbol: %s"
-#: src/reader.c:1183
+#: src/reader.c:1181
#, c-format
msgid "unterminated %guard clause"
msgstr "lõpetamata %guard klausel"
-#: src/reader.c:1350
+#: src/reader.c:1348
msgid "ill-formed rule: initial symbol not followed by colon"
msgstr "vigaselt formeeritud reegel: algsümbolile ei järgne koolonit"
-#: src/reader.c:1357
+#: src/reader.c:1355
msgid "grammar starts with vertical bar"
msgstr "grammatika algab püstkriipsuga"
-#: src/reader.c:1388
+#: src/reader.c:1386
#, c-format
msgid "rule given for %s, which is a token"
msgstr "%s jaoks on antud reegel, aga see on märk"
-#: src/reader.c:1490
+#: src/reader.c:1488
msgid "two @prec's in a row"
msgstr "kaks @prec ühel real"
-#: src/reader.c:1498
+#: src/reader.c:1496
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr "%%guard on määratud, aga %%semantic_parser ei ole"
-#: src/reader.c:1507
+#: src/reader.c:1505
msgid "two actions at end of one rule"
msgstr "kaks tegevust ühe reegli lõpus"
-#: src/reader.c:1521
+#: src/reader.c:1519
#, c-format
msgid "type clash (`%s' `%s') on default action"
msgstr "vaikimisi tegevuse tüübikonflikt (`%s' `%s')"
-#: src/reader.c:1527
+#: src/reader.c:1525
msgid "empty rule for typed nonterminal, and no action"
msgstr "tüübiga mitteterminalil on tühi reegel ja puudub tegevus"
-#: src/reader.c:1571
+#: src/reader.c:1569
#, c-format
msgid "invalid input: %s"
msgstr "vigane sisend: %s"
-#: src/reader.c:1579
+#: src/reader.c:1577
#, c-format
msgid "too many symbols (tokens plus nonterminals); maximum %d"
msgstr "liiga palju sümboleid (märgid ja mitteterminalid); maksimaalne on %d"
-#: src/reader.c:1582
+#: src/reader.c:1580
msgid "no rules in the input grammar"
msgstr "sisendgrammatikas pole reegleid"
-#: src/reader.c:1606
+#: src/reader.c:1604
#, c-format
msgid "symbol %s is used, but is not defined as a token and has no rules"
msgstr ""
"kasutatakse sümbolit %s, mis ei ole defineeritud märgina ja millel puuduvad "
"reeglid"
-#: src/reader.c:1712
+#: src/reader.c:1696
+#, c-format
+msgid "tokens %s and %s both assigned number %d"
+msgstr "märkidele %s ja %s on mõlemale omistatud number %d"
+
+#: src/reader.c:1749
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "%s ja %s omavad konfliktseid prioriteete"
-#: src/reader.c:1724
+#: src/reader.c:1761
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "%s ja %s omavad konfliktseid assotsiatiivseid väärtuseid"
-#: src/reader.c:1770
-#, c-format
-msgid "tokens %s and %s both assigned number %d"
-msgstr "märkidele %s ja %s on mõlemale omistatud number %d"
-
-#: src/reader.c:1782
+#: src/reader.c:1800
#, c-format
msgid "the start symbol %s is undefined"
msgstr "stardisümbol %s ei ole defineeritud"
-#: src/reader.c:1784
+#: src/reader.c:1802
#, c-format
msgid "the start symbol %s is a token"
msgstr "stardisümbol %s on märk"
msgid ""
msgstr ""
"Project-Id-Version: GNU bison 1.29f\n"
-"POT-Creation-Date: 2001-11-01 19:27+0100\n"
+"POT-Creation-Date: 2001-11-02 18:54+0100\n"
"PO-Revision-Date: 2001-10-19 15:00-0500\n"
"Last-Translator: Michel Robitaille <robitail@IRO.UMontreal.CA>\n"
"Language-Team: French <traduc@traduc.org>\n"
msgid "symbol %s redefined"
msgstr "symbole %s redéfini"
-#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1285
+#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1283
#, c-format
msgid "type redeclaration for %s"
msgstr "redéclaration du type de %s"
msgid "`%s' is invalid in %s"
msgstr "`%s' n'est pas valide dans %s"
-#: src/reader.c:558 src/reader.c:717
+#: src/reader.c:558 src/reader.c:716
#, c-format
msgid "multiple %s declarations"
msgstr "multiples déclarations %s"
-#: src/reader.c:560 src/reader.c:897 src/reader.c:922 src/reader.c:1263
+#: src/reader.c:560 src/reader.c:895 src/reader.c:920 src/reader.c:1261
#, c-format
msgid "invalid %s declaration"
msgstr "la déclaration %s n'est pas valide"
msgid "unexpected item: %s"
msgstr "item inattendu: %s"
-#: src/reader.c:760 src/reader.c:1089 src/reader.c:1160
+#: src/reader.c:759 src/reader.c:1087 src/reader.c:1158
#, c-format
msgid "unmatched %s"
msgstr "non appariement de %s"
-#: src/reader.c:792
+#: src/reader.c:791
#, c-format
msgid "argument of %%expect is not an integer"
msgstr "le paramètre de %%expect n'est pas un entier"
-#: src/reader.c:838
+#: src/reader.c:837
#, c-format
msgid "unrecognized item %s, expected an identifier"
msgstr "item %s non reconnu, un identificateur est attendu"
-#: src/reader.c:862
+#: src/reader.c:859
#, c-format
msgid "expected string constant instead of %s"
msgstr "chaîne de caractères constante attendue plutôt que %s"
-#: src/reader.c:1005
+#: src/reader.c:1003
#, c-format
msgid "unrecognized: %s"
msgstr "non reconnu: %s"
-#: src/reader.c:1010
+#: src/reader.c:1008
msgid "no input grammar"
msgstr "aucune grammaire en entrée"
-#: src/reader.c:1015
+#: src/reader.c:1013
#, c-format
msgid "unknown character: %s"
msgstr "caractère inconnu: %s"
-#: src/reader.c:1183
+#: src/reader.c:1181
#, c-format
msgid "unterminated %guard clause"
msgstr "clause %guard non terminée"
-#: src/reader.c:1350
+#: src/reader.c:1348
msgid "ill-formed rule: initial symbol not followed by colon"
msgstr "règle mal formée: le symbole initial n'est pas suivi de `:'"
-#: src/reader.c:1357
+#: src/reader.c:1355
msgid "grammar starts with vertical bar"
msgstr "la grammaire débute par une barre verticale"
-#: src/reader.c:1388
+#: src/reader.c:1386
#, c-format
msgid "rule given for %s, which is a token"
msgstr "la règle pour %s, qui est un terminal"
-#: src/reader.c:1490
+#: src/reader.c:1488
msgid "two @prec's in a row"
msgstr "deux @prec de suite"
-#: src/reader.c:1498
+#: src/reader.c:1496
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr "%%guard est présent mais %%semantic_parser n'est pas spécifié"
-#: src/reader.c:1507
+#: src/reader.c:1505
msgid "two actions at end of one rule"
msgstr "deux actions à la fin d'une même règle"
-#: src/reader.c:1521
+#: src/reader.c:1519
#, c-format
msgid "type clash (`%s' `%s') on default action"
msgstr "conflit de type (`%s' `%s') pour l'action par défaut"
-#: src/reader.c:1527
+#: src/reader.c:1525
msgid "empty rule for typed nonterminal, and no action"
msgstr "règle vide pour une catégorie typée et aucune action"
-#: src/reader.c:1571
+#: src/reader.c:1569
#, c-format
msgid "invalid input: %s"
msgstr "entrée non valide: %s"
-#: src/reader.c:1579
+#: src/reader.c:1577
#, c-format
msgid "too many symbols (tokens plus nonterminals); maximum %d"
msgstr "trop de symboles (jeton plus non terminaux); maximum %d"
-#: src/reader.c:1582
+#: src/reader.c:1580
msgid "no rules in the input grammar"
msgstr "la grammaire n'a pas de règles"
-#: src/reader.c:1606
+#: src/reader.c:1604
#, c-format
msgid "symbol %s is used, but is not defined as a token and has no rules"
msgstr ""
"le symbole %s est utilisé mais ce n'est pas un terminal et il ne possède pas "
"de règle"
-#: src/reader.c:1712
+#: src/reader.c:1696
+#, c-format
+msgid "tokens %s and %s both assigned number %d"
+msgstr "les jetons %s et %s se sont vus assigner le nombre %d"
+
+#: src/reader.c:1749
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "les priorités pour %s et %s entrent en conflit"
-#: src/reader.c:1724
+#: src/reader.c:1761
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "les valeurs d'association de %s et %s entrent en conflit"
-#: src/reader.c:1770
-#, c-format
-msgid "tokens %s and %s both assigned number %d"
-msgstr "les jetons %s et %s se sont vus assigner le nombre %d"
-
-#: src/reader.c:1782
+#: src/reader.c:1800
#, c-format
msgid "the start symbol %s is undefined"
msgstr "le symbole de départ %s n'est pas défini"
-#: src/reader.c:1784
+#: src/reader.c:1802
#, c-format
msgid "the start symbol %s is a token"
msgstr "le symbole de départ %s est un terminal"
msgid ""
msgstr ""
"Project-Id-Version: GNU bison 1.28\n"
-"POT-Creation-Date: 2001-11-01 19:27+0100\n"
+"POT-Creation-Date: 2001-11-02 18:54+0100\n"
"PO-Revision-Date: 1999-09-28 21:10+0900\n"
"Last-Translator: Daisuke Yamashita <yamad@mb.infoweb.ne.jp>\n"
"Language-Team: Japanese <ja@li.org>\n"
msgid "symbol %s redefined"
msgstr "¥·¥ó¥Ü¥ë %s ¤¬ºÆÄêµÁ¤µ¤ì¤Þ¤·¤¿"
-#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1285
+#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1283
#, c-format
msgid "type redeclaration for %s"
msgstr "%s ¤Î·¿¤¬ºÆÄêµÁ¤µ¤ì¤Þ¤·¤¿"
msgid "`%s' is invalid in %s"
msgstr "%2$s Æâ¤Î `%1$s' ¤Ï̵¸ú¤Ç¤¹"
-#: src/reader.c:558 src/reader.c:717
+#: src/reader.c:558 src/reader.c:716
#, fuzzy, c-format
msgid "multiple %s declarations"
msgstr "Ê£¿ô¤Î %start ¤¬Àë¸À¤µ¤ì¤Þ¤·¤¿"
-#: src/reader.c:560 src/reader.c:897 src/reader.c:922 src/reader.c:1263
+#: src/reader.c:560 src/reader.c:895 src/reader.c:920 src/reader.c:1261
#, fuzzy, c-format
msgid "invalid %s declaration"
msgstr "̵¸ú¤Ê %start ¤¬Àë¸À¤µ¤ì¤Þ¤·¤¿"
msgid "unexpected item: %s"
msgstr "ͽ´ü¤»¤Ì¥¢¥¤¥Æ¥à: %s"
-#: src/reader.c:760 src/reader.c:1089 src/reader.c:1160
+#: src/reader.c:759 src/reader.c:1087 src/reader.c:1158
#, fuzzy, c-format
msgid "unmatched %s"
msgstr "Âбþ¤Î¤Ê¤¤ `{' ¤Ç¤¹"
-#: src/reader.c:792
+#: src/reader.c:791
#, fuzzy, c-format
msgid "argument of %%expect is not an integer"
msgstr "%expect ¤Î°ú¿ô¤¬À°¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó"
-#: src/reader.c:838
+#: src/reader.c:837
#, c-format
msgid "unrecognized item %s, expected an identifier"
msgstr "ǧ¼±¤Ç¤¤Ê¤¤¥¢¥¤¥Æ¥à %s¡¢¤³¤³¤Ç¤Ï¼±Ê̻Ҥ¬´üÂÔ¤µ¤ì¤Þ¤¹"
-#: src/reader.c:862
+#: src/reader.c:859
#, c-format
msgid "expected string constant instead of %s"
msgstr "¤³¤³¤Ç¤Ï %s ¤Ç¤Ï¤Ê¤¯Ê¸»úÎóÄê¿ô¤¬´üÂÔ¤µ¤ì¤Þ¤¹"
-#: src/reader.c:1005
+#: src/reader.c:1003
#, c-format
msgid "unrecognized: %s"
msgstr "ǧ¼±¤Ç¤¤Ê¤¤: %s"
-#: src/reader.c:1010
+#: src/reader.c:1008
msgid "no input grammar"
msgstr "ʸˡ¤ÎÆþÎϤ¬Ìµ¤¤"
-#: src/reader.c:1015
+#: src/reader.c:1013
#, c-format
msgid "unknown character: %s"
msgstr "̤ÃΤÎʸ»ú: %s"
-#: src/reader.c:1183
+#: src/reader.c:1181
#, fuzzy, c-format
msgid "unterminated %guard clause"
msgstr "ÊĤ¸¤é¤ì¤Æ¤¤¤Ê¤¤ %%guard Àá¤Ç¤¹"
-#: src/reader.c:1350
+#: src/reader.c:1348
msgid "ill-formed rule: initial symbol not followed by colon"
msgstr "¼Ù°¤Êµ¬Â§: ½é´ü²½¥·¥ó¥Ü¥ë¤Ë¥³¥í¥ó (:) ¤¬Â³¤¤¤Æ¤¤¤Þ¤»¤ó"
-#: src/reader.c:1357
+#: src/reader.c:1355
msgid "grammar starts with vertical bar"
msgstr "ʸˡ¤Ï½ÄËÀ (|) ¤Ç»Ï¤á¤Þ¤¹"
-#: src/reader.c:1388
+#: src/reader.c:1386
#, c-format
msgid "rule given for %s, which is a token"
msgstr "%s ¤Ëµ¬Â§¤¬Í¿¤¨¤é¤ì¡¢¤½¤ì¤Ï¥È¡¼¥¯¥ó¤È¤Ê¤ê¤Þ¤¹"
-#: src/reader.c:1490
+#: src/reader.c:1488
msgid "two @prec's in a row"
msgstr "@prec ¤Î¤â¤ÎÆó¤Ä¤¬Æ±Îó¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹"
-#: src/reader.c:1498
+#: src/reader.c:1496
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr "%%guard ¤¬¤¢¤ê¤Þ¤¹¤¬ %%semantic_parser ¤¬»ØÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó"
-#: src/reader.c:1507
+#: src/reader.c:1505
msgid "two actions at end of one rule"
msgstr "°ì¤Ä¤Îµ¬Â§¤Î½ª¤ê¤ËÆó¤Ä¤Îưºî¤ò»ØÄꤷ¤Æ¤¤¤Þ¤¹"
-#: src/reader.c:1521
+#: src/reader.c:1519
#, c-format
msgid "type clash (`%s' `%s') on default action"
msgstr "½é´ü¾õÂÖ¤ÎÆ°ºî¤Ç¤Ï·¿ (`%s' `%s') ¤¬¾×ÆÍ¤·¤Þ¤¹"
-#: src/reader.c:1527
+#: src/reader.c:1525
msgid "empty rule for typed nonterminal, and no action"
msgstr "¶õ¤Î·¿ÉÕ¤Èó½ªÃ¼¥¢¥¤¥Æ¥àÍѵ¬Â§¤Ç¤¢¤ê¡¢Æ°ºî¤¬µ¯¤ê¤Þ¤»¤ó"
-#: src/reader.c:1571
+#: src/reader.c:1569
#, c-format
msgid "invalid input: %s"
msgstr "̵¸ú¤ÊÆþÎÏ: %s"
-#: src/reader.c:1579
+#: src/reader.c:1577
#, fuzzy, c-format
msgid "too many symbols (tokens plus nonterminals); maximum %d"
msgstr "¥·¥ó¥Ü¥ë¤¬Â¿¤¹¤®¤Þ¤¹ (¥È¡¼¥¯¥ó¤ÈÈó½ªÃ¼¥¢¥¤¥Æ¥à) -- ºÇÂç %s"
-#: src/reader.c:1582
+#: src/reader.c:1580
msgid "no rules in the input grammar"
msgstr "ÆþÎϤ·¤¿Ê¸Ë¡¤Ëµ¬Â§¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó"
-#: src/reader.c:1606
+#: src/reader.c:1604
#, c-format
msgid "symbol %s is used, but is not defined as a token and has no rules"
msgstr ""
"¥·¥ó¥Ü¥ë %s ¤¬»È¤ï¤ì¤Æ¤¤¤Þ¤¹¤¬¡¢¥È¡¼¥¯¥ó¤È¤·¤ÆÄêµÁ¤µ¤ì¤Æ¤ª¤é¤º¡¢µ¬Â§¤ò»ý¤Á¤Þ"
"¤»¤ó"
-#: src/reader.c:1712
+#: src/reader.c:1696
+#, fuzzy, c-format
+msgid "tokens %s and %s both assigned number %d"
+msgstr "¥È¡¼¥¯¥ó %s ¤È %s ¤ÎÁÐÊý¤¬ÈÖ¹æ %s ¤Ë³ä¤êÅö¤Æ¤é¤ì¤Þ¤·¤¿"
+
+#: src/reader.c:1749
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "Àè¹Ô¤·¤Æ¤¤¤ë %s ¤È %s ¤Ç¶¥¹ç¤¬À¸¤¸¤Æ¤¤¤Þ¤¹"
-#: src/reader.c:1724
+#: src/reader.c:1761
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "Èó·ë¹çÃÍ %s ¤È %s ¤Ç¶¥¹ç¤¬À¸¤¸¤Æ¤¤¤Þ¤¹"
-#: src/reader.c:1770
-#, fuzzy, c-format
-msgid "tokens %s and %s both assigned number %d"
-msgstr "¥È¡¼¥¯¥ó %s ¤È %s ¤ÎÁÐÊý¤¬ÈÖ¹æ %s ¤Ë³ä¤êÅö¤Æ¤é¤ì¤Þ¤·¤¿"
-
-#: src/reader.c:1782
+#: src/reader.c:1800
#, c-format
msgid "the start symbol %s is undefined"
msgstr "³«»Ï¥·¥ó¥Ü¥ë %s ¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó"
-#: src/reader.c:1784
+#: src/reader.c:1802
#, c-format
msgid "the start symbol %s is a token"
msgstr "³«»Ï¥·¥ó¥Ü¥ë %s ¤Ï¥È¡¼¥¯¥ó¤Ç¤¹"
msgid ""
msgstr ""
"Project-Id-Version: bison 1.25\n"
-"POT-Creation-Date: 2001-11-01 19:27+0100\n"
+"POT-Creation-Date: 2001-11-02 18:54+0100\n"
"PO-Revision-Date: 1996-08-27 15:34 MET DST\n"
"Last-Translator: Erick Branderhorst <branderh@debian.org>\n"
"Language-Team: Dutch <nl@li.org>\n"
msgid "symbol %s redefined"
msgstr "symbool %s opnieuw gedefinieerd"
-#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1285
+#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1283
#, c-format
msgid "type redeclaration for %s"
msgstr "type herdeclaratie voor %s"
msgid "`%s' is invalid in %s"
msgstr "`%s' is onjuist in %s"
-#: src/reader.c:558 src/reader.c:717
+#: src/reader.c:558 src/reader.c:716
#, fuzzy, c-format
msgid "multiple %s declarations"
msgstr "meerdere %start declaraties"
-#: src/reader.c:560 src/reader.c:897 src/reader.c:922 src/reader.c:1263
+#: src/reader.c:560 src/reader.c:895 src/reader.c:920 src/reader.c:1261
#, fuzzy, c-format
msgid "invalid %s declaration"
msgstr "onjuiste %start declaratie"
msgid "unexpected item: %s"
msgstr "onbekend item: %s"
-#: src/reader.c:760 src/reader.c:1089 src/reader.c:1160
+#: src/reader.c:759 src/reader.c:1087 src/reader.c:1158
#, fuzzy, c-format
msgid "unmatched %s"
msgstr "niet overeenkomstige `{'"
-#: src/reader.c:792
+#: src/reader.c:791
#, fuzzy, c-format
msgid "argument of %%expect is not an integer"
msgstr "argument van %expect is niet een integer"
-#: src/reader.c:838
+#: src/reader.c:837
#, c-format
msgid "unrecognized item %s, expected an identifier"
msgstr "onbekend item %s, verwacht een identifier"
-#: src/reader.c:862
+#: src/reader.c:859
#, c-format
msgid "expected string constant instead of %s"
msgstr "verwacht string constante in plaats van %s"
-#: src/reader.c:1005
+#: src/reader.c:1003
#, c-format
msgid "unrecognized: %s"
msgstr "onbekend: %s"
-#: src/reader.c:1010
+#: src/reader.c:1008
msgid "no input grammar"
msgstr "geen invoer grammatica"
-#: src/reader.c:1015
+#: src/reader.c:1013
#, c-format
msgid "unknown character: %s"
msgstr "onbekend karakter: %s"
-#: src/reader.c:1183
+#: src/reader.c:1181
#, fuzzy, c-format
msgid "unterminated %guard clause"
msgstr "niet getermineerde %%guard voorwaarde"
-#: src/reader.c:1350
+#: src/reader.c:1348
msgid "ill-formed rule: initial symbol not followed by colon"
msgstr ""
"slecht geformuleerde regel: initieel symbool niet gevolgd door dubbele punt"
-#: src/reader.c:1357
+#: src/reader.c:1355
msgid "grammar starts with vertical bar"
msgstr "grammatica start met een verticale bar"
-#: src/reader.c:1388
+#: src/reader.c:1386
#, c-format
msgid "rule given for %s, which is a token"
msgstr "regel geven voor %s, welke een teken is"
-#: src/reader.c:1490
+#: src/reader.c:1488
msgid "two @prec's in a row"
msgstr "twee @prec's in een regel"
-#: src/reader.c:1498
+#: src/reader.c:1496
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr "%%guard aanwezig maar %%semantic_parser niet gespecificeerd"
-#: src/reader.c:1507
+#: src/reader.c:1505
msgid "two actions at end of one rule"
msgstr "twee akties aan het einde van een regel"
-#: src/reader.c:1521
+#: src/reader.c:1519
#, c-format
msgid "type clash (`%s' `%s') on default action"
msgstr "type clash (`%s' `%s') bij standaard aktie"
-#: src/reader.c:1527
+#: src/reader.c:1525
msgid "empty rule for typed nonterminal, and no action"
msgstr "lege regel voor getypte niet terminal, en geen aktie"
-#: src/reader.c:1571
+#: src/reader.c:1569
#, c-format
msgid "invalid input: %s"
msgstr "ongeldige invoer: %s"
-#: src/reader.c:1579
+#: src/reader.c:1577
#, fuzzy, c-format
msgid "too many symbols (tokens plus nonterminals); maximum %d"
msgstr "te veel symbolen (tekens plus nietterminals); maximum %s"
-#: src/reader.c:1582
+#: src/reader.c:1580
msgid "no rules in the input grammar"
msgstr "geen regels voor invoer grammatica"
-#: src/reader.c:1606
+#: src/reader.c:1604
#, c-format
msgid "symbol %s is used, but is not defined as a token and has no rules"
msgstr ""
"symbool %s is gebruikt, maar is niet gedefinieerd als een teken en\n"
"heeft geen regels"
-#: src/reader.c:1712
+#: src/reader.c:1696
+#, c-format
+msgid "tokens %s and %s both assigned number %d"
+msgstr ""
+
+#: src/reader.c:1749
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "conflictuerende precedentein voor %s en %s"
-#: src/reader.c:1724
+#: src/reader.c:1761
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "conflictuerende associatieve waarden voor %s en %s"
-#: src/reader.c:1770
-#, c-format
-msgid "tokens %s and %s both assigned number %d"
-msgstr ""
-
-#: src/reader.c:1782
+#: src/reader.c:1800
#, c-format
msgid "the start symbol %s is undefined"
msgstr ""
-#: src/reader.c:1784
+#: src/reader.c:1802
#, c-format
msgid "the start symbol %s is a token"
msgstr "het start symbool %s is een token"
msgid ""
msgstr ""
"Project-Id-Version: bison 1.29\n"
-"POT-Creation-Date: 2001-11-01 19:27+0100\n"
+"POT-Creation-Date: 2001-11-02 18:54+0100\n"
"PO-Revision-Date: 2001-09-09 13:49+04:00\n"
"Last-Translator: Dmitry S. Sivachenko <dima@Chg.RU>\n"
"Language-Team: Russian <ru@li.org>\n"
msgid "symbol %s redefined"
msgstr "ÐÏ×ÔÏÒÎÏÅ ÏÐÒÅÄÅÌÅÎÉÅ ÓÉÍ×ÏÌÁ %s"
-#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1285
+#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1283
#, c-format
msgid "type redeclaration for %s"
msgstr "ÐÏ×ÔÏÒÎÏÅ ÏÐÉÓÁÎÉÅ ÔÉÐÁ ÄÌÑ %s"
msgid "`%s' is invalid in %s"
msgstr "`%s' ÎÅ×ÅÒÎÏ × %s"
-#: src/reader.c:558 src/reader.c:717
+#: src/reader.c:558 src/reader.c:716
#, c-format
msgid "multiple %s declarations"
msgstr "ÍÎÏÖÅÓÔ×ÅÎÎÏÅ ÏÐÉÓÁÎÉÅ %s"
-#: src/reader.c:560 src/reader.c:897 src/reader.c:922 src/reader.c:1263
+#: src/reader.c:560 src/reader.c:895 src/reader.c:920 src/reader.c:1261
#, c-format
msgid "invalid %s declaration"
msgstr "ÎÅ×ÅÒÎÏÅ ÏÐÉÓÁÎÉÅ %s"
msgid "unexpected item: %s"
msgstr "ÎÅÏÖÉÄÁÎÎÙÊ ÜÌÅÍÅÎÔ: %s"
-#: src/reader.c:760 src/reader.c:1089 src/reader.c:1160
+#: src/reader.c:759 src/reader.c:1087 src/reader.c:1158
#, c-format
msgid "unmatched %s"
msgstr "ÎÅÐÁÒÎÁÑ %s"
-#: src/reader.c:792
+#: src/reader.c:791
#, c-format
msgid "argument of %%expect is not an integer"
msgstr "ÁÒÇÕÍÅÎÔ %%expect ÎÅ Ñ×ÌÑÅÔÓÑ ÃÅÌÙÍ ÞÉÓÌÏÍ"
-#: src/reader.c:838
+#: src/reader.c:837
#, c-format
msgid "unrecognized item %s, expected an identifier"
msgstr "ÎÅÒÁÓÐÏÚÎÁÎÎÙÊ ÜÌÅÍÅÎÔ %s, ÏÖÉÄÁÌÓÑ ÉÄÅÎÔÉÆÉËÁÔÏÒ"
-#: src/reader.c:862
+#: src/reader.c:859
#, c-format
msgid "expected string constant instead of %s"
msgstr "×ÍÅÓÔÏ %s ÏÖÉÄÁÌÁÓØ ÓÔÒÏËÏ×ÁÑ ÐÏÓÔÏÑÎÎÁÑ"
-#: src/reader.c:1005
+#: src/reader.c:1003
#, c-format
msgid "unrecognized: %s"
msgstr "ÎÅÒÁÓÐÏÚÎÁÎÏ: %s"
-#: src/reader.c:1010
+#: src/reader.c:1008
msgid "no input grammar"
msgstr "ÎÅÔ ×ÈÏÄÎÏÊ ÇÒÁÍÍÁÔÉËÉ"
-#: src/reader.c:1015
+#: src/reader.c:1013
#, c-format
msgid "unknown character: %s"
msgstr "ÎÅÉÚ×ÅÓÔÎÙÊ ÓÉÍ×ÏÌ: %s"
-#: src/reader.c:1183
+#: src/reader.c:1181
#, c-format
msgid "unterminated %guard clause"
msgstr "ÎÅÚÁËÏÎÞÅÎÎÙÊ ÏÐÅÒÁÔÏÒ %guard"
-#: src/reader.c:1350
+#: src/reader.c:1348
msgid "ill-formed rule: initial symbol not followed by colon"
msgstr "ÎÅ×ÅÒÎÏÅ ÐÒÁ×ÉÌÏ: Ä×ÏÅÔÏÞÉÅ ÎÅ ÓÌÅÄÕÅÔ ÚÁ ÎÁÞÁÌØÎÙÍ ÓÉÍ×ÏÌÏÍ"
-#: src/reader.c:1357
+#: src/reader.c:1355
msgid "grammar starts with vertical bar"
msgstr "ÇÒÁÍÍÁÔÉËÁ ÎÁÞÉÎÁÅÔÓÑ Ó ×ÅÒÔÉËÁÌØÎÏÊ ÞÅÒÔÙ"
-#: src/reader.c:1388
+#: src/reader.c:1386
#, c-format
msgid "rule given for %s, which is a token"
msgstr "ÐÒÁ×ÉÌÏ ÚÁÄÁÎÏ ÄÌÑ %s, ËÏÔÏÒÙÊ Ñ×ÌÑÅÔÓÑ ÌÅËÓÅÍÏÊ"
-#: src/reader.c:1490
+#: src/reader.c:1488
msgid "two @prec's in a row"
msgstr "Ä×Á @prec ÐÏÄÒÑÄ"
-#: src/reader.c:1498
+#: src/reader.c:1496
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr "%%guard ÐÒÉÓÕÔÓÔ×ÕÅÔ, Á %%semantic_parser ÎÅ ÚÁÄÁÎ"
-#: src/reader.c:1507
+#: src/reader.c:1505
msgid "two actions at end of one rule"
msgstr "Ä×Á ÄÅÊÓÔ×ÉÑ × ËÏÎÃÅ ÏÄÎÏÇÏ ÐÒÁ×ÉÌÁ"
-#: src/reader.c:1521
+#: src/reader.c:1519
#, c-format
msgid "type clash (`%s' `%s') on default action"
msgstr "ËÏÎÆÌÉËÔ ÔÉÐÏ× (`%s' `%s') ÎÁ ÄÅÊÓÔ×ÉÉ ÐÏ ÕÍÏÌÞÁÎÉÀ"
-#: src/reader.c:1527
+#: src/reader.c:1525
msgid "empty rule for typed nonterminal, and no action"
msgstr ""
"ÐÕÓÔÏÅ ÐÒÁ×ÉÌÏ ÄÌÑ ÔÉÐÉÚÉÒÏ×ÁÎÎÏÇÏ ÎÅÔÅÒÍÉÎÁÌØÎÏÇÏ ÓÉÍ×ÏÌÁ, É ÎÅÔ ÄÅÊÓÔ×ÉÑ"
-#: src/reader.c:1571
+#: src/reader.c:1569
#, c-format
msgid "invalid input: %s"
msgstr "ÎÅ×ÅÒÎÙÅ ×ÈÏÄÎÙÅ ÄÁÎÎÙÅ: %s"
-#: src/reader.c:1579
+#: src/reader.c:1577
#, c-format
msgid "too many symbols (tokens plus nonterminals); maximum %d"
msgstr "ÓÌÉÛËÏÍ ÍÎÏÇÏ ÓÉÍ×ÏÌÏ× (ÌÅËÓÅÍÙ ÐÌÀÓ ÎÅÔÅÒÍÉÎÁÌÙ); ÍÁËÓÉÍÁÌØÎÏ %d"
-#: src/reader.c:1582
+#: src/reader.c:1580
msgid "no rules in the input grammar"
msgstr "ÏÔÓÕÔÓÔ×ÕÀÔ ÐÒÁ×ÉÌÁ ×Ï ×ÈÏÄÎÏÊ ÇÒÁÍÍÁÔÉËÅ"
-#: src/reader.c:1606
+#: src/reader.c:1604
#, c-format
msgid "symbol %s is used, but is not defined as a token and has no rules"
msgstr "ÓÉÍ×ÏÌ %s ÉÓÐÏÌØÚÕÅÔÓÑ, ÎÏ ÎÅ ÏÐÒÅÄÅÌÅÎ ËÁË ÌÅËÓÅÍÁ É ÎÅ ÉÍÅÅÔ ÐÒÁ×ÉÌ"
-#: src/reader.c:1712
+#: src/reader.c:1696
+#, c-format
+msgid "tokens %s and %s both assigned number %d"
+msgstr "ÏÂÅÉÍ ÌÅËÓÅÍÁÍ %s É %s ÐÒÉÓ×ÏÅÎ ÎÏÍÅÒ %d"
+
+#: src/reader.c:1749
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "ÐÒÏÔÉ×ÏÒÅÞÉ×ÙÅ ÐÒÉÏÒÉÔÅÔÙ ÄÌÑ %s É %s"
-#: src/reader.c:1724
+#: src/reader.c:1761
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "ÐÒÏÔÉ×ÏÒÅÞÉ×ÙÅ ÚÎÁÞÅÎÉÑ ÁÓÓÏÃÉÁÔÉ×ÎÏÓÔÉ ÄÌÑ %s É %s"
-#: src/reader.c:1770
-#, c-format
-msgid "tokens %s and %s both assigned number %d"
-msgstr "ÏÂÅÉÍ ÌÅËÓÅÍÁÍ %s É %s ÐÒÉÓ×ÏÅÎ ÎÏÍÅÒ %d"
-
-#: src/reader.c:1782
+#: src/reader.c:1800
#, c-format
msgid "the start symbol %s is undefined"
msgstr "ÎÁÞÁÌØÎÙÊ ÓÉÍ×ÏÌ %s ÎÅÏÐÒÅÄÅÌÅÎ"
-#: src/reader.c:1784
+#: src/reader.c:1802
#, c-format
msgid "the start symbol %s is a token"
msgstr "ÎÁÞÁÌØÎÙÊ ÓÉÍ×ÏÌ %s Ñ×ÌÑÅÔÓÑ ÌÅËÓÅÍÏÊ"
msgid ""
msgstr ""
"Project-Id-Version: bison 1.28c\n"
-"POT-Creation-Date: 2001-11-01 19:27+0100\n"
+"POT-Creation-Date: 2001-11-02 18:54+0100\n"
"PO-Revision-Date: 2001-09-10 10:54GMT\n"
"Last-Translator: Altug Bayram <altugbayram_2000@yahoo.com>\n"
"Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
msgid "symbol %s redefined"
msgstr "%s simgesi yeniden tanýmlandý"
-#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1285
+#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1283
#, c-format
msgid "type redeclaration for %s"
msgstr "%s için yeniden tip bildirimi"
msgid "`%s' is invalid in %s"
msgstr "`%s' %s içinde geçersizdir"
-#: src/reader.c:558 src/reader.c:717
+#: src/reader.c:558 src/reader.c:716
#, c-format
msgid "multiple %s declarations"
msgstr "çoklu %s bildirimleri"
-#: src/reader.c:560 src/reader.c:897 src/reader.c:922 src/reader.c:1263
+#: src/reader.c:560 src/reader.c:895 src/reader.c:920 src/reader.c:1261
#, c-format
msgid "invalid %s declaration"
msgstr "geçersiz %s bildirimi"
msgid "unexpected item: %s"
msgstr "beklenmeyen öðe: %s"
-#: src/reader.c:760 src/reader.c:1089 src/reader.c:1160
+#: src/reader.c:759 src/reader.c:1087 src/reader.c:1158
#, c-format
msgid "unmatched %s"
msgstr "eþlenemeyen %s"
-#: src/reader.c:792
+#: src/reader.c:791
#, c-format
msgid "argument of %%expect is not an integer"
msgstr "%%expect'in argümaný bir tamsayý deðil"
-#: src/reader.c:838
+#: src/reader.c:837
#, c-format
msgid "unrecognized item %s, expected an identifier"
msgstr "%s öðesi tanýnmadý, beklenen bir tanýtýcýdýr"
-#: src/reader.c:862
+#: src/reader.c:859
#, c-format
msgid "expected string constant instead of %s"
msgstr "%s'in yerine sabit dizge beklendi"
-#: src/reader.c:1005
+#: src/reader.c:1003
#, c-format
msgid "unrecognized: %s"
msgstr "tanýnmayan: %s"
-#: src/reader.c:1010
+#: src/reader.c:1008
msgid "no input grammar"
msgstr "girdi grameri yok"
-#: src/reader.c:1015
+#: src/reader.c:1013
#, c-format
msgid "unknown character: %s"
msgstr "bilinmeyen karakter: %s"
-#: src/reader.c:1183
+#: src/reader.c:1181
#, c-format
msgid "unterminated %guard clause"
msgstr "sonlandýrýlmamýþ %guard yantümcesi"
-#: src/reader.c:1350
+#: src/reader.c:1348
msgid "ill-formed rule: initial symbol not followed by colon"
msgstr "kötü-biçemli kural: baþlangýç simgesini takip eden \":\" yok"
-#: src/reader.c:1357
+#: src/reader.c:1355
msgid "grammar starts with vertical bar"
msgstr "gramer düþey çubuk ile baþlýyor"
-#: src/reader.c:1388
+#: src/reader.c:1386
#, c-format
msgid "rule given for %s, which is a token"
msgstr "bir andaç olan %s için verilen kural"
-#: src/reader.c:1490
+#: src/reader.c:1488
msgid "two @prec's in a row"
msgstr "bir satýrda iki @prec"
-#: src/reader.c:1498
+#: src/reader.c:1496
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr "%%guard sunulmuþ fakat %%semantic_parser belirlenmemiþ"
-#: src/reader.c:1507
+#: src/reader.c:1505
msgid "two actions at end of one rule"
msgstr "bir kuralýn sonunda iki eylem"
-#: src/reader.c:1521
+#: src/reader.c:1519
#, c-format
msgid "type clash (`%s' `%s') on default action"
msgstr "öntanýmlý eylem üzerinde (`%s' `%s') tip çatýþmasý"
-#: src/reader.c:1527
+#: src/reader.c:1525
msgid "empty rule for typed nonterminal, and no action"
msgstr "Tipli deðiþken simge için boþ kural tanýmlanmýþ, ve eylembelirtilmemiþ"
-#: src/reader.c:1571
+#: src/reader.c:1569
#, c-format
msgid "invalid input: %s"
msgstr "geçersiz girdi: %s"
-#: src/reader.c:1579
+#: src/reader.c:1577
#, c-format
msgid "too many symbols (tokens plus nonterminals); maximum %d"
msgstr "çok fazla simge var (andaçlar ve deðiþken simgeler); en fazla %d"
-#: src/reader.c:1582
+#: src/reader.c:1580
msgid "no rules in the input grammar"
msgstr "girdi grameri içinde kurallar yok"
-#: src/reader.c:1606
+#: src/reader.c:1604
#, c-format
msgid "symbol %s is used, but is not defined as a token and has no rules"
msgstr ""
"simge %s kullanýldý, fakat bir andaç olarak tanýmlanmadý vekurallarý yok"
-#: src/reader.c:1712
+#: src/reader.c:1696
+#, c-format
+msgid "tokens %s and %s both assigned number %d"
+msgstr "%s ve %s andaçlarýnýn her ikisi %d sayýsýna atandý"
+
+#: src/reader.c:1749
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "%s ve %s için çeliþen öncelikler"
-#: src/reader.c:1724
+#: src/reader.c:1761
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "%s ve %s için çeliþen birleþmeli deðerler"
-#: src/reader.c:1770
-#, c-format
-msgid "tokens %s and %s both assigned number %d"
-msgstr "%s ve %s andaçlarýnýn her ikisi %d sayýsýna atandý"
-
-#: src/reader.c:1782
+#: src/reader.c:1800
#, c-format
msgid "the start symbol %s is undefined"
msgstr "baþlangýç simgesi %s tanýmlanmadý"
-#: src/reader.c:1784
+#: src/reader.c:1802
#, c-format
msgid "the start symbol %s is a token"
msgstr "baþlangýç simgesi %s bir andaçtýr"
{"defines", optional_argument, 0, 'd'},
{"verbose", no_argument, 0, 'v'},
{"file-prefix", required_argument, 0, 'b'},
+ {"output", required_argument, 0, 'o'},
{"output-file", required_argument, 0, 'o'},
{"graph", optional_argument, 0, 'g'},
-d, --defines also produce a header file\n\
-v, --verbose also produce an explanation of the automaton\n\
-b, --file-prefix=PREFIX specify a PREFIX for output files\n\
- -o, --output-file=FILE leave output to FILE\n\
- -g, --graph also produce a VCG graph description of the \
-automaton\n"), stream);
+ -o, --output=FILE leave output to FILE\n\
+ -g, --graph also produce a VCG description of the automaton\n\
+"), stream);
putc ('\n', stream);
fputs (_("\
#include "system.h"
#include "getargs.h"
#include "files.h"
-#include "getopt.h" /* for optarg */
#include "symtab.h"
#include "lex.h"
#include "complain.h"
/* Buffer for storing the current token. */
struct obstack token_obstack;
-const char *token_buffer = NULL;
+char *token_buffer = NULL;
bucket *symval;
int numval;
/* A token to be reread, see unlex and lex. */
static token_t unlexed = tok_undef;
static bucket *unlexed_symval = NULL;
-static const char *unlexed_token_buffer = NULL;
+static char *unlexed_token_buffer = NULL;
void
lex_init (void)
/* parse the literal token and compute character code in code */
{
- int code, discode;
+ int code;
obstack_1grow (&token_obstack, '\'');
literalchar (&token_obstack, &code, '\'');
c = getc (finput);
if (c != '\'')
{
+ int discode;
complain (_("use \"...\" for multi-character literal tokens"));
while (1)
if (!literalchar (0, &discode, '\''))
{ "nonassoc", NULL, tok_nonassoc },
{ "binary", NULL, tok_nonassoc },
{ "prec", NULL, tok_prec },
- { "locations", &locations_flag, tok_noop }, /* -l */
- { "no_lines", &no_lines_flag, tok_noop }, /* -l */
+ { "locations", &locations_flag, tok_intopt }, /* -l */
+ { "no-lines", &no_lines_flag, tok_intopt }, /* -l */
{ "raw", NULL, tok_obsolete }, /* -r */
- { "token_table", &token_table_flag, tok_noop }, /* -k */
- { "yacc", &yacc_flag, tok_noop }, /* -y */
- { "fixed_output_files",&yacc_flag, tok_noop }, /* -y */
- { "defines", &defines_flag, tok_noop }, /* -d */
- { "no_parser", &no_parser_flag, tok_noop }, /* -n */
- { "graph", &graph_flag, tok_noop }, /* -g */
-#if 0
- /* For the time being, this is not enabled yet, while it's possible
- though, since we use obstacks. The only risk is with semantic
- parsers which will output an `include' of an output file: be sure
- that the name included is indeed the name of the output file. */
- { "output_file", &spec_outfile, tok_setopt }, /* -o */
- { "file_prefix", &spec_file_prefix, tok_setopt }, /* -b */
- { "name_prefix", &spec_name_prefix, tok_setopt }, /* -p */
-#endif
- { "verbose", &verbose_flag, tok_noop }, /* -v */
- { "debug", &debug_flag, tok_noop }, /* -t */
- { "semantic_parser", &semantic_parser, tok_noop },
- { "pure_parser", &pure_parser, tok_noop },
+ { "token-table", &token_table_flag, tok_intopt }, /* -k */
+ { "yacc", &yacc_flag, tok_intopt }, /* -y */
+ { "fixed-output-files",&yacc_flag, tok_intopt }, /* -y */
+ { "defines", &defines_flag, tok_intopt }, /* -d */
+ { "no-parser", &no_parser_flag, tok_intopt }, /* -n */
+ { "graph", &graph_flag, tok_intopt }, /* -g */
+
+ /* FIXME: semantic parsers which will output an `include' of an
+ output file: be sure that the name included is indeed the name of
+ the output file. */
+ { "output", &spec_outfile, tok_stropt }, /* -o */
+ { "file-prefix", &spec_file_prefix, tok_stropt }, /* -b */
+ { "name-prefix", &spec_name_prefix, tok_stropt }, /* -p */
+
+ { "verbose", &verbose_flag, tok_intopt }, /* -v */
+ { "debug", &debug_flag, tok_intopt }, /* -t */
+ { "semantic-parser", &semantic_parser, tok_intopt },
+ { "pure-parser", &pure_parser, tok_intopt },
{ NULL, NULL, tok_illegal}
};
token_t
parse_percent_token (void)
{
- struct percent_table_struct *tx;
+ struct percent_table_struct *tx = NULL;
+ /* Where `=' was found in token_buffer. */
+ size_t equal_offset = 0;
+ char *arg = NULL;
int c = getc (finput);
case '{':
return tok_percent_left_curly;
+ /* FIXME: Who the heck are those 5 guys!?! `%<' = `%left'!!!
+ Let's ask for there removal. */
case '<':
return tok_left;
obstack_1grow (&token_obstack, '%');
while (isalpha (c) || c == '_' || c == '-')
{
- if (c == '-')
- c = '_';
+ if (c == '_')
+ c = '-';
obstack_1grow (&token_obstack, c);
c = getc (finput);
}
- ungetc (c, finput);
+ if (c == '=')
+ {
+ equal_offset = obstack_object_size (&token_obstack);
+ obstack_1grow (&token_obstack, c);
+ c = getc (finput);
+ if (c = '"')
+ {
+ int code; /* ignored here */
+
+ obstack_1grow (&token_obstack, '"');
+ /* Read up to and including ". */
+ while (literalchar (&token_obstack, &code, '"'))
+ /* nothing */;
+ }
+ }
+ else
+ ungetc (c, finput);
+
obstack_1grow (&token_obstack, '\0');
token_buffer = obstack_finish (&token_obstack);
+ if (equal_offset)
+ {
+ /* %token_buffer="arg" */
+ arg = token_buffer + equal_offset + 2;
+ arg[strlen (arg) - 1] = '\0';
+ token_buffer[equal_offset] = '\0';
+ }
/* table lookup % directive */
for (tx = percent_table; tx->name; tx++)
if (strcmp (token_buffer + 1, tx->name) == 0)
break;
- if (tx->set_flag)
- {
- *((int *) (tx->set_flag)) = 1;
- return tok_noop;
- }
+ if (arg && !tx->retval == tok_stropt)
+ fatal (_("`%s' supports no argument: %s"), token_buffer, quotearg (arg));
switch (tx->retval)
{
- case tok_setopt:
- *((char **) (tx->set_flag)) = optarg;
+ case tok_stropt:
+ assert (tx->set_flag);
+ if (arg)
+ {
+ /* Keep only the first assignment: command line options have
+ already been processed, and we want them to have
+ precedence. Side effect: if this %-option is used
+ several times, only the first is honored. Bah. */
+ if (!*((char **) (tx->set_flag)))
+ *((char **) (tx->set_flag)) = arg;
+ }
+ else
+ fatal (_("`%s' requires an argument"), token_buffer);
+ return tok_noop;
+ break;
+
+ case tok_intopt:
+ assert (tx->set_flag);
+ *((int *) (tx->set_flag)) = 1;
return tok_noop;
break;
case tok_obsolete:
fatal (_("`%s' is no longer supported"), token_buffer);
+ return tok_noop;
break;
default:
- /* Other cases do not apply here. */
+ return tx->retval;
break;
}
-
- return tx->retval;
+ abort ();
}
tok_expect,
tok_thong,
tok_noop,
- tok_setopt,
+ tok_intopt,
+ tok_stropt,
tok_illegal,
tok_obsolete
} token_t;
-extern const char *token_buffer;
+extern char *token_buffer;
extern bucket *symval;
extern int numval;
static void
read_declarations (void)
{
- int c;
- int tok;
-
for (;;)
{
- c = skip_white_space ();
+ int c = skip_white_space ();
if (c == '%')
{
- tok = parse_percent_token ();
+ token_t tok = parse_percent_token ();
switch (tok)
{
case tok_noop:
break;
+ case tok_stropt:
+ case tok_intopt:
+ case tok_obsolete:
+ case tok_illegal:
+ abort ();
+ break;
+
default:
complain (_("unrecognized: %s"), token_buffer);
skip_to_char ('%');
AT_CHECK_OUTPUT([foo.y], [%defines %verbose %yacc],[],
[y.output y.tab.c y.tab.h])
+# Exercise %output and %file-prefix
+AT_CHECK_OUTPUT([foo.y], [%file-prefix="bar" %defines %verbose], [],
+ [bar.output bar.tab.c bar.tab.h])
+AT_CHECK_OUTPUT([foo.y], [%output="bar.c" %defines %verbose %yacc],[],
+ [bar.output bar.c bar.h])
+AT_CHECK_OUTPUT([foo.y],
+ [%file-prefix="baz" %output="bar.c" %defines %verbose %yacc],
+ [],
+ [bar.output bar.c bar.h])
+
# Check priorities of extension control.
AT_CHECK_OUTPUT([foo.yy], [%defines %verbose], [],