summaryrefslogtreecommitdiffstats
path: root/yacc/parsing.c
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1995-08-08 16:44:29 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1995-08-08 16:44:29 +0000
commit260bb413e941897bdb84efc2b4da4bad5cf0dc0e (patch)
treec6fa717c213f7b6cdfa4b2414be552b9d1a32c63 /yacc/parsing.c
parentf99a06904dbcf3cffdb7c33fb15939a004d34f2c (diff)
Nettoyages pour supprimer bien des warnings
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@186 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'yacc/parsing.c')
-rw-r--r--yacc/parsing.c136
1 files changed, 0 insertions, 136 deletions
diff --git a/yacc/parsing.c b/yacc/parsing.c
deleted file mode 100644
index 1b6099322..000000000
--- a/yacc/parsing.c
+++ /dev/null
@@ -1,136 +0,0 @@
-int yydebug;
-int yynerrs;
-int yyerrflag;
-int yychar;
-short *yyssp;
-YYSTYPE *yyvsp;
-YYSTYPE yyval;
-YYSTYPE yylval;
-short yyss[YYSTACKSIZE];
-YYSTYPE yyvs[YYSTACKSIZE];
-#define yystacksize YYSTACKSIZE
-#define YYABORT goto yyabort
-#define YYACCEPT goto yyaccept
-#define YYERROR goto yyerrlab
-
-value yyparse(tables, entrypoint, lexbuf)
- value tables, entrypoint, lexbuf;
-{
- register int yym, yyn, yystate;
-
-#define yyact FIELD(tables,0)
-#define yytransl FIELD(tables,1)
-#define yylhs FIELD(tables, 2)
-#define yylen FIELD(tables, 3)
-#define yydefred FIELD(tables, 4)
-#define yydgoto FIELD(tables, 5)
-#define yysindex FIELD(tables, 6)
-#define yyrindex FIELD(tables, 7)
-#define yygindex FIELD(tables, 8)
-#define YYTABLESIZE CINT(FIELD(tables, 9))
-#define yytable FIELD(tables, 10)
-#define yycheck FIELD(tables, 11)
-
- yynerrs = 0;
- yyerrflag = 0;
- yychar = (-1);
-
- yyssp = yyss;
- yyvsp = yyvs;
- *yyssp = yystate = 0;
-
- yychar = CINT(entrypoint);
-
-yyloop:
- if (yyn = yydefred[yystate]) goto yyreduce;
- if (yychar < 0) {
- token = yylex(lexbuf);
- yychar = CINT(yytransl[TAG(token)]);
- yylval = FIELD(token, 0);
- }
- if ((yyn = CINT(yysindex[yystate])) && (yyn += yychar) >= 0 &&
- yyn <= YYTABLESIZE && CINT(yycheck[yyn]) == yychar)
- {
- if (yyssp >= yyss + yystacksize - 1) grow_stacks();
-
- *++yyssp = yystate = CINT(yytable[yyn]);
- *++yyvsp = yylval;
- yychar = (-1);
- if (yyerrflag > 0) --yyerrflag;
- goto yyloop;
- }
- if ((yyn = CINT(yyrindex[yystate])) && (yyn += yychar) >= 0 &&
- yyn <= YYTABLESIZE && CINT(yycheck[yyn]) == yychar)
- {
- yyn = yytable[yyn];
- goto yyreduce;
- }
- if (yyerrflag) goto yyinrecovery;
-
-yynewerror:
- v = alloc(1, EXN_PARSING);
- FIELD(v, 0) = MLINT(yychar);
- mlraise(v);
-
-yyerrlab:
- ++yynerrs;
-
-yyinrecovery:
- if (yyerrflag < 3)
- {
- yyerrflag = 3;
- for (;;)
- {
- if ((yyn = CINT(yysindex[*yyssp])) && (yyn += YYERRCODE) >= 0 &&
- yyn <= YYTABLESIZE && CINT(yycheck[yyn]) == YYERRCODE)
- {
- if (yyssp >= yyss + yystacksize - 1) grow_stacks();
-
- *++yyssp = yystate = yytable[yyn];
- *++yyvsp = yylval;
- goto yyloop;
- }
- else
- {
- if (yyssp <= yyss) goto yyabort;
- --yyssp;
- --yyvsp;
- }
- }
- }
- else
- {
- if (yychar == 0) goto yyabort;
- yychar = (-1);
- goto yyloop;
- }
-
-yyreduce:
- yym = yylen[yyn];
- yyval = mlapply(FIELD(yyact, yyn), atom(0));
- yyssp -= yym;
- yystate = *yyssp;
- yyvsp -= yym;
- yym = yylhs[yyn];
- if (yystate == 0 && yym == 0)
- {
- yystate = YYFINAL;
- *++yyssp = YYFINAL;
- *++yyvsp = yyval;
- if (yychar < 0)
- {
- if ((yychar = yylex()) < 0) yychar = 0;
- }
- if (yychar == 0) goto yyaccept;
- goto yyloop;
- }
- if ((yyn = CINT(yygindex[yym])) && (yyn += yystate) >= 0 &&
- yyn <= YYTABLESIZE && CINT(yycheck[yyn]) == yystate)
- yystate = CINT(yytable[yyn]);
- else
- yystate = CINT(yydgoto[yym]);
- if (yyssp >= yyss + yystacksize - 1) grow_stacks();
- *++yyssp = yystate;
- *++yyvsp = yyval;
- goto yyloop;
-}