/* * ast.h : generation of an Abstract Syntaxic Tree, * and LSD10 constraints checks (data types, etc.). * Part of the compiler project for LSD10 language * Gaudry Stéphane * More information on http://www.gaudry.be/langages-analyse-syntaxique-ast.html */ #ifndef AST_H #define AST_H #include "common.h" #include "const.h" #include "astDataRepresentation.h" //todo : don't include this to hide real data representation /* * ********************************************************** * AST creation and destruction functions * ********************************************************** */ /** * Allocates memory space and creates an AST node information */ /** * Allocates memory space and creates an AST node */ AstNode* createASTNode(debugYacc yaccPsn, int type, AstNodeInfo *info, AstNode *right, AstNode *left); /** * Creates a default initialized debug structure * Exposed Method */ DebugInfo* createDebug(); /** * Cleans memory allocated for the AST */ /* * ********************************************************** * AST functions * ********************************************************** */ /** * Sets a node type type */ /** * Sets a node subtype */ /** * Sets a definitive var type or function type to avoid check later * Pre-condition: node not null */ /** * Returns a human readable string from a given type constant value * Expected : one of the NODE_TYPE_xxx or LEXICAL_VAR_TYPE_xxx or Yacc(yytokentype) constants */ /** * Performs some verifications into the AST for types matching, * validity of main function, etc. */ /** * Checks if the first given node is before the second, based on the source code position * Returns one of the AST_CMP_BEFORE, AST_CMP_EQUALS, AST_CMP_AFTER constants, or other values on NULL arg * Pre-condition: node1 and node2 not modified */ /** * Returns the main function node * Pre-condition: a call to checkAST() must be done before, or returns NULL */ AstNode* getMain(); #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)