Commit Graph

102 Commits

Author SHA1 Message Date
Emi Simpson 92d458de85
Add partition 2024-03-15 20:21:41 -04:00
Emi Simpson 206c0a0ec0
Start making a grammar then realize there's a builtin json parser 2024-03-15 20:21:41 -04:00
Emi Simpson bc2a2e2a8c
Functional operation semantics 2024-03-15 20:21:41 -04:00
Emi Simpson c4098d8c2b
Add parse_, expand some doc tests 2024-03-15 20:21:41 -04:00
Emi Simpson 08547aea2f
Add a combinator parser 2024-03-15 20:21:40 -04:00
Emi Simpson dfdbda4406
Fixed a bug which caused unnecessary infinite recursion 2024-03-15 20:21:40 -04:00
Emi Simpson 73e9771e6c
Rename main -> lab2 2024-03-15 20:21:40 -04:00
Emi Simpson d39a78fae7
Add a main! Now it works! 2024-03-15 20:21:40 -04:00
Emi Simpson 6f0d15ee3f
Finagle some types and imports 2024-03-15 20:21:39 -04:00
Emi Simpson 9d6da82dd4
Fix broken tests in build_oracle 2024-03-15 20:21:39 -04:00
Emi Simpson 0605b759f0
Fix failing doctests in lex.py 2024-03-15 20:21:39 -04:00
Emi Simpson 57130c9233
Clean up some unused functions 2024-03-15 20:21:39 -04:00
Emi Simpson 6353522827
Get resolution working for real! 2024-03-15 20:21:38 -04:00
Emi Simpson 475c324e64
Add next_generation 2024-03-15 20:21:38 -04:00
Emi Simpson 08e02c523a
Add is_false 2024-03-15 20:21:38 -04:00
Emi Simpson fe8d9b766c
Allow hashing clauses 2024-03-15 20:21:38 -04:00
Emi Simpson 65a8c0042f
Added FSet and fset 2024-03-15 20:21:37 -04:00
Emi Simpson f0d7ee2d5e
Add derive2 2024-03-15 20:21:37 -04:00
Emi Simpson b046152a4c
Add a derive method 2024-03-15 20:21:37 -04:00
Emi Simpson 122b810b73
Add function to merge clauses 2024-03-15 20:21:37 -04:00
Emi Simpson b8cb7d864c
Add drop_none 2024-03-15 20:21:36 -04:00
Emi Simpson db2f9710dd
Add a cancelation checker 2024-03-15 20:21:36 -04:00
Emi Simpson ad4ed220b6
Add sub_all_clause 2024-03-15 20:21:36 -04:00
Emi Simpson 46bbcca1b8
Add uncurry2 2024-03-15 20:21:36 -04:00
Emi Simpson 8d3edb1ea8
Add a notation of cantions 2024-03-15 20:21:35 -04:00
Emi Simpson 1cf1acaa08
Add in support for unification 2024-03-15 20:21:35 -04:00
Emi Simpson 3028075176
Add <= as an alias for map 2024-03-15 20:21:35 -04:00
Emi Simpson 4b4f9037cf
Ignore some unhelpful type errors 2024-03-15 20:21:35 -04:00
Emi Simpson eacf7542e5
Fixed order in Subst __repr__ 2024-03-15 20:21:34 -04:00
Emi Simpson 642225b285
Add << as an alias for binding a result 2024-03-15 20:21:34 -04:00
Emi Simpson ad31d63450
Implement substitution 2024-03-15 20:21:34 -04:00
Emi Simpson 0fef3804a4
Use strings in IR rather than lexemes 2024-03-15 20:21:34 -04:00
Emi Simpson ad012184c5
Add docs 2024-03-15 20:21:34 -04:00
Emi Simpson f84a340f0a
Factor out IR and Tok 2024-03-15 20:21:33 -04:00
Emi Simpson 9e6c7d504d
Add a combined lex+parse method 2024-03-15 20:21:33 -04:00
Emi Simpson 98253bb254
Souped up error checking 2024-03-15 20:21:33 -04:00
Emi Simpson 46e59ba918
Make IR generation fallible 2024-03-15 20:21:32 -04:00
Emi Simpson 15206f7776
Do IR generation 2024-03-15 20:21:32 -04:00
Emi Simpson 532a5a14d0
Get parsing for the sample document working 2024-03-15 20:21:32 -04:00
Emi Simpson b8b6ba708f
Use an action type alias rather than class 2024-03-15 20:21:32 -04:00
Emi Simpson f692e8dcca
Reverse parser direction + doc 2024-03-15 20:21:31 -04:00
Emi Simpson 3afed0c2e0
Souped up the lexer to track line & col numbers 2024-03-15 20:21:31 -04:00
Emi Simpson 61ee996c7a
Add ability to build parse tree 2024-03-15 20:21:31 -04:00
Emi Simpson 140fe67d5d
Add action erasure to parser 2024-03-15 20:21:31 -04:00
Emi Simpson da35286207
Add p_instance 2024-03-15 20:21:31 -04:00
Emi Simpson 439fc91fc9
Added try_converge 2024-03-15 20:21:29 -04:00
Emi Simpson 6e1952b148
Added a basic recognizer 2024-03-15 20:21:16 -04:00
Emi Simpson 5e84e50aa2
Move oracle table generating facilities to grammar.py 2024-03-15 20:21:16 -04:00
Emi Simpson f813d91736
Move grammar and lex table to their own file 2024-03-15 20:21:16 -04:00
Emi Simpson 00043d27dd
Genericize the lexer 2024-03-15 20:21:14 -04:00