[Libwebsockets] 回复: libwebsocket : lextable.h

Andy Green andy at warmcat.com
Sun Mar 15 15:59:54 CET 2015



On 15 March 2015 18:51:33 GMT+08:00, Jeffrey Zhao <chunyong.zhao at qq.com> wrote:
>Dear Sir
>Cool!
>Does that means you invented the lextable wheel?
>:)

No it means for this set of strings doing it by hand carefully gets very good and compact results.  But the idea and method is probably older than I am.

There's another custom parser for http2 stuff and another for http2 hpack huffman coding, all of them give excellent performance.

-Andy

>
>Thanks.
>
>
>
>
>
>
>------------------ 原始邮件 ------------------
>发件人: "Andy Green";<andy at warmcat.com>;
>发送时间: 2015年3月15日(星期天) 晚上6:48
>收件人: "Jeffrey Zhao"<chunyong.zhao at qq.com>;
>"libwebsockets at ml.libwebsockets.org"<libwebsockets at ml.libwebsockets.org>;
>
>
>主题: Re: libwebsocket : lextable.h
>
>
>
>
>
>On 15 March 2015 15:46:19 GMT+08:00, Jeffrey Zhao
><chunyong.zhao at qq.com> wrote:
>>Dear Sir
>>Sorry for bothering you again.
>>:)
>>I have figured it out when I see the file minilex.c.
>>
>>
>>But I doesn't know the theory behind it, could you kindly give me some
>>hints how the lex analyzer work? Maybe you can send me some links
>>regarding the "High efficiency lexical state parser".‍
>
>You should just read the source... although I wrote it myself there's
>nothing novel about how it works compared to other parsers in the last
>40 years.
>
>It just matches the encoding to the list of strings making it very
>efficient.
>
>-Andy
>
>>
>>Thank you in advance.
>>
>>
>>Best Regards.
>>Jeffrey.
>>
>>
>>
>>
>>------------------ Original ------------------
>>From:  "Jeffrey Zhao";<chunyong.zhao at qq.com>;
>>Date:  Sun, Mar 15, 2015 03:04 PM
>>To:  "Andy Green"<andy at warmcat.com>; 
>>
>>Subject:  libwebsocket : lextable.h
>>
>>
>>
>>Dear Sir
>>I am reading through the source code, and found one special .h header
>>file: lextable.h
>>I believe this file is generated based on the file: lextable-strings.h
>>Am I right? If yes, is there any tool to generate lextable.h
>>automatically?
>>
>>
>>BTW, I just subscribed the mail list.
>>
>>
>>Thank you very much.
>>
>>
>>Best regards.
>>Jeffrey.




More information about the Libwebsockets mailing list