Commit Graph

33 Commits

Author SHA1 Message Date
wash 0cd7ca2dde parse: add a basic function to report parse errors 2026-05-12 22:56:40 +01:00
wash 5ce780e037 parse: add a range of internal parser definitions 2026-05-12 22:55:59 +01:00
wash 2235d8593b parse: lex: add a range of operator tokens 2026-05-12 22:54:50 +01:00
wash 64903c821c parse: lex: add missing lex ctx members 2026-05-12 22:54:17 +01:00
wash 39457aa7e6 parse: add some more generic token parser functions 2026-05-12 22:53:26 +01:00
wash 440561cb39 parse: implement parsing of semicolon-delimited statement lists 2026-05-12 22:52:48 +01:00
wash cc450da31e parse: lex: support tokens terminating multiple lex states in certain circumstances 2026-05-12 22:51:45 +01:00
wash e3b92fe4f2 parse: lex: fix scanning of sub-expressions and fstrings in statement mode 2026-05-12 22:51:15 +01:00
wash b2190dd4d0 parse: lex: improve scanning of more complex redirection expressions 2026-05-12 22:48:57 +01:00
wash 3dd5f12ee5 parse: lex: fix string state not terminating when encountering a dquote 2026-05-12 22:48:08 +01:00
wash 721e0f851a parse: lex: add a range of new symbol tokens 2026-05-12 22:47:29 +01:00
wash dee4e5dbf7 parse: lex: fix arithmetic state handling dquote symbols incorrectly 2026-05-12 22:45:43 +01:00
wash 39125cea50 parse: lex: switch from arithmetic to statement when scanning =, |, and \n 2026-05-12 22:45:05 +01:00
wash 7ddc140dbf parse: lex: fix arithmetic state not scanning operator tokens 2026-05-12 22:44:33 +01:00
wash a408b9efa2 parse: lex: move per-state token settings to state source files 2026-05-11 23:57:35 +01:00
wash 0c21be8d67 parse: lex: add proper data-driven state-machine functionality
movement between lexer states is now defined (almost) exclusively
by a table of outgoing links defined for each state type.

the main lexer system uses this table to determine when, how, and to
where the state should be changed.

also add a dedicated lexer state for scanning hashtables, due to the
particularly unique rules that apply within.
2026-05-11 23:02:02 +01:00
wash 304eb80e0d bshell: add debug output support for operator tokens 2026-05-10 19:15:41 +01:00
wash ffdb28ba22 parse: lex: replace expression scanner with statement; implement complex-word scanner
also fix a bunch of scanning edge-cases
2026-05-10 19:14:24 +01:00
wash 7aa2aee5bd parse: lex: implement recording coordinates of lex tokens 2026-05-10 19:13:29 +01:00
wash 7071630af8 parse: lex: add flags for lexer states 2026-05-10 19:10:14 +01:00
wash f5d847736a bshell.vim: fix highlighting of nested parentheses in string interpolation 2026-05-10 14:20:40 +01:00
wash 94048c6508 doc: sample: add/update sample script files 2026-05-10 14:20:08 +01:00
wash 3398de6fa9 ast: update redirection node to support fd-redirection with sub-expression 2026-05-10 14:19:29 +01:00
wash ba8a2111eb parse: update parser to support new lexer behaviour 2026-05-10 14:19:06 +01:00
wash 5ea41fcc6e parse: lex: re-implement lexer as a state machine to allow more complex scanning behaviour 2026-05-10 14:18:46 +01:00
wash cfaf53040b parse: improve command arg parsing 2026-05-09 21:21:51 +01:00
wash 7d95d57f98 bshell: first-pass implementation of a syntax lexer/parser 2026-05-09 19:00:02 +01:00
wash b12f59ed2c bshell: add functions for printing lex tokens and ast nodes 2026-05-09 18:59:42 +01:00
wash 090f6a0002 bshell: add ast node definitions 2026-05-09 18:59:13 +01:00
wash 8b0295faf2 bshell: add line-editor and file-based input support 2026-05-07 10:52:00 +01:00
wash 3c15bb1609 meta: add vim plugin for syntax highlighting 2026-05-07 10:51:04 +01:00
wash 84bb6cc0aa meta: add build system 2026-05-02 12:52:32 +01:00
wash 2139fff047 meta: initial commit 2026-05-01 20:44:32 +01:00