Regular Expressions In Compilers
Are regular expressions used directly in compilers to identify tokens?
Yes. Many compilers use a generated scanner whose token rules are defined as REs to a DFA. Flex(1) is a prominent example.
I don't understand the second part of your question.
精彩评论