Namespace Synopsis

Namespaces Summary:
PTree
SymbolLookup
TypeAnalysis
Classes Summary:
class Buffer
references
source code

Buffer holds the memory on top of which a parse tree / syntax tree is constructed.

class Lexer
references
source code

a Lexer reads tokens from a stream.

class Parser
references
source code

C++ Parser

references
source code

SymbolFactory populates a symbol table.

class Timer
references
source code
class Trace
references
source code
Structs Summary:
struct Token
references
source code

A Token is what the Lexer splits an input stream into.

Functions Summary:
 void MopErrorMessage(const char* method_name, const char* msg)
references
source code
 void MopErrorMessage2(const char* msg1, const char* msg2)
references
source code
 void MopMoreWarningMessage(const char* msg1, const char* msg2 = 0)
references
source code
 void MopWarningMessage(const char* method_name, const char* msg)
references
source code
 void MopWarningMessage2(const char* msg1, const char* msg2)
references
source code
inline bool is_blank(char c)
references
source code
inline bool is_digit(char c)
references
source code
inline bool is_eletter(char c)
references
source code
inline bool is_float_suffix(char c)
references
source code
inline bool is_hexdigit(char c)
references
source code
inline bool is_int_suffix(char c)
references
source code
inline bool is_letter(char c)
references
source code
inline bool is_xletter(char c)
references
source code
Classes Details:
class Buffer
references
source code

Buffer holds the memory on top of which a parse tree / syntax tree is constructed. Besides giving access to individual characters, it provides the means to register replacements for buffer chunks, such that when the Buffer's write method is executed the new file will contain the modified source.

class Lexer
references
source code

a Lexer reads tokens from a stream.

class Parser
references
source code

C++ Parser

This parser is a LL(k) parser with ad hoc rules such as backtracking.

<name>() is the grammer rule for a non-terminal <name>. opt_<name>() is the grammer rule for an optional non-terminal <name>. is_<name>() looks ahead and returns true if the next symbol is <name>.

references
source code

SymbolFactory populates a symbol table.

Structs Details:
struct Token
references
source code

A Token is what the Lexer splits an input stream into. It refers to a region in the underlaying buffer and it has a type.

  • line directive: ^"#"{blank}*{digit}+({blank}+.*)?n
  • pragma directive: ^"#"{blank}*"pragma".*n
  • Constant:
    • {digit}+{int_suffix}*
    • "0"{xletter}{hexdigit}+{int_suffix}*
    • {digit}*.{digit}+{float_suffix}*
    • {digit}+.{float_suffix}*
    • {digit}*.{digit}+"e"("+"|"-")*{digit}+{float_suffix}*
    • {digit}+."e"("+"|"-")*{digit}+{float_suffix}*
    • {digit}+"e"("+"|"-")*{digit}+{float_suffix}*
  • CharConst: '([^'n]|\[^n])'
  • WideCharConst: L'([^'n]|\[^n])'
  • StringL: "([^"n]|\["n])*"
  • WideStringL: L"([^"n]|\["n])*"
  • Identifier: {letter}+({letter}|{digit})*
  • AssignOp: *= /= %= += -= &= ^= <<= >>=
  • EqualOp: == !=
  • RelOp: <= >=
  • ShiftOp: << >>
  • LogOrOp: ||
  • LogAndOp: &&
  • IncOp: ++ --
  • Scope: ::
  • Ellipsis: ...
  • PmOp: .* ->*
  • ArrowOp: ->
  • others: !%^&*()-+={}|~[];:<>?,./
  • BadToken: others