Skip to content

Instantly share code, notes, and snippets.

View noverd's full-sized avatar
🎯
Focusing

Gagarinten-Noverdo noverd

🎯
Focusing
  • On Earth
View GitHub Profile
@hadware
hadware / json_parser.py
Last active June 20, 2023 09:50
Parsing Examples with sly
from sly import Lexer, Parser
import pprint
class JSONLexer(Lexer):
tokens = {"FLOAT", "INTEGER", "STRING"}
literals = {'{', '}', '[', ']', ',', ':'}
ignore = " \t\n"