⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prettier.def

📁 一个Modula-2语言分析器
💻 DEF
字号:
DEFINITION MODULE Prettier;
(* Pretty printing auxiliary functions for use with Modula-2 pretty printing
   program generated by COCO from an attributed grammar
   P.D. Terry, Rhodes University, 1995 *)

  IMPORT FileIO;

  VAR
    results : FileIO.File;

  PROCEDURE Append (Str : ARRAY OF CHAR);
  (* Append String to output buffer *)

  PROCEDURE IndentNextLine;
  (* If output buffer has characters other than spaces, copy output buffer and
     line mark to results file.  Prepare to indent further lines by two
     spaces more than before *)

  PROCEDURE ExdentNextLine;
  (* If output buffer has characters other than spaces, copy output buffer and
     line mark to results file.  Prepare to indent further lines by two
     spaces less than before *)

  PROCEDURE NewLine;
  (* If output buffer has characters other than spaces, copy output buffer and
     line mark to results file  *)

  PROCEDURE BlankLine;
  (* NewLine, followed by line mark *)

  PROCEDURE Indent;
  (* Increment indentation level by two spaces *)

  PROCEDURE Exdent;
  (* Decrement indentation level by two spaces *)

  END Prettier.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -