Download codex-rs/core/assets/tools/apply_patch.lark from SaylorTwift/codex: direct link, hf CLI and curl.
- Browser
- Download file 578 Bytes
-
https://huggingface.co/SaylorTwift/codex/resolve/main/codex-rs/core/assets/tools/apply_patch.lark
- Command line
-
hf download hf://SaylorTwift/codex/codex-rs/core/assets/tools/apply_patch.lark
-
curl -L -o apply_patch.lark https://huggingface.co/SaylorTwift/codex/resolve/main/codex-rs/core/assets/tools/apply_patch.lark
578 Bytes
| start: begin_patch hunk+ end_patch | |
| begin_patch: "*** Begin Patch" LF | |
| end_patch: "*** End Patch" LF? | |
| hunk: add_hunk | delete_hunk | update_hunk | |
| add_hunk: "*** Add File: " filename LF add_line+ | |
| delete_hunk: "*** Delete File: " filename LF | |
| update_hunk: "*** Update File: " filename LF change_move? change? | |
| filename: /(.+)/ | |
| add_line: "+" /(.*)/ LF -> line | |
| change_move: "*** Move to: " filename LF | |
| change: (change_context | change_line)+ eof_line? | |
| change_context: ("@@" | "@@ " /(.+)/) LF | |
| change_line: ("+" | "-" | " ") /(.*)/ LF | |
| eof_line: "*** End of File" LF | |
| %import common.LF | |