Commit Graph

1845 Commits

Author SHA1 Message Date
Tom Alexander
f2d16d302a
Implement document parser. 2023-03-24 17:34:56 -04:00
Tom Alexander
7ab3df6938
Use headline instead of heading for section_end.
This should be more performant.
2023-03-24 17:30:33 -04:00
Tom Alexander
8013f127df
Implement heading parser. 2023-03-24 17:19:46 -04:00
Tom Alexander
dc9f3eb2e6
Implement the section parser. 2023-03-24 17:00:27 -04:00
Tom Alexander
754c1922df
Create a start_of_line parser. 2023-03-24 16:37:34 -04:00
Tom Alexander
ceb7788cfa
Check the exit matcher in more places. 2023-03-23 20:12:42 -04:00
Tom Alexander
3502a31b28
Simple version of the headline parser done. 2023-03-23 20:03:45 -04:00
Tom Alexander
4f10f2abec
Solved the lifetime issue by using the standard many1 combinator. 2023-03-23 20:00:35 -04:00
Tom Alexander
02d04b59db
Ran into a lifetime issue. 2023-03-23 19:53:20 -04:00
Tom Alexander
5c8a064eca
Start writing the parser for headings. 2023-03-23 19:35:32 -04:00
Tom Alexander
d3c804942f
Simplified context_many1 based on the assumption that we will not use previous element context elements. 2023-03-23 18:25:00 -04:00
Tom Alexander
ee60cf40dd
Disable building the old combinator. 2023-03-23 18:01:33 -04:00
Tom Alexander
6042c44514
Starting to define document parser. 2023-03-23 17:59:39 -04:00
Tom Alexander
d98a11059c
Introduce the document structure. 2023-03-23 17:52:16 -04:00
Tom Alexander
35d60c10ba
Define greater and lesser elements. 2023-03-23 17:26:07 -04:00
Tom Alexander
66befc66a9
Define regular link. 2023-03-23 17:02:08 -04:00
Tom Alexander
fd45e4381c
Add a test org-mode document that shows backslashes before a line break create an explicit line break.
This line break appears in the output (for example a <br> in HTML) as opposed to the line breaks in paragraphs syntactically that get reduced to a single space on the same line.
2023-03-23 16:57:03 -04:00
Tom Alexander
87c4a955af
Starting to define objects based on org-mode's definitions. 2023-03-23 16:49:52 -04:00
Tom Alexander
36210c2d7f
Add a DocumentRoot context element storing the original full document.
This might be used for look-behind instead of storing previous element nodes in the context tree.
2023-03-23 16:40:39 -04:00
Tom Alexander
7402de6a7c
Add a test org document with an asterisk inside the bold.
This is to prove that bold can contain an asterisk if it doesn't satisfy the exit matcher.
2023-03-23 14:20:14 -04:00
Tom Alexander
f060e7189b
Minor cleanup. 2023-03-23 14:13:21 -04:00
Tom Alexander
150b4d4387
Merge branch 'exit_matcher_investigation' 2023-03-21 15:30:04 -04:00
Tom Alexander
61638e80a0
Looks like tables cannot contain lists so we don't have to worry about more complicated exit rules. 2023-03-21 15:20:42 -04:00
Tom Alexander
fd879de353
Add a test case showing 2 blank lines exits the top-level plain list. 2023-03-21 15:13:50 -04:00
Tom Alexander
95fe88a5f4
Make all the makefiles recursive. 2023-03-21 14:32:26 -04:00
Tom Alexander
8cfa40737a
Fixed it so that each source file has its own role. 2023-03-21 14:20:33 -04:00
Tom Alexander
f8bce7e1a6
Create a more automatic makefile for org-mode trees.
Unfortunately, this seems to rebuild every source file every time so I still need to work on fixing that.
2023-03-21 14:18:14 -04:00
Tom Alexander
6b5db46205
Merge branch 'plainlist' 2023-03-21 13:44:30 -04:00
Tom Alexander
cee12b7512
Allow IgnoreParent to be dead code. 2023-03-21 13:44:22 -04:00
Tom Alexander
77d8c5e029
Mark the plain list functions as allow dead code. 2023-03-21 13:38:23 -04:00
Tom Alexander
2fcb445fe9
Switch to ending plain lists with 2 blank lines instead of just 1. 2023-03-21 13:36:52 -04:00
Tom Alexander
e3f0aaefdf
Add TODO. 2023-03-19 18:28:59 -04:00
Tom Alexander
a5a03126d2
Add test for nested list end via 2 blank lines. 2023-03-19 14:52:29 -04:00
Tom Alexander
6a0dc2fc62
Format the ast. 2023-03-19 14:21:02 -04:00
Tom Alexander
33a69fbe0e
fixup 2023-03-19 14:17:11 -04:00
Tom Alexander
4e7d7d3bcf
Add scripts for dumping the org-mode ast to investigate how emacs parses various inputs. 2023-03-19 14:07:47 -04:00
Tom Alexander
bf3464c65c
End list items when the following line is indented less than or equal to the current item. 2023-03-19 13:05:37 -04:00
Tom Alexander
6d19eeb0f4
Add parsers for lines that are indented less than or equal to the current line item's indent. 2023-03-18 17:32:07 -04:00
Tom Alexander
29904f2bb5
Detect next list item as ender for current list item. 2023-03-18 14:36:33 -04:00
Tom Alexander
88c974f8e4
Record the list item indent depth in the context tree. 2023-03-18 13:26:35 -04:00
Tom Alexander
32897270a5
Support leading whitespace for list items. 2023-03-18 13:26:32 -04:00
Tom Alexander
37070689c6
Continued work on item parser.
Still needs to:

1. Do context things
2. Fix the double-space after the tag separator issue
3. Add support for indentation
4. Write item_end
5. Write plain_list
2022-12-18 07:52:02 -05:00
Tom Alexander
5e7c891681
Start of list item implementation. 2022-12-18 07:52:02 -05:00
Tom Alexander
62e5499150
Add parsers for most of the rest of item. 2022-12-18 07:52:02 -05:00
Tom Alexander
b4e28f3d4d
Implement a parser for a bullet in a list item. 2022-12-18 07:52:02 -05:00
Tom Alexander
f39319702c
Switch to nom's consumed. 2022-12-18 07:52:01 -05:00
Tom Alexander
76b2325486
Start the plain list module. 2022-12-18 07:52:01 -05:00
Tom Alexander
89758721ed
Rename contents to source to match objects that need to store a separate source. 2022-12-18 04:42:13 -05:00
Tom Alexander
448dcfac72
Create an also_recognize combinator to make providing source slices fast and safe. 2022-12-18 04:36:12 -05:00
Tom Alexander
60d9487fdf
Add comment. 2022-12-18 04:36:12 -05:00