Skip to content

A Python lexer for chess games in Portable Game Notation (PGN) format

Notifications You must be signed in to change notification settings

eolo999/pgnlexer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

pgnlexer

This modules uses David M. Beazley ply.lex modules to implement a PGN lexer.

It may be inaccurate in more than one places but works pretty well for PGNs found in the wild.

Example usage:

import lexer

with open('filename.pgn') as pgn_file:
    pgn_text = pgn_file.read()

tokens = lexer.tokenize(pgn_text)

About

A Python lexer for chess games in Portable Game Notation (PGN) format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages