编译器如何处理转义符与元字符? [英] how Escape Characters vs metacharacters are handled by the complier?

查看:79
本文介绍了编译器如何处理转义符与元字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我是正则表达式的新手,有人可以告诉我
编译器如何处理转义字符和元字符,并且在内部有什么作用?




问候
Chaithanya M

Hi Everyone,

I am newbie to Regular Expressions,Can anyone please tell me
how Escape characters and metacharacters are handled by Compiler and what does it internally do?




regards
Chaithanya M

推荐答案

老实说,这取决于实现.在的代码Boost.Regex [ ^ ].该代码是免费提供的.
To be honest, this depends on the implementation. A good general introduction to the kind of algorithms used by regular expression parsers can be found in Mastering Regular Expressions[^] by Jeffrey Friedl. If you are serious about regular expressions then you should have this book.

As to how a regex engine handles things in practice, look at the code for Boost.Regex[^]. The code is freely available.


这篇关于编译器如何处理转义符与元字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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