DEFINITION MODULE EBNFScanner;
(*====================================================================
    Version  : 1.00  04 Feb 1989  C. Lins
    Compiler : Bob Campbell's MPW Modula-2 Compiler
    Component: EBNFScanner

    INTRODUCTION
    This module defines a scanner for EBNF.

    REVISION HISTORY
    v1.00  04 Feb 1989  C. Lins:
      Initial implementation derived from Wirth's Programming in
                        Modula-2, 4th edition, pp 96-100.
====================================================================*)

FROM    StrCSUMI IMPORT
        (*--type*)      String;

FROM    FIO      IMPORT
        (*--type*)      File;

TYPE    Symbol = (identifier,
                  literal,
                  lparen,
                  lbraket,
                  lbrace,
                  bar,
                  eql,
                  period,
                  rparen,
                  rbraket,
                  rbrace,
                  other
                );

VAR             theSymbol  : Symbol;       (*-- current symbol *)
                lineNo     : INTEGER;      (*-- current line number *)
                theIdent   : String;       (*-- current identifier *)
                source     : File;
                errorsFound: BOOLEAN;

PROCEDURE       GetSymbol;
PROCEDURE       MarkError (errorNo : INTEGER);
PROCEDURE       SkipLine;

END EBNFScanner.
