What would be a good Delphi lexer/parser for Javascript language file? [closed]

两盒软妹~` 提交于 2019-12-05 11:03:09

For the lexer you can see Synedit's source code for the Javascript highlighter. A highlighter in Synedit context is a lexer with special hooks to provide highlighting to the editor component. Trimming those hooks and getting a plain lexer is a trivial job.

Also Synedit editor can come handy while learning how to build lexers as it will be a help to visually test your lexers real-time. You can see the demos or ask at the mailing list for more.

I think you should use should look at GoldParser (http://www.devincook.com/goldparser) for generating a complete JS parser in Delphi code. GoldParser is freeware though.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!