Qbject system
Modules | Functions | Variables
Syntax parser

powered with PLY library More...

Collaboration diagram for Syntax parser:

Modules

 String lexer state
 Special lexer state for string parsing with \t\r\n.. control chars.
 

Functions

def Q.t_newline (t)
 line counter
 
def Q.t_comment (t)
 comment lexeme
 
def Q.t_hex (t)
 hex
 
def Q.t_binary (t)
 binary
 
def Q.t_number (t)
 number
 
def Q.t_integer (t)
 integer
 
def Q.t_operator (t)
 operator
 
def Q.t_defopeator (t)
 compiler words
 
def Q.t_symbol (t)
 symbol
 
def Q.t_ANY_error (t)
 required lexer error callback
 

Variables

list Q.tokens
 token types binded with Qbject class tree More...
 
string Q.t_ignore = ' \t\r'
 drop spaces
 
 Q.lexer = lex.lex()
 FORTH lexer. More...
 

Detailed Description

powered with PLY library

(c) David M. Beazley

Variable Documentation

◆ lexer

Q.lexer = lex.lex()

FORTH lexer.

Todo:
use stack to allow .inc directive

◆ tokens

list Q.tokens
Initial value:
1 = ['comment','operator','defoperator','symbol','string',
2  'number','integer','hex','binary']

token types binded with Qbject class tree

Every Qbject type can be matched by regexp in string form will be used as token by PLY library. To do it all Qbjects was done compatible with PLY requirements for token: they must contain predefined set of fields

See also
PLY manual.

every token type must be equal to lowercased name of correspondent Qbject class