#include <stdio.h>#include <stdlib.h>#include <string.h>#include "boolean.h"#include "arithmetique.h"#include "vecteur.h"#include "contrainte.h"#include "sc.h"#include "malloc.h"#include "union.h"Go to the source code of this file.
Data Structures | |
| union | SL_STYPE |
| union | slx_alloc |
| ! defined slx_overflow || SL_ERROR_VERBOSE More... | |
Defines | |
| #define | SL_BISON 1 |
| A Bison parser, made by GNU Bison 2.3. | |
| #define | SL_BISON_VERSION "2.3" |
| Bison version. | |
| #define | SL_SKELETON_NAME "yacc.c" |
| Skeleton name. | |
| #define | SL_PURE 0 |
| Pure parsers. | |
| #define | SL_LSP_NEEDED 0 |
| Using locations. | |
| #define | ACCFERM 1 |
| Tokens. | |
| #define | ACCOUVR 2 |
| #define | CONSTANTE 3 |
| #define | EGAL 4 |
| #define | IDENT 5 |
| #define | INF 6 |
| #define | INFEGAL 7 |
| #define | MOINS 8 |
| #define | PLUS 9 |
| #define | SUP 10 |
| #define | SUPEGAL 11 |
| #define | VAR 12 |
| #define | VIRG 13 |
| #define | OPINF 1 |
| ode des operateurs de comparaison | |
| #define | OPINFEGAL 2 |
| #define | OPEGAL 3 |
| #define | OPSUPEGAL 4 |
| #define | OPSUP 5 |
| #define | DROIT 1 |
| #define | GAUCHE 2 |
| #define | SL_DEBUG 0 |
| define NULL 0 | |
| #define | SL_ERROR_VERBOSE 0 |
| Enabling verbose error messages. | |
| #define | SL_TOKEN_TABLE 0 |
| Enabling the token table. | |
| #define | slx_stype SL_STYPE |
| #define | SL_STYPE_IS_DECLARED 1 |
| #define | SL_STYPE_IS_TRIVIAL 1 |
| #define | SL_SIZE_T unsigned int |
| #define | SL_SIZE_MAXIMUM ((SL_SIZE_T) -1) |
| #define | SL__(msgid) msgid |
| #define | SL_USE(e) ((void) (e)) |
| Suppress unused-variable warnings by "using" E. | |
| #define | SL_ID(n) (n) |
| Identity function, used to suppress warnings about constant conditions. | |
| #define | SL_STACK_ALLOC SL_MALLOC |
| The parser invokes alloca or malloc; define the necessary symbols. | |
| #define | SL_STACK_FREE SL_FREE |
| #define | SL_STACK_ALLOC_MAXIMUM SL_SIZE_MAXIMUM |
| #define | SL_MALLOC malloc |
| #define | SL_FREE free |
| #define | SL_STACK_GAP_MAXIMUM (sizeof (union slx_alloc) - 1) |
| The size of the maximum gap between one aligned stack and the next. | |
| #define | SL_STACK_BYTES(N) |
| The size of an array large to enough to hold all stacks, each with N elements. | |
| #define | SL_COPY(To, From, Count) |
| Copy COUNT objects from FROM to TO. | |
| #define | SL_STACK_RELOCATE(Stack) |
| Relocate STACK from its old location to the new one. | |
| #define | SL_FINAL 3 |
| SL_FINAL -- State number of the termination state. | |
| #define | SL_LAST 31 |
| SL_LAST -- Last index in SL_TABLE. | |
| #define | SL_NTOKENS 16 |
| SL_NTOKENS -- Number of terminals. | |
| #define | SL_NNTS 25 |
| SL_NNTS -- Number of nonterminals. | |
| #define | SL_NRULES 40 |
| SL_NRULES -- Number of rules. | |
| #define | SL_NSTATES 49 |
| SL_NRULES -- Number of states. | |
| #define | SL_UNDEFTOK 2 |
| SL_TRANSLATE(SL_LEX) -- Bison symbol number corresponding to SL_LEX. | |
| #define | SL_MAXUTOK 257 |
| #define | SL_TRANSLATE(SL_X) ((unsigned int) (SL_X) <= SL_MAXUTOK ? slx_translate[SL_X] : SL_UNDEFTOK) |
| #define | SL_PACT_NINF -25 |
| SL_PACT[STATE-NUM] -- Index in SL_TABLE of the portion describing STATE-NUM. | |
| #define | SL_TABLE_NINF -40 |
| SL_TABLE[SL_PACT[STATE-NUM]]. | |
| #define | slx_errok (slx_errstatus = 0) |
| #define | slx_clearin (slx_char = SL_EMPTY) |
| #define | SL_EMPTY (-2) |
| #define | SL_EOF 0 |
| #define | SL_ACCEPT goto slx_acceptlab |
| #define | SL_ABORT goto slx_abortlab |
| #define | SL_ERROR goto slx_errorlab |
| #define | SL_FAIL goto slx_errlab |
| Like SL_ERROR except do call slx_error. | |
| #define | SL_RECOVERING() (!!slx_errstatus) |
| #define | SL_BACKUP(Token, Value) |
| #define | SL_TERROR 1 |
| #define | SL_ERRCODE 256 |
| #define | SL_RHSLOC(Rhs, K) ((Rhs)[K]) |
| SL_LLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. | |
| #define | SL_LLOC_DEFAULT(Current, Rhs, N) |
| #define | SL__LOCATION_PRINT(File, Loc) ((void) 0) |
| SL__LOCATION_PRINT -- Print the location on the stream. | |
| #define | SL_LEX slx_lex () |
| SL_LEX -- calling `slx_lex' with the right arguments. | |
| #define | SL_DPRINTF(Args) |
| Enable debugging if requested. | |
| #define | SL__SYMBOL_PRINT(Title, Type, Value, Location) |
| #define | SL__STACK_PRINT(Bottom, Top) |
| #define | SL__REDUCE_PRINT(Rule) |
| #define | SL_INITDEPTH 200 |
| !SL_DEBUG | |
| #define | SL_MAXDEPTH 10000 |
| SL_MAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). | |
| #define | SL_POPSTACK(N) (slx_vsp -= (N), slx_ssp -= (N)) |
Typedefs | |
| typedef unsigned char | slx_type_uint8 |
| Copy the second part of user declarations. | |
| typedef short int | slx_type_int8 |
| typedef unsigned short int | slx_type_uint16 |
| typedef short int | slx_type_int16 |
Enumerations | |
| enum | slx_tokentype { ACCFERM = 1, ACCOUVR = 2, CONSTANTE = 3, EGAL = 4, IDENT = 5, INF = 6, INFEGAL = 7, MOINS = 8, PLUS = 9, SUP = 10, SUPEGAL = 11, VAR = 12, VIRG = 13, ACCFERM = 1, ACCOUVR = 2, CONSTANTE = 3, EGAL = 4, IDENT = 5, INF = 6, INFEGAL = 7, MOINS = 8, PLUS = 9, SUP = 10, SUPEGAL = 11, VAR = 12, VIRG = 13 } |
| Tokens. More... | |
Functions | |
| static void | slx_destruct (char *slx_msg, int slx_type, SL_STYPE *slx_valuep) const |
| SL_ERROR_VERBOSE. | |
| int | slx_parse () |
| Prevent warnings from -Wmissing-prototypes. | |
| int | slx_error (char *s) |
Variables | |
| char | slx_text [] |
| Copy the first part of user declarations. | |
| Psysteme | ps_yacc |
| dialogue avec l'analyseur lexical | |
| boolean | syntax_error |
| Value | valcst |
| Value | fac |
| int | sens |
| facteur multiplicatif suivant qu'on analyse un terme | |
| short int | cote |
| indique le sens de l'inegalite sens = -1 ==> l'operateur est soit > ,soit >=, sens = 1 ==> l'operateur est soit <, soit <= | |
| Value | b1 |
| booleen indiquant quel membre est en cours d'analyse | |
| Value | b2 |
| Pcontrainte | eq |
| element du vecteur colonne du systeme donne par l'analyse d'une contrainte | |
| Pvecteur | cp |
| pointeur sur l'egalite ou l'inegalite courante | |
| short int | operat |
| pointeur sur le membre courant | |
| Pcontrainte | p_eg_fin |
| dernier operateur rencontre | |
| Pcontrainte | p_ineg_fin |
| pointeur sur la derniere inegalite | |
| Pvecteur | p_pred |
| pointeur sur le predecesseur du couple courant | |
| Pvecteur | p_membre_courant |
| Psyslist | sl_yacc |
| Pbase | ba_yacc = vect_add_variable(ba_yacc, (Variable) strdup(yytext)) |
| Variable | va_yacc |
| static const slx_type_uint8 | slx_translate [] |
| SL_TRANSLATE[SL_LEX] -- Bison symbol number corresponding to SL_LEX. | |
| static const slx_type_uint8 | slx_r1 [] |
| SL_R1[SL_N] -- Symbol number of symbol that rule SL_N derives. | |
| static const slx_type_uint8 | slx_r2 [] |
| SL_R2[SL_N] -- Number of symbols composing right hand side of rule SL_N. | |
| static const slx_type_uint8 | slx_defact [] |
| SL_DEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when SL_TABLE doesn't specify something else to do. | |
| static const slx_type_int8 | slx_defgoto [] |
| SL_DEFGOTO[NTERM-NUM]. | |
| static const slx_type_int8 | slx_pact [] |
| static const slx_type_int8 | slx_pgoto [] |
| SL_PGOTO[NTERM-NUM]. | |
| static const slx_type_int8 | slx_table [] |
| static const slx_type_uint8 | slx_check [] |
| static const slx_type_uint8 | slx_stos [] |
| SL_STOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. | |
| int | slx_char |
| ! SL_PARSE_PARAM | |
| SL_STYPE | slx_lval |
| The semantic value of the look-ahead symbol. | |
| int | slx_nerrs |
| Number of syntax errors so far. | |
| #define SL__ | ( | msgid | ) | msgid |
| #define SL__LOCATION_PRINT | ( | File, | |||
| Loc | ) | ((void) 0) |
| #define SL__REDUCE_PRINT | ( | Rule | ) |
| #define SL__STACK_PRINT | ( | Bottom, | |||
| Top | ) |
| #define SL__SYMBOL_PRINT | ( | Title, | |||
| Type, | |||||
| Value, | |||||
| Location | ) |
| #define SL_ABORT goto slx_abortlab |
| #define SL_ACCEPT goto slx_acceptlab |
| #define SL_BACKUP | ( | Token, | |||
| Value | ) |
| #define SL_BISON 1 |
A Bison parser, made by GNU Bison 2.3.
Skeleton implementation for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 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 2, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception.
This special exception was added by the Free Software Foundation in version 2.2 of Bison. C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. All symbols defined below should begin with slx_ or SL_, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. Identify Bison output.
| #define SL_COPY | ( | To, | |||
| From, | |||||
| Count | ) |
| #define SL_DPRINTF | ( | Args | ) |
Enable debugging if requested.
!SL_DEBUG
Definition at line 855 of file sl_gram.c.
Referenced by slx_parse().
| #define SL_EMPTY (-2) |
| #define SL_EOF 0 |
| #define SL_ERROR_VERBOSE 0 |
| #define SL_FAIL goto slx_errlab |
| #define SL_FINAL 3 |
SL_FINAL -- State number of the termination state.
Definition at line 406 of file sl_gram.c.
Referenced by slx_parse().
Identity function, used to suppress warnings about constant conditions.
Definition at line 263 of file sl_gram.c.
Referenced by slx_parse().
| #define SL_INITDEPTH 200 |
!SL_DEBUG
SL_INITDEPTH -- initial size of the parser's stacks.
Definition at line 864 of file sl_gram.c.
Referenced by slx_parse().
| #define SL_LAST 31 |
SL_LAST -- Last index in SL_TABLE.
Definition at line 408 of file sl_gram.c.
Referenced by slx_parse().
| #define SL_LEX slx_lex () |
SL_LEX -- calling `slx_lex' with the right arguments.
Definition at line 698 of file sl_gram.c.
Referenced by slx_parse().
| #define SL_LLOC_DEFAULT | ( | Current, | |||
| Rhs, | |||||
| N | ) |
Value:
do \ if (SL_ID (N)) \ { \ (Current).first_line = SL_RHSLOC (Rhs, 1).first_line; \ (Current).first_column = SL_RHSLOC (Rhs, 1).first_column; \ (Current).last_line = SL_RHSLOC (Rhs, N).last_line; \ (Current).last_column = SL_RHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ SL_RHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ SL_RHSLOC (Rhs, 0).last_column; \ } \ while (SL_ID (0))
| #define SL_MAXDEPTH 10000 |
SL_MAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if SL_STACK_ALLOC_MAXIMUM < SL_STACK_BYTES (SL_MAXDEPTH) evaluated with infinite-precision integer arithmetic.
Definition at line 875 of file sl_gram.c.
Referenced by slx_parse().
| #define SL_NTOKENS 16 |
SL_NTOKENS -- Number of terminals.
Definition at line 411 of file sl_gram.c.
Referenced by slx_parse().
| #define SL_PACT_NINF -25 |
SL_PACT[STATE-NUM] -- Index in SL_TABLE of the portion describing STATE-NUM.
Definition at line 561 of file sl_gram.c.
Referenced by slx_parse().
| #define SL_POPSTACK | ( | N | ) | (slx_vsp -= (N), slx_ssp -= (N)) |
Referenced by slx_parse().
| #define SL_RHSLOC | ( | Rhs, | |||
| K | ) | ((Rhs)[K]) |
| #define SL_SIZE_T unsigned int |
| #define SL_STACK_ALLOC SL_MALLOC |
The parser invokes alloca or malloc; define the necessary symbols.
Definition at line 318 of file sl_gram.c.
Referenced by slx_parse().
| #define SL_STACK_ALLOC_MAXIMUM SL_SIZE_MAXIMUM |
| #define SL_STACK_BYTES | ( | N | ) |
Value:
((N) * (sizeof (slx_type_int16) + sizeof (SL_STYPE)) \ + SL_STACK_GAP_MAXIMUM)
Definition at line 365 of file sl_gram.c.
Referenced by slx_parse().
| #define SL_STACK_FREE SL_FREE |
| #define SL_STACK_GAP_MAXIMUM (sizeof (union slx_alloc) - 1) |
| #define SL_STACK_RELOCATE | ( | Stack | ) |
Value:
do \ { \ SL_SIZE_T slx_newbytes; \ SL_COPY (&slx_ptr->Stack, Stack, slx_size); \ Stack = &slx_ptr->Stack; \ slx_newbytes = slx_stacksize * sizeof (*Stack) + SL_STACK_GAP_MAXIMUM; \ slx_ptr += slx_newbytes / sizeof (*slx_ptr); \ } \ while (SL_ID (0))
The local variables SL_SIZE and SL_STACKSIZE give the old and new number of elements in the stack, and SL_PTR gives the new location of the stack. Advance SL_PTR to a properly aligned location for the next stack.
Definition at line 392 of file sl_gram.c.
Referenced by slx_parse().
| #define SL_TABLE_NINF -40 |
SL_TABLE[SL_PACT[STATE-NUM]].
What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what SL_DEFACT says. If SL_TABLE_NINF, syntax error.
Definition at line 583 of file sl_gram.c.
Referenced by slx_parse().
| #define SL_TERROR 1 |
| #define SL_TRANSLATE | ( | SL_X | ) | ((unsigned int) (SL_X) <= SL_MAXUTOK ? slx_translate[SL_X] : SL_UNDEFTOK) |
| #define SL_UNDEFTOK 2 |
SL_TRANSLATE(SL_LEX) -- Bison symbol number corresponding to SL_LEX.
| #define SL_USE | ( | e | ) | ((void) (e)) |
Suppress unused-variable warnings by "using" E.
Definition at line 256 of file sl_gram.c.
Referenced by slx_destruct().
| typedef short int slx_type_int16 |
| typedef short int slx_type_int8 |
| typedef unsigned short int slx_type_uint16 |
| typedef unsigned char slx_type_uint8 |
| enum slx_tokentype |