Exemple #1
0
func NewLexer(input string) *Lexer {
	l := &Lexer{
		input:          input,
		inputLength:    len(input),
		subs:           []Substitution{},
		lineNo:         1,
		log:            kisslog.New("Lexer"),
		IgnoreNewlines: false,
		CheckAlias:     true,
		CheckKeyword:   true,
	}
	return l
}
Exemple #2
0
func NewParser(input string) *Parser {
	return &Parser{
		lexer: NewLexer(input),
		log:   kisslog.New("parser"),
	}
}