This file is indexed.

/usr/share/doc/bison-doc/html/Java-Differences.html is in bison-doc 1:2.5-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<html lang="en">
<head>
<title>Java Differences - Bison 2.5</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Bison 2.5">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Java-Parsers.html#Java-Parsers" title="Java Parsers">
<link rel="prev" href="Java-Action-Features.html#Java-Action-Features" title="Java Action Features">
<link rel="next" href="Java-Declarations-Summary.html#Java-Declarations-Summary" title="Java Declarations Summary">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This manual (14 May 2011) is for GNU Bison (version
2.5), the GNU parser generator.

Copyright (C) 1988-1993, 1995, 1998-2011 Free Software
Foundation, Inc.

     Permission is granted to copy, distribute and/or modify this
     document under the terms of the GNU Free Documentation License,
     Version 1.3 or any later version published by the Free Software
     Foundation; with no Invariant Sections, with the Front-Cover texts
     being ``A GNU Manual,'' and with the Back-Cover Texts as in (a)
     below.  A copy of the license is included in the section entitled
     ``GNU Free Documentation License.''

     (a) The FSF's Back-Cover Text is: ``You have the freedom to copy
     and modify this GNU manual.  Buying copies from the FSF supports
     it in developing GNU and promoting software freedom.''
   -->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="Java-Differences"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Java-Declarations-Summary.html#Java-Declarations-Summary">Java Declarations Summary</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Java-Action-Features.html#Java-Action-Features">Java Action Features</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Java-Parsers.html#Java-Parsers">Java Parsers</a>
<hr>
</div>

<h4 class="subsection">10.2.7 Differences between C/C++ and Java Grammars</h4>

<p>The different structure of the Java language forces several differences
between C/C++ grammars, and grammars designed for Java parsers.  This
section summarizes these differences.

     <ul>
<li>Java lacks a preprocessor, so the <code>YYERROR</code>, <code>YYACCEPT</code>,
<code>YYABORT</code> symbols (see <a href="Table-of-Symbols.html#Table-of-Symbols">Table of Symbols</a>) cannot obviously be
macros.  Instead, they should be preceded by <code>return</code> when they
appear in an action.  The actual definition of these symbols is
opaque to the Bison grammar, and it might change in the future.  The
only meaningful operation that you can do, is to return them. 
See see <a href="Java-Action-Features.html#Java-Action-Features">Java Action Features</a>.

     <p>Note that of these three symbols, only <code>YYACCEPT</code> and
<code>YYABORT</code> will cause a return from the <code>yyparse</code>
method<a rel="footnote" href="#fn-1" name="fnd-1"><sup>1</sup></a>.

     <li>Java lacks unions, so <code>%union</code> has no effect.  Instead, semantic
values have a common base type: <code>Object</code> or as specified by
&lsquo;<samp><span class="samp">%define stype</span></samp>&rsquo;.  Angle brackets on <code>%token</code>, <code>type</code>,
<code>$</code><var>n</var> and <code>$$</code> specify subtypes rather than fields of
an union.  The type of <code>$$</code>, even with angle brackets, is the base
type since Java casts are not allow on the left-hand side of assignments. 
Also, <code>$</code><var>n</var> and <code>@</code><var>n</var> are not allowed on the
left-hand side of assignments. See see <a href="Java-Semantic-Values.html#Java-Semantic-Values">Java Semantic Values</a> and
see <a href="Java-Action-Features.html#Java-Action-Features">Java Action Features</a>.

     <li>The prologue declarations have a different meaning than in C/C++ code.
          <dl>
<dt><code>%code imports</code><dd>blocks are placed at the beginning of the Java source code.  They may
include copyright notices.  For a <code>package</code> declarations, it is
suggested to use <code>%define package</code> instead.

          <br><dt>unqualified <code>%code</code><dd>blocks are placed inside the parser class.

          <br><dt><code>%code lexer</code><dd>blocks, if specified, should include the implementation of the
scanner.  If there is no such block, the scanner can be any class
that implements the appropriate interface (see see <a href="Java-Scanner-Interface.html#Java-Scanner-Interface">Java Scanner Interface</a>). 
</dl>

     <p>Other <code>%code</code> blocks are not supported in Java parsers. 
In particular, <code>%{ ... %}</code> blocks should not be used
and may give an error in future versions of Bison.

     <p>The epilogue has the same meaning as in C/C++ code and it can
be used to define other classes used by the parser <em>outside</em>
the parser class. 
</ul>

   <div class="footnote">
<hr>
<h4>Footnotes</h4><p class="footnote"><small>[<a name="fn-1" href="#fnd-1">1</a>]</small> Java parsers include the actions in a separate
method than <code>yyparse</code> in order to have an intuitive syntax that
corresponds to these C macros.</p>

   <hr></div>

   </body></html>