summaryrefslogtreecommitdiff
path: root/charspace/cmi.y
diff options
context:
space:
mode:
Diffstat (limited to 'charspace/cmi.y')
-rw-r--r--charspace/cmi.y51
1 files changed, 23 insertions, 28 deletions
diff --git a/charspace/cmi.y b/charspace/cmi.y
index 3281188..28e3827 100644
--- a/charspace/cmi.y
+++ b/charspace/cmi.y
@@ -1,37 +1,32 @@
-%{
-/* cmi.y: parse a character metric information file, entering what we
- find into the symbol table.
-
-Copyright (C) 1992, 2011 Free Software Foundation, Inc.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+# cmi.y: parse a character metric information file, entering what we
+# find into the symbol table.
+#
+# Copyright (C) 1992, 2011 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
#include "config.h"
-
#include <kpathsea/c-ctype.h>
#include "libfile.h"
#include "varstring.h"
-
#include "input-cmi.h"
#include "main.h"
#include "symtab.h"
-
static void yyerror (string);
static int yylex (void);
-%}
%union
{
@@ -46,7 +41,7 @@ static int yylex (void);
/* A <symval> is not a symbol, it's the value of a symbol. */
%type <symval> expr
-
+
%%
statements:
/* empty */
@@ -129,7 +124,7 @@ expr:
{ $$ = symtab_real_string_node ($1, $2); }
;
%%
-
+
/* Let's hope Bison will never use this value as a token code. */
#define NOT_A_TOKEN (-1)
@@ -209,7 +204,7 @@ yyerror (string s)
{
fprintf (stderr, "%s:%u: %s\n", libfilename (), lineno, s);
}
-
+
/* Read a numeric decimal constant from the file F. Always return T_REAL
and set yylval.realval. */
@@ -255,7 +250,7 @@ get_numeric_token (FILE *f)
return T_REAL;
}
-
+
/* Read a string constant from the file F. We make no provision for
quoting " characters; the string just consists of everything from one
" to the next. We return T_STRING and set yylval.strval. */
@@ -279,7 +274,7 @@ get_string_token (FILE *f)
return T_STRING;
}
-
+
/* Return the Bison-defined value for the token equal to the
next (space-delimited) identifier in the file F. That is, if it's a
reserved word return the corresponding value TR_..., else return