Synopsis - Synopsis::Token

namespace Synopsis
struct Token
File: ../Synopsis/Token.hh

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

Public Typedefs Summary:
int Type
Public Enums Summary:
`0000 Identifier, Constant, CharConst, StringL, AssignOp, EqualOp, RelOp, ShiftOp, LogOrOp, LogAndOp, IncOp, Scope, Ellipsis, PmOp, ArrowOp, BadToken, AUTO, CHAR, CLASS, CONST, DELETE, DOUBLE, ENUM, EXTERN, FLOAT, FRIEND, INLINE, INT, LONG, NEW, OPERATOR, PRIVATE, PROTECTED, PUBLIC, REGISTER, SHORT, SIGNED, STATIC, STRUCT, TYPEDEF, TYPENAME, UNION, UNSIGNED, VIRTUAL, VOID, VOLATILE, TEMPLATE, MUTABLE, BREAK, CASE, CONTINUE, DEFAULT, DO, ELSE, FOR, GOTO, IF, OFFSETOF, RETURN, SIZEOF, SWITCH, THIS, WHILE, ATTRIBUTE, METACLASS, UserKeyword, UserKeyword2, UserKeyword3, UserKeyword4, BOOLEAN, EXTENSION, TRY, CATCH, THROW, UserKeyword5, NAMESPACE, USING, TYPEID, TYPEOF, WideStringL, WideCharConst, WCHAR, ntDeclarator, ntName, ntFstyleCast, ntClassSpec, ntEnumSpec, ntDeclaration, ntTypedef, ntTemplateDecl, ntMetaclassDecl, ntParameterDecl, ntLinkageSpec, ntAccessSpec, ntUserAccessSpec, ntUserdefKeyword, ntExternTemplate, ntAccessDecl, ntNamespaceSpec, ntUsing, ntTemplateInstantiation, ntNamespaceAlias, ntIfStatement, ntSwitchStatement, ntWhileStatement, ntDoStatement, ntForStatement, ntBreakStatement, ntContinueStatement, ntReturnStatement, ntGotoStatement, ntCaseStatement, ntDefaultStatement, ntLabelStatement, ntExprStatement, ntTryStatement, ntCommaExpr, ntAssignExpr, ntCondExpr, ntInfixExpr, ntPmExpr, ntCastExpr, ntUnaryExpr, ntSizeofExpr, ntNewExpr, ntDeleteExpr, ntArrayExpr, ntFuncallExpr, ntPostfixExpr, ntUserStatementExpr, ntDotMemberExpr, ntArrowMemberExpr, ntParenExpr, ntStaticUserStatementExpr, ntThrowExpr, ntTypeidExpr, ntTypeofExpr, Ignore, ASM, DECLSPEC, PRAGMA, INT64, Comment
Public Member functions Summary:
constructor Token()
constructor Token(const char* s, size_t l, Type t)
bool operator==(char c) const
Public Data members Summary:
const char* ptr
size_t length
Type type
Enumerators Summary:
Identifier
Constant

< The first 256 are representing character literals.

CharConst
StringL
AssignOp
EqualOp
RelOp
ShiftOp
LogOrOp
LogAndOp
IncOp
Scope
Ellipsis
PmOp
ArrowOp
BadToken
AUTO
CHAR
CLASS
CONST
DELETE
DOUBLE
ENUM
EXTERN
FLOAT
FRIEND
INLINE
INT
LONG
NEW
OPERATOR
PRIVATE
PROTECTED
PUBLIC
REGISTER
SHORT
SIGNED
STATIC
STRUCT
TYPEDEF
TYPENAME
UNION
UNSIGNED
VIRTUAL
VOID
VOLATILE
TEMPLATE
MUTABLE
BREAK
CASE
CONTINUE
DEFAULT
DO
ELSE
FOR
GOTO
IF
OFFSETOF
RETURN
SIZEOF
SWITCH
THIS
WHILE
ATTRIBUTE
METACLASS
UserKeyword
UserKeyword2
UserKeyword3
UserKeyword4
BOOLEAN
EXTENSION
TRY
CATCH
THROW
UserKeyword5
NAMESPACE
USING
TYPEID
TYPEOF
WideStringL
WideCharConst
WCHAR
ntDeclarator
ntName
ntFstyleCast
ntClassSpec
ntEnumSpec
ntDeclaration
ntTypedef
ntTemplateDecl
ntMetaclassDecl
ntParameterDecl
ntLinkageSpec
ntAccessSpec
ntUserAccessSpec
ntUserdefKeyword
ntExternTemplate
ntAccessDecl
ntNamespaceSpec
ntUsing
ntTemplateInstantiation
ntNamespaceAlias
ntIfStatement
ntSwitchStatement
ntWhileStatement
ntDoStatement
ntForStatement
ntBreakStatement
ntContinueStatement
ntReturnStatement
ntGotoStatement
ntCaseStatement
ntDefaultStatement
ntLabelStatement
ntExprStatement
ntTryStatement
ntCommaExpr
ntAssignExpr
ntCondExpr
ntInfixExpr
ntPmExpr
ntCastExpr
ntUnaryExpr
ntSizeofExpr
ntNewExpr
ntDeleteExpr
ntArrayExpr
ntFuncallExpr
ntPostfixExpr
ntUserStatementExpr
ntDotMemberExpr
ntArrowMemberExpr
ntParenExpr
ntStaticUserStatementExpr
ntThrowExpr
ntTypeidExpr
ntTypeofExpr
Ignore
ASM
DECLSPEC
PRAGMA
INT64
Comment
Enumerators Details:
Constant

< The first 256 are representing character literals.

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