Pythonic way to implement a tokenizer

前端 未结 12 699
青春惊慌失措
青春惊慌失措 2020-12-30 07:11

I\'m going to implement a tokenizer in Python and I was wondering if you could offer some style advice?

I\'ve implemented a tokenizer before in C and in Java so I\'m

12条回答
  •  再見小時候
    2020-12-30 07:45

    When I start something new in Python I usually look first at some modules or libraries to use. There's 90%+ chance that there already is somthing available.

    For tokenizers and parsers this is certainly so. Have you looked at PyParsing ?

提交回复
热议问题