词法分析器/分析器 [英] Lexical Analyzer/Parser

查看:153
本文介绍了词法分析器/分析器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为我所在的类创建一个词法分析器。它需要读入一个程序并查看它是否与简单的语法匹配。有没有一些简单的方法来使用正则表达式,或者有人有一些代码来帮助我开始。我现在有点难过,因为我之前从未做过这样的事情。


谢谢

解决方案

以下链接有很多关于词法分析器和正则表达式的信息

http:// www。 cybercom.net/~zbrad/DotNet/Lex/Lex.htm

I need to create a lexical analyzer for a class that I am in.  It needs to read in a program and see if it matches a simple grammer.  Is there some easy way to do this with regular expressions, or does someone have some code to help me get started.  I'm kinda stumped right now as I have never done anything like this before.

Thanks

解决方案

The following link has a lot of informationon lexical analyzers and Regular expressions

http://www.cybercom.net/~zbrad/DotNet/Lex/Lex.htm


这篇关于词法分析器/分析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆