Synopsis - Synopsis

# Namespace Synopsis

Namespaces Summary:
PTree
SymbolLookup
TypeAnalysis
Classes Summary:
class Buffer

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

class Lexer

a Lexer reads tokens from a stream.

class Parser

C++ Parser

class SymbolFactory

SymbolFactory populates a symbol table.

class Timer
class Trace
Structs Summary:
struct Token

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

Functions Summary:
inline bool is_blank(char c)
inline bool is_digit(char c)
inline bool is_eletter(char c)
inline bool is_float_suffix(char c)
inline bool is_hexdigit(char c)
inline bool is_int_suffix(char c)
inline bool is_letter(char c)
inline bool is_xletter(char c)
Classes Details:
class Buffer

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

a Lexer reads tokens from a stream.

class Parser

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>.

class SymbolFactory

SymbolFactory populates a symbol table.

Structs Details:
struct Token

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

Generated on Thu Apr 16 16:27:32 2009 by
synopsis (version devel)