3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-18 01:49:53 +01:00
Commit Graph

15 Commits

Author SHA1 Message Date
Pragmatic Software
e5e0f26b90
applets/pbot-vm: minor fixes
* set `preserve_escapes` to 0 in guest/_c_base.pm so escapes are stripped in:

     <pragma-> ,show testcargs
     <candide> [global] testcargs: /code c11 printf("/say args: " ); while
               (*++argv) printf("[%s] " , *argv);
     <pragma-> ,testcargs foo\'bar baz\'qux
     <candide> args: [foo\'bar] [baz\'qux]

  to produce the desired output of:

     <candide> args: [foo'bar] [baz'qux]

* set `keep_spaces` to 1 in host/_default.pm since it turns out that in some
  languages unquoted spaces are significant, e.g. in `sh ${1%  *}` to strip
  text following two spaces. Without `keep_spaces` enabled, `sh ${1%  *}`
  becomes `sh ${1% *}` and strips all text following one space instead of two.
2024-10-30 15:43:38 -07:00
Pragmatic Software
f4caf44eb0
split_line(): Remove no longer used next_ch/last_ch 2024-10-29 12:49:19 -07:00
Pragmatic Software
4287cb9fa2
Fix split_line() quoting to be more sh-like
E.g.:

<pragma-> show testcargs
   <PBot> [global] testcargs: /code c11 printf("/say args: " ); while (*++argv) printf("[%s] " , *argv);
<pragma-> testcargs 'hello''world' 'how are 'you today
   <PBot> args: [helloworld] [how are you] [today]

Previously, adjacent 'foo''bar' would end up as 2 args like [foo] [bar]. Now
they are properly concatenated into one [foobar] argument.

This also fixes the cases of whitespace being inserted after quoted arguments.
2024-10-29 10:19:46 -07:00
Pragmatic Software
9192b7bfad
pbot-vm: Preserve escapes in -args and -stdin 2024-10-01 13:08:52 -07:00
Pragmatic Software
2547f035a1
pbot-vm: add experimental Vagrant provisioning 2024-04-04 03:41:58 -07:00
Pragmatic Software
91f8547aed
pbot-vm: add Tumbleweed orchestration script
Fix Java language missing `/bin/sh` in execute()
Update brainfck language to use `bff`
2024-03-30 16:49:09 -07:00
Pragmatic Software
b9a89e10d6 Fix UTF-8 encoding 2023-03-12 18:10:44 -07:00
Pragmatic Software
e736051de5 Fix UTF-8 encoding 2023-03-12 16:06:04 -07:00
Pragmatic Software
e7f4729567 pbot-vm: rebuild without print_last_statement() if "cannot subscript something" error 2022-05-01 10:30:34 -07:00
Pragmatic Software
02ca5e4435 pbot-vm: add C2X language files; default cc to C2X 2022-03-19 21:31:58 -07:00
Pragmatic Software
fcb39511c3 pbot-vm: restore stdin for default languages 2022-03-16 12:18:11 -07:00
Pragmatic Software
46ccc1fb70 pbot-vm: prevent [Exit 1] output with compiler errors 2022-03-06 14:07:28 -08:00
Pragmatic Software
3e2204a6b0 pbot-vm: improve exit-code handling 2022-03-06 13:51:33 -08:00
Pragmatic Software
76fd5f5fd7 pbot-vm: fix encoding issues; misc clean-ups 2022-02-24 10:39:15 -08:00
Pragmatic Software
3cfedcf3b8 Rename compiler_vm to pbot-vm and other misc applet updates 2022-02-14 16:33:29 -08:00