Conversation
Edited 1 year ago
TIL:
While modern programming languages are specified in context-free or context-sensitive grammars, regular languages are still used for tokenizing the source code because regular language is limited but powerful.

The lexical specification of a typical programming language is written in regular language.

The computational unit that understands regular languages are finite automata. To implement an automaton, a nondeterministic automata that processes a regular expression is created first, and then it is converted to deterministic finite automata for fast processing.
0
0
0