20 Commits

Author SHA1 Message Date
db70f8b94d Add "drop" grammar keyword to drop patterns 2021-06-09 22:48:30 -04:00
7f54778ba8 Rename Regex::DFA to TokenDFA 2021-06-06 15:18:21 -04:00
701903def2 Token should build its own NFA 2021-06-06 14:09:28 -04:00
afea886ecb Add Grammar::Token class 2021-06-06 14:04:33 -04:00
03b2e87186 Grammar takes in input string instead of file name 2021-06-06 10:09:53 -04:00
b6e3a5c151 Record accepting token in DFA state 2021-05-25 16:00:25 -04:00
35ef94dbd3 Print out DFA to test 2021-05-25 15:52:47 -04:00
c77c81bf25 Mark regex NFA end state as accepting the token 2021-05-18 16:34:26 -04:00
7196a0605a Add DFA class 2021-05-18 16:31:16 -04:00
24054461a2 Merge Regex::Parser into Regex, move Unit to its own file 2021-05-18 16:14:42 -04:00
791340b292 Build NFA for each token pattern 2021-05-17 22:57:18 -04:00
cf8718b69c Allow token definition with no pattern 2021-05-17 22:40:23 -04:00
b04ff56308 Add Regex class 2021-05-02 15:22:45 -04:00
13403405b0 Add Error class to handle grammar loading errors 2021-05-01 16:54:24 -04:00
07dd68e367 Write output file from ERB template 2021-05-01 16:44:01 -04:00
768a0ef17f Extract class name from grammar file 2021-05-01 14:34:00 -04:00
9e865d1982 Throw error on unexpected grammar input line 2021-05-01 09:40:22 -04:00
9884047090 Skip blank lines 2021-05-01 09:39:19 -04:00
04393dcc51 Check for duplicate token names; skip comment lines 2021-05-01 09:38:08 -04:00
37ad87d602 Rename GrammarParser -> Grammar 2021-05-01 09:33:35 -04:00