/* * symbolsTable.h : Exposed items to manage the symbols table * Part of the compiler project for LSD10 language * Gaudry Stéphane * More information on http://www.gaudry.be/langages-table-des-symboles.html * ********************************************************** */ #ifndef SYMBOLS_TABLE_H #define SYMBOLS_TABLE_H #include "common.h" /** * Allows to detect unused variables. */ VAR_USAGE_NEVER, VAR_USAGE_SOMETIMES, VAR_USAGE_ALWAYS }VariableUsage; /** * Sets usage for a declared variable * @param currentVarNode variable node * @param usage one of the VAR_USAGE_SOMETIMES or VAR_USAGE_ALWAYS values * pre-conditions : currentVarNode is a variable node */ /** * @return 1 if the symbols table is available, 0 otherwise */ /** * Creates a new data storage for the symbols management */ /** * Free all resources */ /** * Enters into a new scope */ /** * Enters into a new function scope */ /** * Exits from the current scope, and return to the parent scope if exists */ /** * Adds informations about a declaration * All information is given from a declaration node from the AST * * Pre-condition: * a createSymbolsTable() call must has been done * the finalizeSymbolsTable may not has been called * the AST may not has been finalized */ /** * Search into the symbols table for a declaration of a given AST node for the current scope. * If no backward declaration exists, the program exits with an error message * * pre-conditions: * currentNode argument may not be NULL * currentNode must be an ID or a function call * a createSymbolsTable() call must has been done * the finalizeSymbolsTable may not has been called * the AST may not has been finalized * the enterScope() and exitScope() must have been called at the right time to be into the current scope * * returns: AST declaration node for the current scope */ AstNode* getDeclaration(AstNode *currentNode); /** * Returns the memory location of the last declaration, or INITIAL_INT on error */ /** * Returns the memory location of the given node declaration, or INITIAL_INT on error */ #endif
DisquetteDispo Vérifier la disponibilité du lecteur de disquette
Suite de Fibonacci Exemple d'itération en C
Suite de Fibonacci Exemple de récursion en C
astDataRepresentation.h Représentation de données de l'arbre syntaxique abstrait Compilateur LSD010
ast.h Arbre syntaxique abstrait Compilateur LSD010
ast.c Arbre syntaxique abstrait Compilateur LSD010
symbolsTableDataRepresentation.h Représentation de données de la table des symboles Compilateur LSD010
symbolsTable.h Fonctions de gestion de la table des symboles Compilateur LSD010
symbolsTable.c Fonctions de gestion de la table des symboles Compilateur LSD010
hashCode.h Fonctions de hachage Compilateur LSD010
hashCode.c Fonctions de hachage Compilateur LSD010
scopeStack.h Fonctions de gestion d'une pile de portées Compilateur LSD010
scopeStack.c Fonctions de gestion d'une pile de portées Compilateur LSD010
scopeHelper.h Fonctions de gestion de la portée courante Compilateur LSD010
console.h Fonctions d'affichage Compilateur LSD010
console.c Fonctions d'affichage Compilateur LSD010
graphVizHelper.h Génération d'une image d'un arbre syntaxique abstrait.
Classe d'intégration de l'outil GraphViz. Compilateur LSD010
graphVizHelper.c Génération d'une image d'un arbre syntaxique abstrait.
Classe d'intégration de l'outil GraphViz. Compilateur LSD010
common.h Définition des constantes et variables communes Compilateur LSD010
pcode.c Génération de p-code Compilateur LSD010
pcode.h Génération de p-code Compilateur LSD010
Tous les extraits
Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.
9 mots clés dont 5 définis manuellement (plus d'information...).
Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher le nuage de mots clés.
Recherche (afficher)
Utilisateur (masquer)
Navigation (masquer)
Apparence (afficher)
Stats (afficher)
Citation (masquer)