CanonSharp/CanonSharp.Parser/LexicalAnalyzer/RegularExpression.fs
2024-07-23 22:46:34 +08:00

13 lines
499 B
Forth

module CanonSharp.Parser.LexicalAnalyzer.RegularExpression
type RegularExpression =
| EmptyExpression
| SymbolExpression of symbol: char
| AlternationExpression of left: RegularExpression * right : RegularExpression
| ConcatenationExpression of first: RegularExpression * second : RegularExpression
| KleeneExpression of expression: RegularExpression
let convertToNondeterministicFiniteAutomation expression =
match expression with
| EmptyExpression emptyExpression ->