Skip to content

schulze/scan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scan

A generic scanner based on the scanner in http://golang.org/pkg/text/template/parse/.

Package scan contains the generic parts of Rob Pike's scanner for the text/template package in Go's standard library. Only a few changes were made to turn the code into a library.

The package can be used to write scanners by supplying the missing parts: a list of tokens and state functions implementing the state machine.

See the test code for a simple example and the original lexer in http://go.googlecode.com/hg/src/pkg/text/template/parser/lex.go for a real-world example.

About

A generic scanner based on the scanner in http://golang.org/pkg/text/template/parse/.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages