No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

console.h

Description du code

Fonctions d'affichage Compilateur LSD010

Code source ou contenu du fichier

  1. /*
  2.  * console.h : output (terminal and files) helper file
  3.  * Part of the compiler project for LSD10 language
  4.  * Gaudry Stéphane
  5.  * More information on http://www.gaudry.be/langages-lex-yacc-intro.html
  6.  */
  7. #ifndef CONSOLE_H
  8. #define CONSOLE_H
  9. /*
  10. * Output Files
  11. *************************************************************
  12. */
  13. #define AST_HTML_FILE "ast.html"
  14. #define AST_XML_FILE "ast.xml"
  15. #define SYMBOLSTABLE_HTML_FILE "symbolsTable.html"
  16. /*
  17. * Output functions
  18. *************************************************************
  19. */
  20. /**
  21. * Print custom message on stdout, depending on the Debug level
  22. */
  23. void printMsg(int msgType, char *msg, char *file, int line);
  24. /**
  25. * Generates Yacc error with custom message
  26. * todo: 2 function; this is used only to call the yyerror function and producing a exit(EXIT_SUCCESS),
  27. * and another to print KO with an exit(EXIT_FAILURE) on compiler inexpected bug (like allocation error)
  28. */
  29. void onError(char* errorMsg, char* compilerFile, int compilerLine, AstNode *node);
  30. void onUnrecognizedTypeError(int type, char* file, int line);
  31. void onNotIntegerNotBooleanTypeError(AstNode *node, char *file, int line);
  32. void onNotForwardDeclarationError(AstNode *current, AstNode *found);
  33. /*
  34. * Output functions
  35. *************************************************************
  36. */
  37. void printDebugTree(char *htmlFileName, char *xmlFileName);
  38. void printTree();
  39. int printSymbolsTableHeader();
  40. int printSymbolsTableFooter();
  41. int printSymbolsTableItem();
  42. int printSymbolsUsage();
  43. /**
  44. * show symbols table status on default output(console)
  45. * @param file compiler file where this function is called
  46. * @param line compiler line where this function is called
  47. */
  48. int printSymbolsTableDebug(char*file, int line);
  49. /**
  50. * Generates p-code output on stdout,
  51. * and (if GENERATE_PCODE_FILE is set to 1) write it into a file
  52. * source http://www.pps.jussieu.fr/~rifflet/enseignements/LC4/vararg.html
  53. * Only one digit format allowed (examples %s, %d, %f, %l)
  54. */
  55. void printPCode(FILE* pcodeFile, char *format, ...);
  56. /*
  57. * Debug levels
  58. *************************************************************
  59. */
  60. char* debugLevelToString(int type);
  61.  
  62. #endif

Autres extraits de codes en c

  • 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

English translation

You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.

If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.

Thank you in advance.

Document created the 05/10/2009, last modified the 28/10/2018
Source of the printed document:https://www.gaudry.be/en/sniplet-rf-lsd010/project/source/console.h.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.