├── ppl-lsp ├── src │ ├── utils.rs │ ├── jump_definition.rs │ ├── lib.rs │ └── reference.rs ├── rust-toolchains.toml ├── i18n.toml ├── .cargo │ └── config.toml ├── .gitignore ├── .vscodeignore ├── data │ ├── constants.py │ └── FUNCS ├── client │ ├── tsconfig.json │ └── package.json ├── tsconfig.json ├── examples │ └── index.rs ├── Cargo.toml ├── webpack.config.js ├── i18n │ └── de │ │ └── ppl_language_server.ftl └── package.json ├── ppld ├── test_data │ ├── beep.pps │ ├── blt.pps │ ├── bye.pps │ ├── cls.pps │ ├── end.pps │ ├── more.pps │ ├── stop.pps │ ├── wait.pps │ ├── clreol.pps │ ├── color.pps │ ├── delay.pps │ ├── dir.pps │ ├── dtroff.pps │ ├── dtron.pps │ ├── hangup.pps │ ├── join.pps │ ├── newline_stmt.pps │ ├── pageon.pps │ ├── quest.pps │ ├── rdusys.pps │ ├── wrusys.pps │ ├── adjtime.pps │ ├── ansipos.pps │ ├── backup.pps │ ├── call.pps │ ├── cdchkoff.pps │ ├── cdchkon.pps │ ├── closecap.pps │ ├── dbglevel.pps │ ├── defcolor.pps │ ├── delete.pps │ ├── deluser.pps │ ├── fcl.pps │ ├── fclose.pps │ ├── fns.pps │ ├── forward.pps │ ├── freshline.pps │ ├── frewind.pps │ ├── getuser.pps │ ├── goodbye.pps │ ├── log.pps │ ├── nc.pps │ ├── pageoff.pps │ ├── putuser.pps │ ├── rdunet.pps │ ├── resetdisp.pps │ ├── restscrn.pps │ ├── savescrn.pps │ ├── sound.pps │ ├── u_cls.pps │ ├── u_fse.pps │ ├── u_pwd.pps │ ├── u_sec.pps │ ├── u_ver.pps │ ├── ver.pps │ ├── abort.pps │ ├── dispstr.pps │ ├── kbdfile.pps │ ├── kbdstuff.pps │ ├── optext.pps │ ├── rename.pps │ ├── u_addr.pps │ ├── u_alias.pps │ ├── u_def79.pps │ ├── u_fsep.pps │ ├── u_ldir.pps │ ├── u_ltime.pps │ ├── u_name.pps │ ├── u_notes.pps │ ├── u_pwdexp.pps │ ├── u_pwdlc.pps │ ├── u_pwdtc.pps │ ├── u_stat.pps │ ├── u_trans.pps │ ├── valcc.pps │ ├── confflag.pps │ ├── fopen.pps │ ├── fputpad.pps │ ├── sendmodem.pps │ ├── timeap.pps │ ├── tokcount.pps │ ├── tokenstr.pps │ ├── u_expdate.pps │ ├── u_expert.pps │ ├── u_expsec.pps │ ├── u_ldate.pps │ ├── u_logons.pps │ ├── u_longhdr.pps │ ├── u_pagelen.pps │ ├── u_pwdhist.pps │ ├── u_srcoll.pps │ ├── u_timeon.pps │ ├── valdate.pps │ ├── valtime.pps │ ├── confunflag.pps │ ├── dointr.pps │ ├── goto.pps │ ├── inc.pps │ ├── showoff_showon.pps │ ├── trim.pps │ ├── u_inconf.pps │ ├── u_recnum.pps │ ├── abs.pps │ ├── and.pps │ ├── asc.pps │ ├── chr.pps │ ├── date.pps │ ├── fget.pps │ ├── i2s.pps │ ├── inkey.pps │ ├── loggedon.pps │ ├── modem.pps │ ├── psa.pps │ ├── readline.pps │ ├── sprint_sprintln.pps │ ├── b2w.pps │ ├── broadcast.pps │ ├── callid.pps │ ├── callnum.pps │ ├── carrier.pps │ ├── cdon.pps │ ├── chat.pps │ ├── curconf.pps │ ├── cursec.pps │ ├── day.pps │ ├── dow.pps │ ├── false.pps │ ├── ferr.pps │ ├── kbdchkoff_kbdchkon.pps │ ├── kinkey.pps │ ├── langext.pps │ ├── left.pps │ ├── len.pps │ ├── lower.pps │ ├── maxnode.pps │ ├── minkey.pps │ ├── minleft.pps │ ├── minon.pps │ ├── mprint_mprintln.pps │ ├── pcbdat.pps │ ├── pcbnode.pps │ ├── slpath.pps │ ├── space.pps │ ├── u_cmnt.pps │ ├── u_msgrd_msgwr.pps │ ├── upper.pps │ ├── S2I.pps │ ├── curcolor.pps │ ├── dec.pps │ ├── exist.pps │ ├── fappend_orw_sdb.pps │ ├── fmtcc.pps │ ├── for_next.pps │ ├── fput_fputln.pps │ ├── getenv.pps │ ├── grafmode.pps │ ├── helppath.pps │ ├── mgetbyte.pps │ ├── mid.pps │ ├── onlocal.pps │ ├── pagestat.pps │ ├── ppename.pps │ ├── ppepath.pps │ ├── random.pps │ ├── showstat.pps │ ├── string_expr.pps │ ├── sysopsec.pps │ ├── temppath.pps │ ├── dbglevel_func.pps │ ├── defcolor_func.pps │ ├── fileinf.pps │ ├── gosub_return.pps │ ├── instr.pps │ ├── newpwd.pps │ ├── pop_push.pps │ ├── scrtext.pps │ ├── strip.pps │ ├── bell_lfafter_lfbefore.pps │ ├── opencap.pps │ ├── stripatx.pps │ ├── u_bdphone_hvphone.pps │ ├── un.pps │ ├── waitfor.pps │ ├── cctype.pps │ ├── dispfile_sec_graph_lang.pps │ ├── print_println.pps │ ├── replace.pps │ ├── shell.pps │ ├── gettoken.pps │ ├── getx_gety.pps │ ├── varaddr.pps │ ├── varoff.pps │ ├── varseg.pps │ ├── S2I.ppe │ ├── abs.ppe │ ├── and.ppe │ ├── asc.ppe │ ├── b2w.ppe │ ├── blt.ppe │ ├── bye.ppe │ ├── chr.ppe │ ├── cls.ppe │ ├── day.ppe │ ├── dec.ppe │ ├── dir.ppe │ ├── dow.ppe │ ├── end.ppe │ ├── f_exp_f_mw_f_reg_f_sel_f_sys.pps │ ├── fcl.ppe │ ├── fns.ppe │ ├── i2s.ppe │ ├── inc.ppe │ ├── len.ppe │ ├── log.ppe │ ├── mid.ppe │ ├── nc.ppe │ ├── promptstr.pps │ ├── psa.ppe │ ├── reg.ppe │ ├── tokenize.pps │ ├── un.ppe │ ├── ver.ppe │ ├── abort.ppe │ ├── auto.ppe │ ├── auto.pps │ ├── beep.ppe │ ├── call.ppe │ ├── cdon.ppe │ ├── chat.ppe │ ├── color.ppe │ ├── date.ppe │ ├── defs.ppe │ ├── delay.ppe │ ├── dtron.ppe │ ├── eraseline_inputstr.pps │ ├── exist.ppe │ ├── false.ppe │ ├── ferr.ppe │ ├── fget.ppe │ ├── fmtcc.ppe │ ├── fopen.ppe │ ├── goto.ppe │ ├── inkey.ppe │ ├── input.ppe │ ├── instr.ppe │ ├── join.ppe │ ├── left.ppe │ ├── lower.ppe │ ├── mask.ppe │ ├── message.pps │ ├── minon.ppe │ ├── modem.ppe │ ├── month_year.pps │ ├── more.ppe │ ├── nochar_yeschar.pps │ ├── peek.ppe │ ├── poke.ppe │ ├── quest.ppe │ ├── shell.ppe │ ├── sound.ppe │ ├── space.ppe │ ├── stop.ppe │ ├── strip.ppe │ ├── trim.ppe │ ├── u_cls.ppe │ ├── u_fse.ppe │ ├── u_pwd.ppe │ ├── u_sec.ppe │ ├── u_ver.ppe │ ├── unary_operators.pps │ ├── upper.ppe │ ├── valcc.ppe │ ├── wait.ppe │ ├── while.ppe │ ├── wrunet.pps │ ├── adjtime.ppe │ ├── ansipos.ppe │ ├── backup.ppe │ ├── callid.ppe │ ├── callnum.ppe │ ├── carrier.ppe │ ├── cctype.ppe │ ├── cdchkoff.ppe │ ├── cdchkon.ppe │ ├── closecap.ppe │ ├── clreol.ppe │ ├── confflag.ppe │ ├── curcolor.ppe │ ├── curconf.ppe │ ├── cursec.ppe │ ├── dbglevel.ppe │ ├── defcolor.ppe │ ├── defs.pps │ ├── delete.ppe │ ├── deluser.ppe │ ├── dispstr.ppe │ ├── dointr.ppe │ ├── dtroff.ppe │ ├── fclose.ppe │ ├── fcreate.ppe │ ├── fileinf.ppe │ ├── for_next.ppe │ ├── forward.ppe │ ├── fputpad.ppe │ ├── frewind.ppe │ ├── getenv.ppe │ ├── gettoken.ppe │ ├── getuser.ppe │ ├── goodbye.ppe │ ├── grafmode.ppe │ ├── hangup.ppe │ ├── helppath.ppe │ ├── if_then.ppe │ ├── kbdfile.ppe │ ├── kbdstuff.ppe │ ├── kinkey.ppe │ ├── langext.ppe │ ├── loggedon.ppe │ ├── maxnode.ppe │ ├── message.ppe │ ├── mgetbyte.ppe │ ├── minkey.ppe │ ├── minleft.ppe │ ├── newpwd.ppe │ ├── onlocal.ppe │ ├── opencap.ppe │ ├── optext.ppe │ ├── pageoff.ppe │ ├── pageon.ppe │ ├── pagestat.ppe │ ├── pcbdat.ppe │ ├── pcbnode.ppe │ ├── poke.pps │ ├── pop_push.ppe │ ├── ppename.ppe │ ├── ppepath.ppe │ ├── putuser.ppe │ ├── random.ppe │ ├── rdunet.ppe │ ├── rdusys.ppe │ ├── readline.ppe │ ├── rename.ppe │ ├── replace.ppe │ ├── restscrn.ppe │ ├── savescrn.ppe │ ├── scrtext.ppe │ ├── showstat.ppe │ ├── slpath.ppe │ ├── stripatx.ppe │ ├── sysopsec.ppe │ ├── temppath.ppe │ ├── timeap.ppe │ ├── tokcount.ppe │ ├── tokenize.ppe │ ├── tokenstr.ppe │ ├── u_addr.ppe │ ├── u_alias.ppe │ ├── u_cmnt.ppe │ ├── u_def79.ppe │ ├── u_expert.ppe │ ├── u_expsec.ppe │ ├── u_fsep.ppe │ ├── u_inconf.ppe │ ├── u_ldate.ppe │ ├── u_ldir.ppe │ ├── u_logons.ppe │ ├── u_ltime.ppe │ ├── u_name.ppe │ ├── u_notes.ppe │ ├── u_pwdexp.ppe │ ├── u_pwdlc.ppe │ ├── u_pwdtc.ppe │ ├── u_recnum.ppe │ ├── u_srcoll.ppe │ ├── u_stat.ppe │ ├── u_timeon.ppe │ ├── u_trans.ppe │ ├── valdate.ppe │ ├── valtime.ppe │ ├── varaddr.ppe │ ├── varoff.ppe │ ├── varseg.ppe │ ├── waitfor.ppe │ ├── wrunet.ppe │ ├── wrusys.ppe │ ├── 99bottles.ppe │ ├── broadcast.ppe │ ├── confunflag.ppe │ ├── freshline.ppe │ ├── getx_gety.ppe │ ├── hour_time_min_sec.pps │ ├── ltrim_rtrim.pps │ ├── month_year.ppe │ ├── not_or_xor.ppe │ ├── promptstr.ppe │ ├── resetdisp.ppe │ ├── sendmodem.ppe │ ├── u_expdate.ppe │ ├── u_longhdr.ppe │ ├── u_pagelen.ppe │ ├── u_pwdhist.ppe │ ├── dbglevel_func.ppe │ ├── defcolor_func.ppe │ ├── fieldlen_guide.pps │ ├── fput_fputln.ppe │ ├── gosub_return.ppe │ ├── if_then_else.ppe │ ├── ltrim_rtrim.ppe │ ├── newline_stmt.ppe │ ├── print_println.ppe │ ├── select_case.ppe │ ├── string_expr.ppe │ ├── u_msgrd_msgwr.ppe │ ├── fappend_orw_sdb.ppe │ ├── fieldlen_guide.ppe │ ├── highascii_make_ascii.pps │ ├── mprint_mprintln.ppe │ ├── nochar_yeschar.ppe │ ├── not_or_xor.pps │ ├── showoff_showon.ppe │ ├── sprint_sprintln.ppe │ ├── unary_operators.ppe │ ├── declare_Function.ppe │ ├── declare_procedure.ppe │ ├── echodots_promptstr_mask_pwd_upcase.pps │ ├── eraseline_inputstr.ppe │ ├── for_break_continue.ppe │ ├── hour_time_min_sec.ppe │ ├── if_else_loop_bug.ppe │ ├── kbdchkoff_kbdchkon.ppe │ ├── u_bdphone_hvphone.ppe │ ├── highascii_make_ascii.ppe │ ├── while_break_continue.ppe │ ├── bell_lfafter_lfbefore.ppe │ ├── dispfile_sec_graph_lang.ppe │ ├── while.pps │ ├── disptext_bell_lfafter_lfbefore_logit_logitleft_newline.pps │ ├── if_elseif_else_endif_end.ppe │ ├── peek.pps │ ├── u_bdl_bdlday_bul_fdl_ful.ppe │ ├── f_exp_f_mw_f_reg_f_sel_f_sys.ppe │ ├── if_then.pps │ ├── u_bdl_bdlday_bul_fdl_ful.pps │ ├── echodots_promptstr_mask_pwd_upcase.ppe │ ├── declare_procedure.pps │ ├── if_then.ppd │ ├── loggedon.ppd │ ├── fcreate.pps │ ├── disptext_bell_lfafter_lfbefore_logit_logitleft_newline.ppe │ ├── mask.pps │ ├── declare_Function.pps │ ├── for_break_continue.pps │ ├── select_case.pps │ ├── if_then_else.pps │ ├── 99bottles.pps │ ├── while_break_continue.pps │ ├── if_else_loop_bug.pps │ ├── if_elseif_else_endif_end.pps │ ├── reg.pps │ └── input.pps ├── Cargo.toml └── src │ └── tests.rs ├── icy_board_engine ├── src │ ├── icy_board │ │ ├── archivers.rs │ │ ├── group_list.rs │ │ ├── security.rs │ │ ├── bulletins.rs │ │ ├── surveys.rs │ │ ├── statistics.rs │ │ └── output.rs │ ├── lib.rs │ ├── test_data │ │ ├── test_dim_string_concat.pps │ │ ├── test_optext.pps │ │ ├── push_pop_test.pps │ │ ├── test_dim1.pps │ │ ├── bool_check.pps │ │ ├── for_to_string.pps │ │ ├── bool_function_value.ppe │ │ ├── use_funcs1.pps │ │ ├── test_functions.pps │ │ ├── bool_function_value2.pps │ │ ├── sort.pps │ │ ├── by_ref_parameter.pps │ │ ├── local_variables.pps │ │ ├── bool_function_value.pps │ │ ├── recurse.pps │ │ └── test_constants.pps │ ├── vm │ │ └── errors.rs │ └── tests.rs └── Cargo.toml ├── .gitignore ├── doc └── qwk │ ├── QMAIL.H │ ├── qwke.txt │ ├── MESSAGES.TXT │ ├── qwk11 │ ├── MESSAGES.TXT │ ├── REP.TXT │ ├── CONFIG.TXT │ ├── COMMAND.TXT │ ├── QWKINFO.TXT │ ├── DOORID.TXT │ ├── FILENAME.TXT │ ├── CONTROL.TXT │ └── NDX.TXT │ ├── REP.TXT │ ├── CONFIG.TXT │ ├── COMMAND.TXT │ ├── FILENAME.TXT │ ├── CONTROL.TXT │ └── NDX.TXT ├── file_id.diz ├── pplc └── Cargo.toml ├── pplx ├── Cargo.toml └── src │ └── main.rs ├── icy_ppe ├── Cargo.toml └── src │ ├── ast │ ├── constants.py │ ├── rename_visitor.rs │ ├── syntax_tree.rs │ ├── expression_depth_visitor.rs │ └── constants.dat │ ├── lib.rs │ ├── PPE_fileformat.txt │ ├── decompiler │ ├── test_evaluation_visitor.rs │ └── rename_visitor.rs │ ├── parser │ └── declaration_tests.rs │ └── executable │ ├── mod.rs │ └── expr_tests.rs ├── Cargo.toml └── .github └── workflows ├── run_tests.yml └── build.yml /ppl-lsp/src/utils.rs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ppld/test_data/beep.pps: -------------------------------------------------------------------------------- 1 | BEEP 2 | -------------------------------------------------------------------------------- /ppld/test_data/blt.pps: -------------------------------------------------------------------------------- 1 | BLT 1 2 | -------------------------------------------------------------------------------- /ppld/test_data/bye.pps: -------------------------------------------------------------------------------- 1 | BYE 2 | -------------------------------------------------------------------------------- /ppld/test_data/cls.pps: -------------------------------------------------------------------------------- 1 | CLS 2 | -------------------------------------------------------------------------------- /ppld/test_data/end.pps: -------------------------------------------------------------------------------- 1 | END 2 | -------------------------------------------------------------------------------- /ppld/test_data/more.pps: -------------------------------------------------------------------------------- 1 | MORE 2 | -------------------------------------------------------------------------------- /ppld/test_data/stop.pps: -------------------------------------------------------------------------------- 1 | STOP 2 | -------------------------------------------------------------------------------- /ppld/test_data/wait.pps: -------------------------------------------------------------------------------- 1 | WAIT 2 | -------------------------------------------------------------------------------- /ppld/test_data/clreol.pps: -------------------------------------------------------------------------------- 1 | CLREOL 2 | -------------------------------------------------------------------------------- /ppld/test_data/color.pps: -------------------------------------------------------------------------------- 1 | COLOR 66 2 | -------------------------------------------------------------------------------- /ppld/test_data/delay.pps: -------------------------------------------------------------------------------- 1 | DELAY 10 2 | -------------------------------------------------------------------------------- /ppld/test_data/dir.pps: -------------------------------------------------------------------------------- 1 | DIR "F" 2 | -------------------------------------------------------------------------------- /ppld/test_data/dtroff.pps: -------------------------------------------------------------------------------- 1 | DTROFF 2 | -------------------------------------------------------------------------------- /ppld/test_data/dtron.pps: -------------------------------------------------------------------------------- 1 | DTRON 2 | -------------------------------------------------------------------------------- /ppld/test_data/hangup.pps: -------------------------------------------------------------------------------- 1 | HANGUP 2 | -------------------------------------------------------------------------------- /ppld/test_data/join.pps: -------------------------------------------------------------------------------- 1 | JOIN 1 2 | -------------------------------------------------------------------------------- /ppld/test_data/newline_stmt.pps: -------------------------------------------------------------------------------- 1 | NEWLINE -------------------------------------------------------------------------------- /ppld/test_data/pageon.pps: -------------------------------------------------------------------------------- 1 | PAGEON 2 | -------------------------------------------------------------------------------- /ppld/test_data/quest.pps: -------------------------------------------------------------------------------- 1 | QUEST 1 2 | -------------------------------------------------------------------------------- /ppld/test_data/rdusys.pps: -------------------------------------------------------------------------------- 1 | RDUSYS 2 | -------------------------------------------------------------------------------- /ppld/test_data/wrusys.pps: -------------------------------------------------------------------------------- 1 | WRUSYS 2 | -------------------------------------------------------------------------------- /ppld/test_data/adjtime.pps: -------------------------------------------------------------------------------- 1 | ADJTIME 1 2 | -------------------------------------------------------------------------------- /ppld/test_data/ansipos.pps: -------------------------------------------------------------------------------- 1 | ANSIPOS 1,1 2 | -------------------------------------------------------------------------------- /ppld/test_data/backup.pps: -------------------------------------------------------------------------------- 1 | BACKUP 1 2 | -------------------------------------------------------------------------------- /ppld/test_data/call.pps: -------------------------------------------------------------------------------- 1 | CALL "../FOO" 2 | -------------------------------------------------------------------------------- /ppld/test_data/cdchkoff.pps: -------------------------------------------------------------------------------- 1 | CDCHKOFF 2 | -------------------------------------------------------------------------------- /ppld/test_data/cdchkon.pps: -------------------------------------------------------------------------------- 1 | CDCHKON 2 | -------------------------------------------------------------------------------- /ppld/test_data/closecap.pps: -------------------------------------------------------------------------------- 1 | CLOSECAP 2 | -------------------------------------------------------------------------------- /ppld/test_data/dbglevel.pps: -------------------------------------------------------------------------------- 1 | DBGLEVEL 1 2 | -------------------------------------------------------------------------------- /ppld/test_data/defcolor.pps: -------------------------------------------------------------------------------- 1 | DEFCOLOR 2 | -------------------------------------------------------------------------------- /ppld/test_data/delete.pps: -------------------------------------------------------------------------------- 1 | DELETE "me" 2 | -------------------------------------------------------------------------------- /ppld/test_data/deluser.pps: -------------------------------------------------------------------------------- 1 | DELUSER 2 | -------------------------------------------------------------------------------- /ppld/test_data/fcl.pps: -------------------------------------------------------------------------------- 1 | STARTDISP FCL 2 | -------------------------------------------------------------------------------- /ppld/test_data/fclose.pps: -------------------------------------------------------------------------------- 1 | FCLOSE 1 2 | -------------------------------------------------------------------------------- /ppld/test_data/fns.pps: -------------------------------------------------------------------------------- 1 | STARTDISP FNS 2 | -------------------------------------------------------------------------------- /ppld/test_data/forward.pps: -------------------------------------------------------------------------------- 1 | FORWARD 1 2 | -------------------------------------------------------------------------------- /ppld/test_data/freshline.pps: -------------------------------------------------------------------------------- 1 | FRESHLINE 2 | -------------------------------------------------------------------------------- /ppld/test_data/frewind.pps: -------------------------------------------------------------------------------- 1 | FREWIND 1 2 | -------------------------------------------------------------------------------- /ppld/test_data/getuser.pps: -------------------------------------------------------------------------------- 1 | GETUSER 2 | -------------------------------------------------------------------------------- /ppld/test_data/goodbye.pps: -------------------------------------------------------------------------------- 1 | GOODBYE 2 | -------------------------------------------------------------------------------- /ppld/test_data/log.pps: -------------------------------------------------------------------------------- 1 | LOG "FooBar", 0 2 | -------------------------------------------------------------------------------- /ppld/test_data/nc.pps: -------------------------------------------------------------------------------- 1 | STARTDISP NC 2 | -------------------------------------------------------------------------------- /ppld/test_data/pageoff.pps: -------------------------------------------------------------------------------- 1 | PAGEOFF 2 | -------------------------------------------------------------------------------- /ppld/test_data/putuser.pps: -------------------------------------------------------------------------------- 1 | PUTUSER 2 | -------------------------------------------------------------------------------- /ppld/test_data/rdunet.pps: -------------------------------------------------------------------------------- 1 | RDUNET 1 2 | -------------------------------------------------------------------------------- /ppld/test_data/resetdisp.pps: -------------------------------------------------------------------------------- 1 | RESETDISP 2 | -------------------------------------------------------------------------------- /ppld/test_data/restscrn.pps: -------------------------------------------------------------------------------- 1 | RESTSCRN 2 | -------------------------------------------------------------------------------- /ppld/test_data/savescrn.pps: -------------------------------------------------------------------------------- 1 | SAVESCRN 2 | -------------------------------------------------------------------------------- /ppld/test_data/sound.pps: -------------------------------------------------------------------------------- 1 | SOUND 440 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_cls.pps: -------------------------------------------------------------------------------- 1 | U_CLS = TRUE 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_fse.pps: -------------------------------------------------------------------------------- 1 | U_FSE = TRUE 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_pwd.pps: -------------------------------------------------------------------------------- 1 | PRINT U_PWD 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_sec.pps: -------------------------------------------------------------------------------- 1 | U_SEC = 20 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_ver.pps: -------------------------------------------------------------------------------- 1 | PRINT U_VER 2 | -------------------------------------------------------------------------------- /ppld/test_data/ver.pps: -------------------------------------------------------------------------------- 1 | PRINT VER() 2 | -------------------------------------------------------------------------------- /icy_board_engine/src/icy_board/archivers.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ppld/test_data/abort.pps: -------------------------------------------------------------------------------- 1 | IF (ABORT ()) END 2 | -------------------------------------------------------------------------------- /ppld/test_data/dispstr.pps: -------------------------------------------------------------------------------- 1 | DISPSTR "ShowMe" 2 | -------------------------------------------------------------------------------- /ppld/test_data/kbdfile.pps: -------------------------------------------------------------------------------- 1 | KBDFILE "TEST" 2 | -------------------------------------------------------------------------------- /ppld/test_data/kbdstuff.pps: -------------------------------------------------------------------------------- 1 | KBDSTUFF "TEST" 2 | -------------------------------------------------------------------------------- /ppld/test_data/optext.pps: -------------------------------------------------------------------------------- 1 | OPTEXT "test" 2 | -------------------------------------------------------------------------------- /ppld/test_data/rename.pps: -------------------------------------------------------------------------------- 1 | RENAME "a", "b" 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_addr.pps: -------------------------------------------------------------------------------- 1 | PRINTLN U_ADDR(0) 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_alias.pps: -------------------------------------------------------------------------------- 1 | PRINTLN U_ALIAS 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_def79.pps: -------------------------------------------------------------------------------- 1 | U_DEF79 = TRUE 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_fsep.pps: -------------------------------------------------------------------------------- 1 | U_FSEP = TRUE 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_ldir.pps: -------------------------------------------------------------------------------- 1 | PRINTLN U_LDIR() 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_ltime.pps: -------------------------------------------------------------------------------- 1 | PRINT U_LTIME() 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_name.pps: -------------------------------------------------------------------------------- 1 | PRINT U_NAME() 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_notes.pps: -------------------------------------------------------------------------------- 1 | PRINT U_NOTES(0) 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_pwdexp.pps: -------------------------------------------------------------------------------- 1 | PRINT U_PWDEXP 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_pwdlc.pps: -------------------------------------------------------------------------------- 1 | PRINT U_PWDLC() 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_pwdtc.pps: -------------------------------------------------------------------------------- 1 | PRINT U_PWDTC() 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_stat.pps: -------------------------------------------------------------------------------- 1 | PRINT U_STAT(2) 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_trans.pps: -------------------------------------------------------------------------------- 1 | PRINT U_TRANS 2 | -------------------------------------------------------------------------------- /ppld/test_data/valcc.pps: -------------------------------------------------------------------------------- 1 | PRINT VALCC("foo") 2 | -------------------------------------------------------------------------------- /ppld/test_data/confflag.pps: -------------------------------------------------------------------------------- 1 | CONFFLAG 1, F_EXP 2 | -------------------------------------------------------------------------------- /ppld/test_data/fopen.pps: -------------------------------------------------------------------------------- 1 | FOPEN 0,"LOG",O_RD,S_DW 2 | -------------------------------------------------------------------------------- /ppld/test_data/fputpad.pps: -------------------------------------------------------------------------------- 1 | FPUTPAD 1, "FILE", 40 2 | -------------------------------------------------------------------------------- /ppld/test_data/sendmodem.pps: -------------------------------------------------------------------------------- 1 | SENDMODEM "ATDT007" 2 | -------------------------------------------------------------------------------- /ppld/test_data/timeap.pps: -------------------------------------------------------------------------------- 1 | PRINT TIMEAP(TIME()) 2 | -------------------------------------------------------------------------------- /ppld/test_data/tokcount.pps: -------------------------------------------------------------------------------- 1 | PRINT TOKCOUNT() 2 | -------------------------------------------------------------------------------- /ppld/test_data/tokenstr.pps: -------------------------------------------------------------------------------- 1 | PRINTLN TOKENSTR() 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_expdate.pps: -------------------------------------------------------------------------------- 1 | PRINTLN U_EXPDATE 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_expert.pps: -------------------------------------------------------------------------------- 1 | U_EXPERT = FALSE 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_expsec.pps: -------------------------------------------------------------------------------- 1 | PRINTLN U_EXPSEC 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_ldate.pps: -------------------------------------------------------------------------------- 1 | PRINTLN U_LDATE() 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_logons.pps: -------------------------------------------------------------------------------- 1 | PRINTLN U_LOGONS() 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_longhdr.pps: -------------------------------------------------------------------------------- 1 | U_LONGHDR = TRUE 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_pagelen.pps: -------------------------------------------------------------------------------- 1 | PRINT U_PAGELEN 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_pwdhist.pps: -------------------------------------------------------------------------------- 1 | PRINT U_PWDHIST(0) 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_srcoll.pps: -------------------------------------------------------------------------------- 1 | U_SCROLL = FALSE 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_timeon.pps: -------------------------------------------------------------------------------- 1 | PRINT U_TIMEON() 2 | -------------------------------------------------------------------------------- /ppld/test_data/valdate.pps: -------------------------------------------------------------------------------- 1 | PRINT VALDATE("foo") 2 | -------------------------------------------------------------------------------- /ppld/test_data/valtime.pps: -------------------------------------------------------------------------------- 1 | PRINT VALTIME("foo") 2 | -------------------------------------------------------------------------------- /ppld/test_data/confunflag.pps: -------------------------------------------------------------------------------- 1 | CONFUNFLAG 1, F_EXP 2 | -------------------------------------------------------------------------------- /ppld/test_data/dointr.pps: -------------------------------------------------------------------------------- 1 | DOINTR 1,2,3,4,5,6,7,8,9,0 2 | -------------------------------------------------------------------------------- /ppld/test_data/goto.pps: -------------------------------------------------------------------------------- 1 | GOTO LABEL001 2 | :LABEL001 3 | -------------------------------------------------------------------------------- /ppld/test_data/inc.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INC INT001 3 | -------------------------------------------------------------------------------- /ppld/test_data/showoff_showon.pps: -------------------------------------------------------------------------------- 1 | SHOWOFF 2 | SHOWON 3 | -------------------------------------------------------------------------------- /ppld/test_data/trim.pps: -------------------------------------------------------------------------------- 1 | PRINTLN TRIM(" evevle ", " ") 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_inconf.pps: -------------------------------------------------------------------------------- 1 | PRINTLN U_INCONF(1, 2) 2 | -------------------------------------------------------------------------------- /ppld/test_data/u_recnum.pps: -------------------------------------------------------------------------------- 1 | PRINT U_RECNUM("Doe") 2 | -------------------------------------------------------------------------------- /ppld/test_data/abs.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=ABS(-5) 3 | -------------------------------------------------------------------------------- /ppld/test_data/and.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=AND(1,5) 3 | -------------------------------------------------------------------------------- /ppld/test_data/asc.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=ASC("A") 3 | -------------------------------------------------------------------------------- /ppld/test_data/chr.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=CHR(123) 3 | -------------------------------------------------------------------------------- /ppld/test_data/date.pps: -------------------------------------------------------------------------------- 1 | DATE DATE001 2 | DATE001=DATE() 3 | -------------------------------------------------------------------------------- /ppld/test_data/fget.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | FGET 1, STR001 3 | -------------------------------------------------------------------------------- /ppld/test_data/i2s.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=I2S(1, 2) 3 | -------------------------------------------------------------------------------- /ppld/test_data/inkey.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=INKEY() 3 | -------------------------------------------------------------------------------- /ppld/test_data/loggedon.pps: -------------------------------------------------------------------------------- 1 | IF (LOGGEDON()) PRINT "Hello" 2 | -------------------------------------------------------------------------------- /ppld/test_data/modem.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=MODEM() 3 | -------------------------------------------------------------------------------- /ppld/test_data/psa.pps: -------------------------------------------------------------------------------- 1 | BOOLEAN BOOL001 2 | BOOL001=PSA(1) 3 | -------------------------------------------------------------------------------- /ppld/test_data/readline.pps: -------------------------------------------------------------------------------- 1 | PRINT READLINE("FOOOE", 10) 2 | -------------------------------------------------------------------------------- /ppld/test_data/sprint_sprintln.pps: -------------------------------------------------------------------------------- 1 | SPRINT 1 2 | SPRINTLN 3 | -------------------------------------------------------------------------------- /ppl-lsp/rust-toolchains.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "1.72.1" 3 | -------------------------------------------------------------------------------- /ppld/test_data/b2w.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=B2W(1, 2) 3 | -------------------------------------------------------------------------------- /ppld/test_data/broadcast.pps: -------------------------------------------------------------------------------- 1 | BROADCAST 1,65535,"Hello world!" 2 | -------------------------------------------------------------------------------- /ppld/test_data/callid.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=CALLID() 3 | -------------------------------------------------------------------------------- /ppld/test_data/callnum.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=CALLNUM() 3 | -------------------------------------------------------------------------------- /ppld/test_data/carrier.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=CARRIER() 3 | -------------------------------------------------------------------------------- /ppld/test_data/cdon.pps: -------------------------------------------------------------------------------- 1 | BOOLEAN BOOL001 2 | BOOL001=CDON() 3 | -------------------------------------------------------------------------------- /ppld/test_data/chat.pps: -------------------------------------------------------------------------------- 1 | BOOLEAN BOOL001 2 | BOOL001=CDON() 3 | -------------------------------------------------------------------------------- /ppld/test_data/curconf.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=CURCONF() 3 | -------------------------------------------------------------------------------- /ppld/test_data/cursec.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=CURSEC() 3 | -------------------------------------------------------------------------------- /ppld/test_data/day.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=DAY(DATE()) 3 | -------------------------------------------------------------------------------- /ppld/test_data/dow.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=DOW(DATE()) 3 | -------------------------------------------------------------------------------- /ppld/test_data/false.pps: -------------------------------------------------------------------------------- 1 | BOOLEAN BOOL001 2 | BOOL001=FALSE 3 | -------------------------------------------------------------------------------- /ppld/test_data/ferr.pps: -------------------------------------------------------------------------------- 1 | BOOLEAN BOOL001 2 | BOOL001=FERR(1) 3 | -------------------------------------------------------------------------------- /ppld/test_data/kbdchkoff_kbdchkon.pps: -------------------------------------------------------------------------------- 1 | KBDCHKOFF 2 | KBDCHKON 3 | -------------------------------------------------------------------------------- /ppld/test_data/kinkey.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=KINKEY() 3 | -------------------------------------------------------------------------------- /ppld/test_data/langext.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=LANGEXT() 3 | -------------------------------------------------------------------------------- /ppld/test_data/left.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=LEFT("abc",1) 3 | -------------------------------------------------------------------------------- /ppld/test_data/len.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=LEN("abc") 3 | -------------------------------------------------------------------------------- /ppld/test_data/lower.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=LOWER("ABC") 3 | -------------------------------------------------------------------------------- /ppld/test_data/maxnode.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=MAXNODE() 3 | -------------------------------------------------------------------------------- /ppld/test_data/minkey.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=MINKEY() 3 | -------------------------------------------------------------------------------- /ppld/test_data/minleft.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=MINLEFT() 3 | -------------------------------------------------------------------------------- /ppld/test_data/minon.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=MINON() 3 | -------------------------------------------------------------------------------- /ppld/test_data/mprint_mprintln.pps: -------------------------------------------------------------------------------- 1 | MPRINT "FOO" 2 | MPRINTLN 3 | -------------------------------------------------------------------------------- /ppld/test_data/pcbdat.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=PCBDAT() 3 | -------------------------------------------------------------------------------- /ppld/test_data/pcbnode.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=PCBNODE() 3 | -------------------------------------------------------------------------------- /ppld/test_data/slpath.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=SLPATH() 3 | -------------------------------------------------------------------------------- /ppld/test_data/space.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=SPACE(5) 3 | -------------------------------------------------------------------------------- /ppld/test_data/u_cmnt.pps: -------------------------------------------------------------------------------- 1 | PRINTLN U_CMNT1 2 | PRINTLN U_CMNT2 3 | -------------------------------------------------------------------------------- /ppld/test_data/u_msgrd_msgwr.pps: -------------------------------------------------------------------------------- 1 | PRINT U_MSGRD() + U_MSGWR() 2 | -------------------------------------------------------------------------------- /ppld/test_data/upper.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=UPPER("ABC") 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | test-results/ 2 | target/ 3 | .vscode/ 4 | Cargo.lock 5 | -------------------------------------------------------------------------------- /ppld/test_data/S2I.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=S2I("12323", 10) 3 | -------------------------------------------------------------------------------- /ppld/test_data/curcolor.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=CURCOLOR() 3 | -------------------------------------------------------------------------------- /ppld/test_data/dec.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=1 3 | DEC INT001 4 | -------------------------------------------------------------------------------- /ppld/test_data/exist.pps: -------------------------------------------------------------------------------- 1 | BOOLEAN BOOL001 2 | BOOL001=EXIST("file") 3 | -------------------------------------------------------------------------------- /ppld/test_data/fappend_orw_sdb.pps: -------------------------------------------------------------------------------- 1 | FAPPEND 1,"PPE.LOG",O_RW,S_DB 2 | -------------------------------------------------------------------------------- /ppld/test_data/fmtcc.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=FMTCC("1232") 3 | -------------------------------------------------------------------------------- /ppld/test_data/for_next.pps: -------------------------------------------------------------------------------- 1 | INTEGER i 2 | FOR i = 1 TO 10 3 | NEXT 4 | -------------------------------------------------------------------------------- /ppld/test_data/fput_fputln.pps: -------------------------------------------------------------------------------- 1 | FPUT 1, "A" 2 | FPUTLN 1, "A", "B" 3 | -------------------------------------------------------------------------------- /ppld/test_data/getenv.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=GETENV("PATH") 3 | -------------------------------------------------------------------------------- /ppld/test_data/grafmode.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=GRAFMODE() 3 | -------------------------------------------------------------------------------- /ppld/test_data/helppath.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=HELPPATH() 3 | -------------------------------------------------------------------------------- /ppld/test_data/mgetbyte.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=MGETBYTE() 3 | -------------------------------------------------------------------------------- /ppld/test_data/mid.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=MID("evlevl", 2, 2) 3 | -------------------------------------------------------------------------------- /ppld/test_data/onlocal.pps: -------------------------------------------------------------------------------- 1 | BOOLEAN BOOL001 2 | BOOL001 = ONLOCAL() 3 | -------------------------------------------------------------------------------- /ppld/test_data/pagestat.pps: -------------------------------------------------------------------------------- 1 | BOOLEAN BOOL001 2 | BOOL001=PAGESTAT() 3 | -------------------------------------------------------------------------------- /ppld/test_data/ppename.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001 = PPENAME() 3 | -------------------------------------------------------------------------------- /ppld/test_data/ppepath.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001 = PPEPATH() 3 | -------------------------------------------------------------------------------- /ppld/test_data/random.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=RANDOM(100) 3 | -------------------------------------------------------------------------------- /ppld/test_data/showstat.pps: -------------------------------------------------------------------------------- 1 | BOOLEAN BOOL001 2 | BOOL001=SHOWSTAT() 3 | -------------------------------------------------------------------------------- /ppld/test_data/string_expr.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=STRING(5) 3 | -------------------------------------------------------------------------------- /ppld/test_data/sysopsec.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=SYSOPSEC() 3 | -------------------------------------------------------------------------------- /ppld/test_data/temppath.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=TEMPPATH() 3 | -------------------------------------------------------------------------------- /ppld/test_data/dbglevel_func.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=DBGLEVEL() 3 | -------------------------------------------------------------------------------- /ppld/test_data/defcolor_func.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=DEFCOLOR() 3 | -------------------------------------------------------------------------------- /ppld/test_data/fileinf.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=FILEINF("FOO", 7) 3 | -------------------------------------------------------------------------------- /ppld/test_data/gosub_return.pps: -------------------------------------------------------------------------------- 1 | GOSUB LABEL001 2 | :LABEL001 3 | RETURN 4 | -------------------------------------------------------------------------------- /ppld/test_data/instr.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=INSTR("abc", "b") 3 | -------------------------------------------------------------------------------- /ppld/test_data/newpwd.pps: -------------------------------------------------------------------------------- 1 | BOOLEAN BOOL001 2 | NEWPWD "evevle", BOOL001 3 | -------------------------------------------------------------------------------- /ppld/test_data/pop_push.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | PUSH "Foo" 3 | POP STR001 4 | -------------------------------------------------------------------------------- /ppld/test_data/scrtext.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=SCRTEXT(1, 2, 5, 1) 3 | -------------------------------------------------------------------------------- /ppld/test_data/strip.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=STRIP("evlevl", "e") 3 | -------------------------------------------------------------------------------- /ppld/test_data/bell_lfafter_lfbefore.pps: -------------------------------------------------------------------------------- 1 | DISPTEXT 11, BELL+LFAFTER+LFBEFORE 2 | -------------------------------------------------------------------------------- /ppld/test_data/opencap.pps: -------------------------------------------------------------------------------- 1 | BOOLEAN BOOL001 2 | OPENCAP "fevlevlelv", BOOL001 3 | -------------------------------------------------------------------------------- /ppld/test_data/stripatx.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=STRIPATX("evlevlelv") 3 | -------------------------------------------------------------------------------- /ppld/test_data/u_bdphone_hvphone.pps: -------------------------------------------------------------------------------- 1 | PRINTLN U_BDPHONE 2 | PRINTLN U_HVPHONE 3 | -------------------------------------------------------------------------------- /ppld/test_data/un.pps: -------------------------------------------------------------------------------- 1 | PRINTLN UN_STAT() + UN_NAME() + UN_CITY() + UN_OPER() 2 | -------------------------------------------------------------------------------- /ppld/test_data/waitfor.pps: -------------------------------------------------------------------------------- 1 | BOOLEAN BOOL001 2 | WAITFOR "CONNECT", BOOL001, 15 3 | -------------------------------------------------------------------------------- /doc/qwk/QMAIL.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/doc/qwk/QMAIL.H -------------------------------------------------------------------------------- /doc/qwk/qwke.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/doc/qwk/qwke.txt -------------------------------------------------------------------------------- /ppld/test_data/cctype.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=CCTYPE("Credit card number") 3 | -------------------------------------------------------------------------------- /ppld/test_data/dispfile_sec_graph_lang.pps: -------------------------------------------------------------------------------- 1 | DISPFILE "MENU",GRAPH+SEC+LANG 2 | 3 | -------------------------------------------------------------------------------- /ppld/test_data/print_println.pps: -------------------------------------------------------------------------------- 1 | PRINT "Hello" 2 | PRINTLN "World!" 3 | PRINTLN 4 | -------------------------------------------------------------------------------- /ppld/test_data/replace.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=REPLACE("foo", "o", "bar") 3 | -------------------------------------------------------------------------------- /ppld/test_data/shell.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | SHELL 1, INT001, "file.exe", "args" 3 | -------------------------------------------------------------------------------- /ppl-lsp/i18n.toml: -------------------------------------------------------------------------------- 1 | 2 | fallback_language = "en" 3 | 4 | [fluent] 5 | assets_dir = "i18n" 6 | -------------------------------------------------------------------------------- /ppld/test_data/gettoken.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | GETTOKEN STR001 3 | STR001=GETTOKEN() 4 | -------------------------------------------------------------------------------- /ppld/test_data/getx_gety.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001 = GETX() 3 | INT001 = GETY() 4 | -------------------------------------------------------------------------------- /ppld/test_data/varaddr.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | STRING STR001 3 | VARADDR INT001, STR001 4 | -------------------------------------------------------------------------------- /ppld/test_data/varoff.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | STRING STR001 3 | VAROFF STR001, INT001 4 | -------------------------------------------------------------------------------- /ppld/test_data/varseg.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | STRING STR001 3 | VARSEG STR001, INT001 4 | -------------------------------------------------------------------------------- /doc/qwk/MESSAGES.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/doc/qwk/MESSAGES.TXT -------------------------------------------------------------------------------- /ppld/test_data/S2I.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/S2I.ppe -------------------------------------------------------------------------------- /ppld/test_data/abs.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/abs.ppe -------------------------------------------------------------------------------- /ppld/test_data/and.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/and.ppe -------------------------------------------------------------------------------- /ppld/test_data/asc.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/asc.ppe -------------------------------------------------------------------------------- /ppld/test_data/b2w.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/b2w.ppe -------------------------------------------------------------------------------- /ppld/test_data/blt.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/blt.ppe -------------------------------------------------------------------------------- /ppld/test_data/bye.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/bye.ppe -------------------------------------------------------------------------------- /ppld/test_data/chr.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/chr.ppe -------------------------------------------------------------------------------- /ppld/test_data/cls.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/cls.ppe -------------------------------------------------------------------------------- /ppld/test_data/day.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/day.ppe -------------------------------------------------------------------------------- /ppld/test_data/dec.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/dec.ppe -------------------------------------------------------------------------------- /ppld/test_data/dir.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/dir.ppe -------------------------------------------------------------------------------- /ppld/test_data/dow.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/dow.ppe -------------------------------------------------------------------------------- /ppld/test_data/end.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/end.ppe -------------------------------------------------------------------------------- /ppld/test_data/f_exp_f_mw_f_reg_f_sel_f_sys.pps: -------------------------------------------------------------------------------- 1 | CONFFLAG 9, F_EXP + F_MW + F_REG + F_SEL + F_SYS -------------------------------------------------------------------------------- /ppld/test_data/fcl.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/fcl.ppe -------------------------------------------------------------------------------- /ppld/test_data/fns.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/fns.ppe -------------------------------------------------------------------------------- /ppld/test_data/i2s.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/i2s.ppe -------------------------------------------------------------------------------- /ppld/test_data/inc.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/inc.ppe -------------------------------------------------------------------------------- /ppld/test_data/len.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/len.ppe -------------------------------------------------------------------------------- /ppld/test_data/log.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/log.ppe -------------------------------------------------------------------------------- /ppld/test_data/mid.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/mid.ppe -------------------------------------------------------------------------------- /ppld/test_data/nc.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/nc.ppe -------------------------------------------------------------------------------- /ppld/test_data/promptstr.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | PROMPTSTR 1, STR001, 4, "validchars", NEWLINE 3 | -------------------------------------------------------------------------------- /ppld/test_data/psa.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/psa.ppe -------------------------------------------------------------------------------- /ppld/test_data/reg.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/reg.ppe -------------------------------------------------------------------------------- /ppld/test_data/tokenize.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001 = "Hello World" 3 | TOKENIZE STR001 4 | -------------------------------------------------------------------------------- /ppld/test_data/un.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/un.ppe -------------------------------------------------------------------------------- /ppld/test_data/ver.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/ver.ppe -------------------------------------------------------------------------------- /ppl-lsp/.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [alias] 2 | lint = "clippy --workspace --all-targets -- --deny warnings" 3 | -------------------------------------------------------------------------------- /ppld/test_data/abort.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/abort.ppe -------------------------------------------------------------------------------- /ppld/test_data/auto.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/auto.ppe -------------------------------------------------------------------------------- /ppld/test_data/auto.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | INPUTSTR "Run program now",STR001,14,1,"",AUTO+YESNO 3 | -------------------------------------------------------------------------------- /ppld/test_data/beep.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/beep.ppe -------------------------------------------------------------------------------- /ppld/test_data/call.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/call.ppe -------------------------------------------------------------------------------- /ppld/test_data/cdon.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/cdon.ppe -------------------------------------------------------------------------------- /ppld/test_data/chat.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/chat.ppe -------------------------------------------------------------------------------- /ppld/test_data/color.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/color.ppe -------------------------------------------------------------------------------- /ppld/test_data/date.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/date.ppe -------------------------------------------------------------------------------- /ppld/test_data/defs.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/defs.ppe -------------------------------------------------------------------------------- /ppld/test_data/delay.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/delay.ppe -------------------------------------------------------------------------------- /ppld/test_data/dtron.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/dtron.ppe -------------------------------------------------------------------------------- /ppld/test_data/eraseline_inputstr.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | INPUTSTR "xxx",STR001,14,0,"",ERASELINE 3 | -------------------------------------------------------------------------------- /ppld/test_data/exist.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/exist.ppe -------------------------------------------------------------------------------- /ppld/test_data/false.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/false.ppe -------------------------------------------------------------------------------- /ppld/test_data/ferr.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/ferr.ppe -------------------------------------------------------------------------------- /ppld/test_data/fget.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/fget.ppe -------------------------------------------------------------------------------- /ppld/test_data/fmtcc.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/fmtcc.ppe -------------------------------------------------------------------------------- /ppld/test_data/fopen.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/fopen.ppe -------------------------------------------------------------------------------- /ppld/test_data/goto.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/goto.ppe -------------------------------------------------------------------------------- /ppld/test_data/inkey.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/inkey.ppe -------------------------------------------------------------------------------- /ppld/test_data/input.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/input.ppe -------------------------------------------------------------------------------- /ppld/test_data/instr.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/instr.ppe -------------------------------------------------------------------------------- /ppld/test_data/join.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/join.ppe -------------------------------------------------------------------------------- /ppld/test_data/left.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/left.ppe -------------------------------------------------------------------------------- /ppld/test_data/lower.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/lower.ppe -------------------------------------------------------------------------------- /ppld/test_data/mask.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/mask.ppe -------------------------------------------------------------------------------- /ppld/test_data/message.pps: -------------------------------------------------------------------------------- 1 | MESSAGE 1, "to", "from", "subject", "N", 0, 1, 1, "MESSAGE_TEXT_FILE" 2 | -------------------------------------------------------------------------------- /ppld/test_data/minon.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/minon.ppe -------------------------------------------------------------------------------- /ppld/test_data/modem.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/modem.ppe -------------------------------------------------------------------------------- /ppld/test_data/month_year.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=MONTH(DATE()) 3 | INT001=YEAR(DATE()) 4 | -------------------------------------------------------------------------------- /ppld/test_data/more.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/more.ppe -------------------------------------------------------------------------------- /ppld/test_data/nochar_yeschar.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001 = NOCHAR() 3 | STR001 = YESCHAR() 4 | -------------------------------------------------------------------------------- /ppld/test_data/peek.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/peek.ppe -------------------------------------------------------------------------------- /ppld/test_data/poke.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/poke.ppe -------------------------------------------------------------------------------- /ppld/test_data/quest.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/quest.ppe -------------------------------------------------------------------------------- /ppld/test_data/shell.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/shell.ppe -------------------------------------------------------------------------------- /ppld/test_data/sound.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/sound.ppe -------------------------------------------------------------------------------- /ppld/test_data/space.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/space.ppe -------------------------------------------------------------------------------- /ppld/test_data/stop.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/stop.ppe -------------------------------------------------------------------------------- /ppld/test_data/strip.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/strip.ppe -------------------------------------------------------------------------------- /ppld/test_data/trim.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/trim.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_cls.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_cls.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_fse.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_fse.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_pwd.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_pwd.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_sec.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_sec.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_ver.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_ver.ppe -------------------------------------------------------------------------------- /ppld/test_data/unary_operators.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001 = 5 3 | PRINTLN +INT001, -INT001, !INT001 -------------------------------------------------------------------------------- /ppld/test_data/upper.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/upper.ppe -------------------------------------------------------------------------------- /ppld/test_data/valcc.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/valcc.ppe -------------------------------------------------------------------------------- /ppld/test_data/wait.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/wait.ppe -------------------------------------------------------------------------------- /ppld/test_data/while.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/while.ppe -------------------------------------------------------------------------------- /ppld/test_data/wrunet.pps: -------------------------------------------------------------------------------- 1 | WRUNET 12, "status", "name", "city", "operation text", "broadcast text" 2 | -------------------------------------------------------------------------------- /doc/qwk/qwk11/MESSAGES.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/doc/qwk/qwk11/MESSAGES.TXT -------------------------------------------------------------------------------- /icy_board_engine/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod icy_board; 2 | pub mod vm; 3 | 4 | #[cfg(test)] 5 | pub mod tests; 6 | -------------------------------------------------------------------------------- /ppld/test_data/adjtime.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/adjtime.ppe -------------------------------------------------------------------------------- /ppld/test_data/ansipos.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/ansipos.ppe -------------------------------------------------------------------------------- /ppld/test_data/backup.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/backup.ppe -------------------------------------------------------------------------------- /ppld/test_data/callid.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/callid.ppe -------------------------------------------------------------------------------- /ppld/test_data/callnum.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/callnum.ppe -------------------------------------------------------------------------------- /ppld/test_data/carrier.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/carrier.ppe -------------------------------------------------------------------------------- /ppld/test_data/cctype.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/cctype.ppe -------------------------------------------------------------------------------- /ppld/test_data/cdchkoff.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/cdchkoff.ppe -------------------------------------------------------------------------------- /ppld/test_data/cdchkon.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/cdchkon.ppe -------------------------------------------------------------------------------- /ppld/test_data/closecap.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/closecap.ppe -------------------------------------------------------------------------------- /ppld/test_data/clreol.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/clreol.ppe -------------------------------------------------------------------------------- /ppld/test_data/confflag.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/confflag.ppe -------------------------------------------------------------------------------- /ppld/test_data/curcolor.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/curcolor.ppe -------------------------------------------------------------------------------- /ppld/test_data/curconf.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/curconf.ppe -------------------------------------------------------------------------------- /ppld/test_data/cursec.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/cursec.ppe -------------------------------------------------------------------------------- /ppld/test_data/dbglevel.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/dbglevel.ppe -------------------------------------------------------------------------------- /ppld/test_data/defcolor.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/defcolor.ppe -------------------------------------------------------------------------------- /ppld/test_data/defs.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | INPUTSTR "Run program now", STR001, 123, 1, "YyNn", DEFS 3 | -------------------------------------------------------------------------------- /ppld/test_data/delete.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/delete.ppe -------------------------------------------------------------------------------- /ppld/test_data/deluser.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/deluser.ppe -------------------------------------------------------------------------------- /ppld/test_data/dispstr.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/dispstr.ppe -------------------------------------------------------------------------------- /ppld/test_data/dointr.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/dointr.ppe -------------------------------------------------------------------------------- /ppld/test_data/dtroff.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/dtroff.ppe -------------------------------------------------------------------------------- /ppld/test_data/fclose.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/fclose.ppe -------------------------------------------------------------------------------- /ppld/test_data/fcreate.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/fcreate.ppe -------------------------------------------------------------------------------- /ppld/test_data/fileinf.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/fileinf.ppe -------------------------------------------------------------------------------- /ppld/test_data/for_next.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/for_next.ppe -------------------------------------------------------------------------------- /ppld/test_data/forward.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/forward.ppe -------------------------------------------------------------------------------- /ppld/test_data/fputpad.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/fputpad.ppe -------------------------------------------------------------------------------- /ppld/test_data/frewind.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/frewind.ppe -------------------------------------------------------------------------------- /ppld/test_data/getenv.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/getenv.ppe -------------------------------------------------------------------------------- /ppld/test_data/gettoken.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/gettoken.ppe -------------------------------------------------------------------------------- /ppld/test_data/getuser.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/getuser.ppe -------------------------------------------------------------------------------- /ppld/test_data/goodbye.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/goodbye.ppe -------------------------------------------------------------------------------- /ppld/test_data/grafmode.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/grafmode.ppe -------------------------------------------------------------------------------- /ppld/test_data/hangup.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/hangup.ppe -------------------------------------------------------------------------------- /ppld/test_data/helppath.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/helppath.ppe -------------------------------------------------------------------------------- /ppld/test_data/if_then.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/if_then.ppe -------------------------------------------------------------------------------- /ppld/test_data/kbdfile.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/kbdfile.ppe -------------------------------------------------------------------------------- /ppld/test_data/kbdstuff.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/kbdstuff.ppe -------------------------------------------------------------------------------- /ppld/test_data/kinkey.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/kinkey.ppe -------------------------------------------------------------------------------- /ppld/test_data/langext.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/langext.ppe -------------------------------------------------------------------------------- /ppld/test_data/loggedon.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/loggedon.ppe -------------------------------------------------------------------------------- /ppld/test_data/maxnode.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/maxnode.ppe -------------------------------------------------------------------------------- /ppld/test_data/message.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/message.ppe -------------------------------------------------------------------------------- /ppld/test_data/mgetbyte.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/mgetbyte.ppe -------------------------------------------------------------------------------- /ppld/test_data/minkey.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/minkey.ppe -------------------------------------------------------------------------------- /ppld/test_data/minleft.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/minleft.ppe -------------------------------------------------------------------------------- /ppld/test_data/newpwd.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/newpwd.ppe -------------------------------------------------------------------------------- /ppld/test_data/onlocal.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/onlocal.ppe -------------------------------------------------------------------------------- /ppld/test_data/opencap.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/opencap.ppe -------------------------------------------------------------------------------- /ppld/test_data/optext.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/optext.ppe -------------------------------------------------------------------------------- /ppld/test_data/pageoff.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/pageoff.ppe -------------------------------------------------------------------------------- /ppld/test_data/pageon.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/pageon.ppe -------------------------------------------------------------------------------- /ppld/test_data/pagestat.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/pagestat.ppe -------------------------------------------------------------------------------- /ppld/test_data/pcbdat.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/pcbdat.ppe -------------------------------------------------------------------------------- /ppld/test_data/pcbnode.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/pcbnode.ppe -------------------------------------------------------------------------------- /ppld/test_data/poke.pps: -------------------------------------------------------------------------------- 1 | POKEB MKADDR(1, 2), 1 2 | POKEDW MKADDR(1, 2), 1 3 | POKEW MKADDR(1, 2), 1 4 | -------------------------------------------------------------------------------- /ppld/test_data/pop_push.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/pop_push.ppe -------------------------------------------------------------------------------- /ppld/test_data/ppename.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/ppename.ppe -------------------------------------------------------------------------------- /ppld/test_data/ppepath.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/ppepath.ppe -------------------------------------------------------------------------------- /ppld/test_data/putuser.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/putuser.ppe -------------------------------------------------------------------------------- /ppld/test_data/random.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/random.ppe -------------------------------------------------------------------------------- /ppld/test_data/rdunet.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/rdunet.ppe -------------------------------------------------------------------------------- /ppld/test_data/rdusys.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/rdusys.ppe -------------------------------------------------------------------------------- /ppld/test_data/readline.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/readline.ppe -------------------------------------------------------------------------------- /ppld/test_data/rename.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/rename.ppe -------------------------------------------------------------------------------- /ppld/test_data/replace.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/replace.ppe -------------------------------------------------------------------------------- /ppld/test_data/restscrn.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/restscrn.ppe -------------------------------------------------------------------------------- /ppld/test_data/savescrn.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/savescrn.ppe -------------------------------------------------------------------------------- /ppld/test_data/scrtext.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/scrtext.ppe -------------------------------------------------------------------------------- /ppld/test_data/showstat.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/showstat.ppe -------------------------------------------------------------------------------- /ppld/test_data/slpath.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/slpath.ppe -------------------------------------------------------------------------------- /ppld/test_data/stripatx.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/stripatx.ppe -------------------------------------------------------------------------------- /ppld/test_data/sysopsec.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/sysopsec.ppe -------------------------------------------------------------------------------- /ppld/test_data/temppath.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/temppath.ppe -------------------------------------------------------------------------------- /ppld/test_data/timeap.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/timeap.ppe -------------------------------------------------------------------------------- /ppld/test_data/tokcount.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/tokcount.ppe -------------------------------------------------------------------------------- /ppld/test_data/tokenize.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/tokenize.ppe -------------------------------------------------------------------------------- /ppld/test_data/tokenstr.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/tokenstr.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_addr.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_addr.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_alias.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_alias.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_cmnt.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_cmnt.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_def79.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_def79.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_expert.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_expert.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_expsec.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_expsec.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_fsep.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_fsep.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_inconf.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_inconf.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_ldate.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_ldate.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_ldir.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_ldir.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_logons.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_logons.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_ltime.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_ltime.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_name.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_name.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_notes.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_notes.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_pwdexp.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_pwdexp.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_pwdlc.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_pwdlc.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_pwdtc.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_pwdtc.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_recnum.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_recnum.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_srcoll.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_srcoll.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_stat.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_stat.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_timeon.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_timeon.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_trans.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_trans.ppe -------------------------------------------------------------------------------- /ppld/test_data/valdate.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/valdate.ppe -------------------------------------------------------------------------------- /ppld/test_data/valtime.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/valtime.ppe -------------------------------------------------------------------------------- /ppld/test_data/varaddr.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/varaddr.ppe -------------------------------------------------------------------------------- /ppld/test_data/varoff.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/varoff.ppe -------------------------------------------------------------------------------- /ppld/test_data/varseg.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/varseg.ppe -------------------------------------------------------------------------------- /ppld/test_data/waitfor.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/waitfor.ppe -------------------------------------------------------------------------------- /ppld/test_data/wrunet.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/wrunet.ppe -------------------------------------------------------------------------------- /ppld/test_data/wrusys.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/wrusys.ppe -------------------------------------------------------------------------------- /ppl-lsp/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | node_modules 3 | out/ 4 | .pnpm-debug.log 5 | *.ast 6 | *.pps 7 | dist/ 8 | *.vsix -------------------------------------------------------------------------------- /ppld/test_data/99bottles.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/99bottles.ppe -------------------------------------------------------------------------------- /ppld/test_data/broadcast.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/broadcast.ppe -------------------------------------------------------------------------------- /ppld/test_data/confunflag.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/confunflag.ppe -------------------------------------------------------------------------------- /ppld/test_data/freshline.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/freshline.ppe -------------------------------------------------------------------------------- /ppld/test_data/getx_gety.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/getx_gety.ppe -------------------------------------------------------------------------------- /ppld/test_data/hour_time_min_sec.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=HOUR(TIME()) + MIN(TIME()) + SEC(TIME()) 3 | -------------------------------------------------------------------------------- /ppld/test_data/ltrim_rtrim.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=LTRIM("fooo", " ") 3 | STR001=RTRIM("fooo", " ") 4 | -------------------------------------------------------------------------------- /ppld/test_data/month_year.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/month_year.ppe -------------------------------------------------------------------------------- /ppld/test_data/not_or_xor.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/not_or_xor.ppe -------------------------------------------------------------------------------- /ppld/test_data/promptstr.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/promptstr.ppe -------------------------------------------------------------------------------- /ppld/test_data/resetdisp.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/resetdisp.ppe -------------------------------------------------------------------------------- /ppld/test_data/sendmodem.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/sendmodem.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_expdate.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_expdate.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_longhdr.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_longhdr.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_pagelen.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_pagelen.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_pwdhist.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_pwdhist.ppe -------------------------------------------------------------------------------- /icy_board_engine/src/test_data/test_dim_string_concat.pps: -------------------------------------------------------------------------------- 1 | STRING S(5) 2 | 3 | PRINTLN "EMPTY:"+S(2) 4 | ;; 5 | EMPTY: -------------------------------------------------------------------------------- /icy_board_engine/src/test_data/test_optext.pps: -------------------------------------------------------------------------------- 1 | OPTEXT "world" 2 | PRINTLN "Hello @OPTEXT@!" 3 | ;; 4 | Hello world! -------------------------------------------------------------------------------- /ppld/test_data/dbglevel_func.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/dbglevel_func.ppe -------------------------------------------------------------------------------- /ppld/test_data/defcolor_func.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/defcolor_func.ppe -------------------------------------------------------------------------------- /ppld/test_data/fieldlen_guide.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | INPUTSTR "Enter", STR001, 1,4, "0123456789", FIELDLEN+GUIDE 3 | -------------------------------------------------------------------------------- /ppld/test_data/fput_fputln.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/fput_fputln.ppe -------------------------------------------------------------------------------- /ppld/test_data/gosub_return.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/gosub_return.ppe -------------------------------------------------------------------------------- /ppld/test_data/if_then_else.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/if_then_else.ppe -------------------------------------------------------------------------------- /ppld/test_data/ltrim_rtrim.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/ltrim_rtrim.ppe -------------------------------------------------------------------------------- /ppld/test_data/newline_stmt.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/newline_stmt.ppe -------------------------------------------------------------------------------- /ppld/test_data/print_println.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/print_println.ppe -------------------------------------------------------------------------------- /ppld/test_data/select_case.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/select_case.ppe -------------------------------------------------------------------------------- /ppld/test_data/string_expr.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/string_expr.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_msgrd_msgwr.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_msgrd_msgwr.ppe -------------------------------------------------------------------------------- /icy_board_engine/src/test_data/push_pop_test.pps: -------------------------------------------------------------------------------- 1 | integer a,b 2 | push 5+3, 12 3 | pop a, b 4 | println a,b 5 | ;; 6 | 128 -------------------------------------------------------------------------------- /ppld/test_data/fappend_orw_sdb.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/fappend_orw_sdb.ppe -------------------------------------------------------------------------------- /ppld/test_data/fieldlen_guide.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/fieldlen_guide.ppe -------------------------------------------------------------------------------- /ppld/test_data/highascii_make_ascii.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | INPUTSTR "Enter", STR001, 1, 4, MASK_ASCII(), HIGHASCII 3 | -------------------------------------------------------------------------------- /ppld/test_data/mprint_mprintln.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/mprint_mprintln.ppe -------------------------------------------------------------------------------- /ppld/test_data/nochar_yeschar.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/nochar_yeschar.ppe -------------------------------------------------------------------------------- /ppld/test_data/not_or_xor.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001 = NOT(12) 3 | INT001 = OR(12, 32) 4 | INT001 = XOR(12, 32) 5 | -------------------------------------------------------------------------------- /ppld/test_data/showoff_showon.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/showoff_showon.ppe -------------------------------------------------------------------------------- /ppld/test_data/sprint_sprintln.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/sprint_sprintln.ppe -------------------------------------------------------------------------------- /ppld/test_data/unary_operators.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/unary_operators.ppe -------------------------------------------------------------------------------- /icy_board_engine/src/test_data/test_dim1.pps: -------------------------------------------------------------------------------- 1 | INTEGER ARR(2) 2 | ARR(0) = 2 3 | ARR(1) = 3 4 | PRINT ARR(0) + ARR(1) 5 | ;; 6 | 5 -------------------------------------------------------------------------------- /ppl-lsp/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | node_modules 3 | out/ 4 | src/ 5 | tsconfig.json 6 | webpack.config.js 7 | client/** 8 | target -------------------------------------------------------------------------------- /ppld/test_data/declare_Function.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/declare_Function.ppe -------------------------------------------------------------------------------- /ppld/test_data/declare_procedure.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/declare_procedure.ppe -------------------------------------------------------------------------------- /ppld/test_data/echodots_promptstr_mask_pwd_upcase.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | PROMPTSTR 12,STR001,12,MASK_PWD(),ECHODOTS+UPCASE 3 | -------------------------------------------------------------------------------- /ppld/test_data/eraseline_inputstr.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/eraseline_inputstr.ppe -------------------------------------------------------------------------------- /ppld/test_data/for_break_continue.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/for_break_continue.ppe -------------------------------------------------------------------------------- /ppld/test_data/hour_time_min_sec.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/hour_time_min_sec.ppe -------------------------------------------------------------------------------- /ppld/test_data/if_else_loop_bug.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/if_else_loop_bug.ppe -------------------------------------------------------------------------------- /ppld/test_data/kbdchkoff_kbdchkon.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/kbdchkoff_kbdchkon.ppe -------------------------------------------------------------------------------- /ppld/test_data/u_bdphone_hvphone.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_bdphone_hvphone.ppe -------------------------------------------------------------------------------- /ppld/test_data/highascii_make_ascii.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/highascii_make_ascii.ppe -------------------------------------------------------------------------------- /ppld/test_data/while_break_continue.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/while_break_continue.ppe -------------------------------------------------------------------------------- /ppld/test_data/bell_lfafter_lfbefore.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/bell_lfafter_lfbefore.ppe -------------------------------------------------------------------------------- /ppld/test_data/dispfile_sec_graph_lang.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/dispfile_sec_graph_lang.ppe -------------------------------------------------------------------------------- /ppld/test_data/while.pps: -------------------------------------------------------------------------------- 1 | WHILE (TRUE) PRINT "Hello" 2 | WHILE (TRUE) DO 3 | PRINT "Hello" 4 | PRINTLN "World!" 5 | ENDWHILE 6 | -------------------------------------------------------------------------------- /ppld/test_data/disptext_bell_lfafter_lfbefore_logit_logitleft_newline.pps: -------------------------------------------------------------------------------- 1 | DISPTEXT 100, BELL + LOGIT + LOGITLEFT + LFAFTER + LFBEFORE + NEWLINE -------------------------------------------------------------------------------- /ppld/test_data/if_elseif_else_endif_end.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/if_elseif_else_endif_end.ppe -------------------------------------------------------------------------------- /ppld/test_data/peek.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=PEEKB(MKADDR(1, 2)) 3 | INT001=PEEKDW(MKADDR(1, 2)) 4 | INT001=PEEKW(MKADDR(1, 2)) 5 | -------------------------------------------------------------------------------- /ppld/test_data/u_bdl_bdlday_bul_fdl_ful.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/u_bdl_bdlday_bul_fdl_ful.ppe -------------------------------------------------------------------------------- /ppld/test_data/f_exp_f_mw_f_reg_f_sel_f_sys.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/f_exp_f_mw_f_reg_f_sel_f_sys.ppe -------------------------------------------------------------------------------- /ppld/test_data/if_then.pps: -------------------------------------------------------------------------------- 1 | BOOLEAN BOOL001 2 | BOOL001 = RANDOM(100) = 10 3 | 4 | IF (!BOOL001) THEN 5 | PRINT "Hello World!" 6 | ENDIF 7 | -------------------------------------------------------------------------------- /icy_board_engine/src/test_data/bool_check.pps: -------------------------------------------------------------------------------- 1 | BOOLEAN B 2 | B = TRUE 3 | PRINT B, "," 4 | B = !B 5 | PRINT B, "," 6 | B = !B 7 | PRINT B 8 | ;; 9 | 1,0,1 -------------------------------------------------------------------------------- /icy_board_engine/src/test_data/for_to_string.pps: -------------------------------------------------------------------------------- 1 | INTEGER I 2 | STRING B 3 | B = "3" 4 | FOR I = 0 TO B 5 | PRINT I, "," 6 | NEXT 7 | ;; 8 | 0,1,2,3, -------------------------------------------------------------------------------- /ppld/test_data/u_bdl_bdlday_bul_fdl_ful.pps: -------------------------------------------------------------------------------- 1 | PRINTLN U_BDL() 2 | PRINTLN U_BDLDAY() 3 | PRINTLN U_BUL() 4 | PRINTLN U_FDL() 5 | PRINTLN U_FUL() 6 | -------------------------------------------------------------------------------- /icy_board_engine/src/test_data/bool_function_value.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/icy_board_engine/src/test_data/bool_function_value.ppe -------------------------------------------------------------------------------- /ppld/test_data/echodots_promptstr_mask_pwd_upcase.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/echodots_promptstr_mask_pwd_upcase.ppe -------------------------------------------------------------------------------- /ppld/test_data/declare_procedure.pps: -------------------------------------------------------------------------------- 1 | DECLARE PROCEDURE PROC001() 2 | PROC001() 3 | END 4 | 5 | PROCEDURE PROC001() 6 | PRINTLN "Hello World!" 7 | ENDPROC 8 | -------------------------------------------------------------------------------- /ppld/test_data/if_then.ppd: -------------------------------------------------------------------------------- 1 | BOOLEAN BOOL001 2 | BOOL001 = RANDOM(100) = 10 3 | IF (!BOOL001) THEN 4 | PRINT "Hello World!" 5 | ENDIF 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ppld/test_data/loggedon.ppd: -------------------------------------------------------------------------------- 1 | ;----------------------------------------- 2 | ; PCBoard programming language decompiler 3 | ;----------------------------------------- 4 | 5 | -------------------------------------------------------------------------------- /ppld/test_data/fcreate.pps: -------------------------------------------------------------------------------- 1 | FCREATE 1, "PPE.LOG", O_RD, S_DN 2 | FCREATE 1, "PPE.LOG", O_WR, S_DR 3 | FCREATE 1, "PPE.LOG", O_RW, S_DW 4 | FCREATE 1, "PPE.LOG", O_RW, S_DB 5 | -------------------------------------------------------------------------------- /icy_board_engine/src/test_data/use_funcs1.pps: -------------------------------------------------------------------------------- 1 | DECLARE PROCEDURE PROC() 2 | ;$USEFUNCS 3 | PROCEDURE PROC() 4 | PRINT "Hello" 5 | ENDPROC 6 | BEGIN 7 | PROC() 8 | END 9 | ;; 10 | Hello -------------------------------------------------------------------------------- /ppld/test_data/disptext_bell_lfafter_lfbefore_logit_logitleft_newline.ppe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkrueger/PPLEngine/HEAD/ppld/test_data/disptext_bell_lfafter_lfbefore_logit_logitleft_newline.ppe -------------------------------------------------------------------------------- /ppld/test_data/mask.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | STR001=MASK_ALNUM() 3 | STR001=MASK_ALPHA() 4 | STR001=MASK_ASCII() 5 | STR001=MASK_FILE() 6 | STR001=MASK_NUM() 7 | STR001=MASK_PATH() 8 | STR001=MASK_PWD() 9 | -------------------------------------------------------------------------------- /ppld/test_data/declare_Function.pps: -------------------------------------------------------------------------------- 1 | DECLARE FUNCTION FUNC001(INTEGER PAR001) INTEGER 2 | 3 | PRINT FUNC001(5) 4 | END 5 | 6 | FUNCTION FUNC001(INTEGER PAR001) INTEGER 7 | FUNC001 = PAR001 + 1 8 | ENDFUNC 9 | -------------------------------------------------------------------------------- /ppld/test_data/for_break_continue.pps: -------------------------------------------------------------------------------- 1 | INTEGER i 2 | INTEGER j 3 | 4 | FOR i = 1 TO 100 STEP 2 5 | IF (i = 300) CONTINUE 6 | FOR j = 100 TO 1 STEP -3 7 | IF (i = 10) BREAK 8 | NEXT 9 | NEXT 10 | -------------------------------------------------------------------------------- /icy_board_engine/src/test_data/test_functions.pps: -------------------------------------------------------------------------------- 1 | DECLARE FUNCTION Hello(STRING who) STRING 2 | 3 | PRINT Hello("World") 4 | 5 | FUNCTION Hello(STRING who) STRING 6 | Hello = "Hello " + who 7 | ENDFUNC 8 | ;; 9 | Hello World -------------------------------------------------------------------------------- /ppld/test_data/select_case.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | INT001=1 3 | 4 | SELECT CASE INT001 5 | CASE 1 6 | PRINT "1" 7 | CASE 2 8 | PRINT "2" 9 | DEFAULT 10 | PRINT "ELSE" 11 | ENDSELECT 12 | 13 | -------------------------------------------------------------------------------- /ppld/test_data/if_then_else.pps: -------------------------------------------------------------------------------- 1 | BOOLEAN BOOL001 2 | BOOLEAN BOOL002 3 | 4 | BOOL001 = RANDOM(100) = 10 5 | BOOL002 = RANDOM(100) = 5 6 | 7 | IF (BOOL001 | BOOL002) THEN 8 | PRINT "Yes" 9 | ELSE 10 | PRINT "No" 11 | ENDIF 12 | -------------------------------------------------------------------------------- /icy_board_engine/src/test_data/bool_function_value2.pps: -------------------------------------------------------------------------------- 1 | Declare Function AvailableRet(Integer iConf) Boolean 2 | 3 | if (AvailableRet(1)) println "=C" 4 | 5 | Function AvailableRet(Integer iConf) Boolean 6 | AvailableRet = FALSE 7 | RETURN 8 | EndFunc 9 | ;; -------------------------------------------------------------------------------- /file_id.diz: -------------------------------------------------------------------------------- 1 | -* PPL Engine *- 2 | 3 | A PPL compile, decompiler and execution runtime. 4 | PPL is a language created for PCBoard. These tools 5 | run without PCBoard but aim for compatibility. 6 | 7 | Development 8 | GitHub https://github.com/mkrueger/ppl_engine 9 | -------------------------------------------------------------------------------- /ppld/test_data/99bottles.pps: -------------------------------------------------------------------------------- 1 | INTEGER i 2 | 3 | FOR i=100 TO 1 STEP -1 4 | PRINTLN i ," Bottle(s) of beer on the wall, ", i, " bottle(s) of beer" 5 | PRINTLN "Take one down and pass it around," 6 | PRINTLN i - 1," bottle(s) of beer on the wall" 7 | NEXT 8 | -------------------------------------------------------------------------------- /ppl-lsp/data/constants.py: -------------------------------------------------------------------------------- 1 | f = open("FUNCS", "r") 2 | #for line in f: 3 | # print("hint-statement-"+ line.strip().lower()+"=todo") 4 | 5 | 6 | for line in f: 7 | print(" OpCode::" + line.strip() + " => get_hint(fl!(crate::LANGUAGE_LOADER, \"hint-statement-"+ line.strip().lower()+"\")),") 8 | -------------------------------------------------------------------------------- /ppld/test_data/while_break_continue.pps: -------------------------------------------------------------------------------- 1 | BOOLEAN BOOL001 2 | BOOLEAN BOOL002 3 | 4 | BOOL001 = TRUE 5 | WHILE (BOOL001) DO 6 | IF (BOOL001) BREAK 7 | 8 | WHILE (!BOOL001) DO 9 | PRINT "Hello" 10 | BOOL002 = !BOOL002 11 | IF (BOOL002) CONTINUE 12 | ENDWHILE 13 | 14 | ENDWHILE -------------------------------------------------------------------------------- /ppl-lsp/client/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es2019", 5 | "lib": ["ES2019"], 6 | "outDir": "../dist", 7 | "rootDir": "src", 8 | "sourceMap": true 9 | }, 10 | "include": ["src"], 11 | "exclude": ["node_modules", ".vscode-test"] 12 | } 13 | -------------------------------------------------------------------------------- /icy_board_engine/src/test_data/sort.pps: -------------------------------------------------------------------------------- 1 | STRING FOO(3) 2 | INTEGER P(3) 3 | INTEGER I 4 | FOO(0) ="z" 5 | FOO(1) ="A" 6 | FOO(2) ="e" 7 | FOO(3) ="4" 8 | SORT FOO, P 9 | 10 | FOR i = 0 TO 3 11 | PRINTLN FOO(i) 12 | NEXT 13 | 14 | FOR i = 0 TO 3 15 | PRINTLN FOO(p(i)) 16 | NEXT 17 | ;; 18 | z 19 | A 20 | e 21 | 4 22 | 4 23 | A 24 | e 25 | z -------------------------------------------------------------------------------- /ppld/test_data/if_else_loop_bug.pps: -------------------------------------------------------------------------------- 1 | BYTE i 2 | 3 | FOR i = 1 TO 10 4 | IF (i = 5) GOTO LABEL002 5 | NEXT 6 | 7 | PRINT "Hello" 8 | :LABEL002 9 | PRINT "World" 10 | 11 | 12 | WHILE (i < 20) DO 13 | IF (i = 5) GOTO LABEL005 14 | i = i + 1 15 | END WHILE 16 | 17 | PRINT "Hello" 18 | :LABEL005 19 | PRINT "World" 20 | -------------------------------------------------------------------------------- /icy_board_engine/src/test_data/by_ref_parameter.pps: -------------------------------------------------------------------------------- 1 | DECLARE PROCEDURE FOO(BYTE X) 2 | DECLARE PROCEDURE BAR(VAR BYTE X) 3 | BYTE C 4 | 5 | FOO(C) 6 | PRINT C,"," 7 | 8 | BAR(C) 9 | PRINT C,"," 10 | 11 | PROCEDURE BAR(VAR BYTE X) 12 | X = X + 11 13 | ENDPROC 14 | 15 | PROCEDURE FOO(BYTE X) 16 | X = X + 22 17 | ENDPROC 18 | ;; 19 | 0,11, -------------------------------------------------------------------------------- /icy_board_engine/src/test_data/local_variables.pps: -------------------------------------------------------------------------------- 1 | DECLARE PROCEDURE FOO(INTEGER A) 2 | DECLARE PROCEDURE BAR(INTEGER A) 3 | FOO(2) 4 | 5 | PROCEDURE FOO(INTEGER A) 6 | INTEGER C 7 | C = 5 8 | BAR(A + C) 9 | ENDPROC 10 | 11 | PROCEDURE BAR(INTEGER A) 12 | INTEGER C 13 | C = 2 14 | PRINT A + C 15 | ENDPROC 16 | ;; 17 | 9 -------------------------------------------------------------------------------- /ppld/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "ppld" 3 | version.workspace = true 4 | authors.workspace = true 5 | edition.workspace = true 6 | 7 | [dependencies] 8 | icy_ppe = { path = "../icy_ppe" } 9 | clap = { version = "4.5.4", features = ["derive"] } 10 | lazy_static = "1.4.0" 11 | semver = "1.0.20" 12 | thiserror = "1.0.57" 13 | crossterm = "0.27.0" 14 | -------------------------------------------------------------------------------- /ppl-lsp/client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ppl-language-client", 3 | "description": "VSCode part of a language server", 4 | "license": "MIT", 5 | "version": "0.0.1", 6 | "engines": { 7 | "vscode": "^1.65.0" 8 | }, 9 | "dependencies": {}, 10 | "devDependencies": { 11 | "@types/node": "^17.0.18", 12 | "vscode-test": "^1.3.0", 13 | "@types/vscode": "~1.65.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ppl-lsp/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es2019", 5 | "lib": ["ES2019"], 6 | "outDir": "out", 7 | "rootDir": "src", 8 | "sourceMap": true 9 | }, 10 | "include": [ 11 | "src" 12 | ], 13 | "exclude": [ 14 | "node_modules", 15 | ".vscode-test" 16 | ], 17 | "references": [ 18 | { "path": "./client" }, 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /icy_board_engine/src/test_data/bool_function_value.pps: -------------------------------------------------------------------------------- 1 | Declare Function Available(Integer iConf) Boolean 2 | 3 | PRINT TRUE,"-", FALSE 4 | if (Available(1)) then 5 | print "=A" 6 | else 7 | print "=B" 8 | endif 9 | 10 | if (Available(1)) print "=A" 11 | 12 | Function Available(Integer iConf) Boolean 13 | Available = FALSE 14 | Available = TRUE 15 | EndFunc 16 | ;; 17 | 1-0=A=A 18 | -------------------------------------------------------------------------------- /pplc/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "pplc" 3 | version.workspace = true 4 | authors.workspace = true 5 | edition.workspace = true 6 | 7 | [dependencies] 8 | icy_ppe = { path = "../icy_ppe" } 9 | lazy_static = "1.4.0" 10 | semver = "1.0.20" 11 | thiserror = "1.0.57" 12 | ariadne = "0.4.0" 13 | unicase = "2.7.0" 14 | clap = { version = "4.5.4", features = ["derive"] } 15 | crossterm = "0.27.0" 16 | -------------------------------------------------------------------------------- /icy_board_engine/src/test_data/recurse.pps: -------------------------------------------------------------------------------- 1 | DECLARE PROCEDURE FOO(VAR BYTE X) 2 | BYTE C 3 | 4 | FOO(C) 5 | PRINTLN "END:", C 6 | 7 | PROCEDURE FOO(VAR BYTE X) 8 | BYTE C2 9 | C2 = X + 1 10 | if (X > 3) RETURN 11 | X = X * 2 12 | PRINTLN C2 ,":", X 13 | FOO(C2) 14 | PRINTLN C2 ,":", X 15 | ENDPROC 16 | ;; 17 | 1:0 18 | 2:2 19 | 3:4 20 | 4:6 21 | 4:6 22 | 6:4 23 | 4:2 24 | 2:0 25 | END:0 -------------------------------------------------------------------------------- /pplx/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "pplx" 3 | version.workspace = true 4 | authors.workspace = true 5 | edition.workspace = true 6 | 7 | [dependencies] 8 | icy_ppe = { path = "../icy_ppe" } 9 | icy_board_engine = { path = "../icy_board_engine" } 10 | clap = { version = "4.5.4", features = ["derive"] } 11 | semver = "1.0.20" 12 | thiserror = "1.0.57" 13 | lazy_static = "1.4.0" 14 | crossterm = "0.27.0" 15 | -------------------------------------------------------------------------------- /ppld/test_data/if_elseif_else_endif_end.pps: -------------------------------------------------------------------------------- 1 | BOOLEAN BOOL001 2 | BOOLEAN BOOL002 3 | BOOL001 = 1 = 2 4 | BOOL002 = 2 = 2 5 | 6 | IF (BOOL001) THEN 7 | PRINT "TRUE" 8 | ELSEIF (BOOL002 | BOOL001) THEN 9 | PRINT "ELSEIF1" 10 | ELSEIF (!BOOL002 & !BOOL001) THEN 11 | PRINT "ELSEIF2" 12 | ELSE 13 | PRINT "ELSE" 14 | ENDIF 15 | 16 | IF (BOOL001) THEN 17 | PRINT "TRUE" 18 | ELSEIF (BOOL002 | BOOL001) THEN 19 | PRINT "ELSEIF1" 20 | ENDIF 21 | -------------------------------------------------------------------------------- /ppld/test_data/reg.pps: -------------------------------------------------------------------------------- 1 | INTEGER INT001 2 | BOOLEAN BOOL001 3 | 4 | INT001=REGAH() 5 | INT001=REGAL() 6 | INT001=REGAX() 7 | INT001=REGBH() 8 | INT001=REGBL() 9 | INT001=REGBX() 10 | INT001=REGCH() 11 | INT001=REGCL() 12 | INT001=REGCX() 13 | INT001=REGDH() 14 | INT001=REGDL() 15 | INT001=REGDX() 16 | 17 | INT001=REGDI() 18 | INT001=REGDS() 19 | 20 | INT001=REGES() 21 | INT001=REGSI() 22 | 23 | INT001=REGF() 24 | 25 | BOOL001=REGCF() 26 | -------------------------------------------------------------------------------- /ppl-lsp/examples/index.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | /* let source = include_str!("./test.pps"); 3 | 4 | // let source = r#" 5 | // test 6 | let ParserResult { 7 | ast, 8 | parse_errors, 9 | semantic_tokens: _, 10 | } = parse(source); 11 | let mut hashmap = HashMap::new(); 12 | if let Some(ast) = ast { 13 | ast.into_iter().for_each(|(_k, v)| { 14 | type_inference(&v.body, &mut hashmap); 15 | }); 16 | }*/ 17 | } 18 | -------------------------------------------------------------------------------- /ppld/test_data/input.pps: -------------------------------------------------------------------------------- 1 | STRING STR001 2 | DATE DATE001 3 | MONEY MONEY001 4 | TIME TIME001 5 | 6 | INPUT "Enter", STR001 7 | INPUTCC "ccc", STR001, 1 8 | INPUTDATE "Date", DATE001, 1 9 | INPUTMONEY "Money", MONEY001, 1 10 | INPUTTIME "time", TIME001, 1 11 | INPUTYN "ccc", STR001, 1 12 | INPUTSTR "Enter STRING", STR001, 1, 63, MASK_ALNUM(), AUTO+ECHODOTS+ERASELINE+FIELDLEN+GUIDE+HIGHASCII+LFAFTER+LFBEFORE+NEWLINE+NOCLEAR+STACKED+UPCASE+WORDWRAP+YESNO 13 | INPUTTEXT "Time", TIME001, 1, 5 14 | -------------------------------------------------------------------------------- /icy_ppe/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icy_ppe" 3 | version.workspace = true 4 | authors.workspace = true 5 | edition.workspace = true 6 | 7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 8 | 9 | [dependencies] 10 | lazy_static = "1.4.0" 11 | thiserror = "1.0.57" 12 | log = "0.4.21" 13 | unicase = "2.7.0" 14 | crossterm = "0.27.0" 15 | toml = "0.8.12" 16 | serde = "1.0.197" 17 | chrono = "0.4.37" 18 | 19 | # interpreter deps 20 | [dev-dependencies] 21 | stopwatch = "0.0.7" 22 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = ["icy_ppe", "ppld", "pplc", "pplx", "ppl-lsp"] 3 | workspace.resolver = "2" 4 | 5 | [workspace.package] 6 | version = "0.3.0" 7 | edition = "2021" 8 | authors = ["Mike Krüger "] 9 | 10 | [profile.release] 11 | opt-level = 'z' # Optimize for size 12 | lto = true # Enable link-time optimization 13 | codegen-units = 1 # Reduce number of codegen units to increase optimizations 14 | panic = 'abort' # Abort on panic 15 | strip = true # Strip symbols from binary* -------------------------------------------------------------------------------- /ppl-lsp/src/jump_definition.rs: -------------------------------------------------------------------------------- 1 | use icy_ppe::{ast::Ast, parser::lexer::Spanned}; 2 | 3 | use icy_ppe::semantic::SemanticVisitor; 4 | 5 | pub fn get_definition(ast: &Ast, offset: usize) -> Option> { 6 | let mut semantic_visitor = SemanticVisitor::default(); 7 | ast.visit(&mut semantic_visitor); 8 | 9 | for (_, refs) in &semantic_visitor.references { 10 | if refs.contains(offset) { 11 | if let Some(decl) = &refs.declaration { 12 | return Some(decl.clone()); 13 | } 14 | } 15 | } 16 | None 17 | } 18 | -------------------------------------------------------------------------------- /icy_ppe/src/ast/constants.py: -------------------------------------------------------------------------------- 1 | f = open("constants.dat", "r") 2 | print("------------------") 3 | f = open("constants.dat", "r") 4 | 5 | categories = {} 6 | 7 | for line in f: 8 | line = line.strip() 9 | if line == "": 10 | continue 11 | split = line.split(",") 12 | v = split[2].strip().split("+") 13 | for i in range(len(v)): 14 | categories[v[i]] = 1 15 | v[i] = "ConstantType::"+v[i] 16 | print(" BuiltinConst { name: \""+split[0].strip()+"\", value: "+split[1].strip()+", used_by: &["+','.join(v)+"]},") 17 | 18 | print() 19 | for key, cat in categories.items(): 20 | print(key + ",") -------------------------------------------------------------------------------- /icy_ppe/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![warn(clippy::all, clippy::pedantic)] 2 | #![allow( 3 | clippy::must_use_candidate, 4 | clippy::cast_sign_loss, 5 | clippy::cast_possible_truncation, 6 | clippy::cast_possible_wrap, 7 | clippy::too_many_lines, 8 | clippy::cast_lossless, 9 | clippy::cast_precision_loss, 10 | clippy::struct_excessive_bools, 11 | clippy::module_name_repetitions 12 | )] 13 | extern crate core; 14 | extern crate lazy_static; 15 | 16 | pub mod ast; 17 | pub mod compiler; 18 | pub mod crypt; 19 | pub mod datetime; 20 | pub mod decompiler; 21 | pub mod executable; 22 | pub mod parser; 23 | pub mod semantic; 24 | pub mod tables; 25 | 26 | pub type Res = Result>; 27 | -------------------------------------------------------------------------------- /icy_ppe/src/ast/rename_visitor.rs: -------------------------------------------------------------------------------- 1 | use std::collections::HashMap; 2 | 3 | use crate::ast::AstVisitorMut; 4 | #[derive(Default)] 5 | pub struct RenameVisitor { 6 | pub rename_map: HashMap, unicase::Ascii>, 7 | } 8 | 9 | impl RenameVisitor { 10 | pub fn new(rename_map: HashMap, unicase::Ascii>) -> Self { 11 | Self { rename_map } 12 | } 13 | } 14 | 15 | impl AstVisitorMut for RenameVisitor { 16 | fn visit_identifier(&mut self, id: &unicase::Ascii) -> unicase::Ascii { 17 | if let Some(rename) = self.rename_map.get(id) { 18 | rename.clone() 19 | } else { 20 | id.clone() 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /doc/qwk/REP.TXT: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Format of the BBSID.REP file for replies 5 | 6 | 7 | The record format of the BBSID.MSG file in the BBSID.REP file 8 | is exactly identical to the MESSAGES.DAT format except the 9 | packet header which now is filled with blanks except that it 10 | contains the BBSID as the first few characters. 11 | 12 | 13 | On the Message Headers there is also one change. The ascii 14 | field which normally contains the message number is now filled 15 | (in ascii) with the conference number of the message. Note 16 | that some readers which place the conference number here, 17 | neglect to fill in the normal Message Header conference 18 | number field. 19 | -------------------------------------------------------------------------------- /doc/qwk/qwk11/REP.TXT: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Format of the BBSID.REP file for replies 5 | 6 | 7 | The record format of the BBSID.MSG file in the BBSID.REP file 8 | is exactly identical to the MESSAGES.DAT format except the 9 | packet header which now is filled with blanks except that it 10 | contains the BBSID as the first few characters. 11 | 12 | 13 | On the Message Headers there is also one change. The ascii 14 | field which normally contains the message number is now filled 15 | (in ascii) with the conference number of the message. Note 16 | that some readers which place the conference number here, 17 | neglect to fill in the normal Message Header conference 18 | number field. 19 | -------------------------------------------------------------------------------- /ppl-lsp/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "ppl-language-server" 3 | version = "0.2.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | icy_ppe = { path = "../icy_ppe" } 10 | env_logger = "0.11.3" 11 | ropey = "1.5.0" 12 | serde_json = "1.0.78" 13 | tokio = { version = "1.17.0", features = ["full"] } 14 | tower-lsp = { version = "0.20.0", features = ["proposed"]} 15 | serde = { version = "1.0", features = ["derive"] } 16 | dashmap = "5.1.0" 17 | log = "0.4.14" 18 | im-rc = "15.0.0" 19 | i18n-embed = { version = "0.14.0", features = ["fluent-system", "desktop-requester"]} 20 | i18n-embed-fl = "0.8.0" 21 | rust-embed = "8.0.0" 22 | once_cell = "1.16.0" 23 | unicase = "2.7.0" 24 | -------------------------------------------------------------------------------- /.github/workflows/run_tests.yml: -------------------------------------------------------------------------------- 1 | name: Run tests 2 | 3 | on: 4 | push: 5 | branches: [ "main" ] 6 | pull_request: 7 | branches: [ "main" ] 8 | env: 9 | CARGO_TERM_COLOR: always 10 | jobs: 11 | run_checks: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v3 15 | - name: Check formatting 16 | uses: actions-rs/cargo@v1 17 | with: 18 | command: fmt 19 | args: --all -- --check 20 | - run: rustup component add clippy 21 | - name: Install Dependencies 22 | run: | 23 | sudo apt-get update 24 | sudo apt-get install build-essential libgtk-3-dev libasound2-dev libxcb-shape0-dev libxcb-xfixes0-dev 25 | - name: Run tests 26 | uses: actions-rs/cargo@v1 27 | with: 28 | command: test 29 | args: --all-features -------------------------------------------------------------------------------- /icy_board_engine/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icy_board_engine" 3 | version.workspace = true 4 | authors.workspace = true 5 | edition.workspace = true 6 | 7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 8 | 9 | [dependencies] 10 | icy_ppe = { path = "../icy_ppe" } 11 | icy_engine = { git ="https://github.com/mkrueger/icy_engine" } 12 | lazy_static = "1.4.0" 13 | thiserror = "1.0.57" 14 | log = "0.4.21" 15 | unicase = "2.7.0" 16 | crossterm = "0.27.0" 17 | rand = "0.8" 18 | radix_fmt = "1" 19 | qfile = "3.0.1" 20 | substring = "1.4.5" 21 | byteorder = "1.5.0" 22 | chrono = "0.4.37" 23 | strum = "0.26.2" 24 | strum_macros = "0.26.2" 25 | toml = "0.8.12" 26 | serde = "1.0.197" 27 | relative-path = "1.9.2" 28 | 29 | # interpreter deps 30 | [dev-dependencies] 31 | stopwatch = "0.0.7" 32 | -------------------------------------------------------------------------------- /ppl-lsp/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod completion; 2 | pub mod jump_definition; 3 | pub mod reference; 4 | pub mod semantic_token; 5 | 6 | #[derive(Debug)] 7 | pub struct ImCompleteSemanticToken { 8 | pub start: usize, 9 | pub length: usize, 10 | pub token_type: usize, 11 | } 12 | 13 | use rust_embed::RustEmbed; 14 | #[derive(RustEmbed)] 15 | #[folder = "i18n"] // path to the compiled localization resources 16 | struct Localizations; 17 | 18 | use i18n_embed::{ 19 | fluent::{fluent_language_loader, FluentLanguageLoader}, 20 | DesktopLanguageRequester, 21 | }; 22 | 23 | use once_cell::sync::Lazy; 24 | pub static LANGUAGE_LOADER: Lazy = Lazy::new(|| { 25 | let loader = fluent_language_loader!(); 26 | let requested_languages = DesktopLanguageRequester::requested_languages(); 27 | let _result = i18n_embed::select(&loader, &Localizations, &requested_languages); 28 | loader 29 | }); 30 | -------------------------------------------------------------------------------- /icy_board_engine/src/icy_board/group_list.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | use super::IcyBoardSerializer; 4 | 5 | #[derive(Serialize, Deserialize, Clone, PartialEq, Debug)] 6 | pub struct Group { 7 | pub name: String, 8 | pub description: String, 9 | pub members: Vec, 10 | } 11 | 12 | #[derive(Default, Serialize, Deserialize, Clone, PartialEq, Debug)] 13 | 14 | pub struct GroupList { 15 | #[serde(default)] 16 | #[serde(skip_serializing_if = "Vec::is_empty")] 17 | #[serde(rename = "group")] 18 | groups: Vec, 19 | } 20 | impl GroupList { 21 | pub fn add_group( 22 | &mut self, 23 | name: impl Into, 24 | description: impl Into, 25 | members: &[i64], 26 | ) { 27 | self.groups.push(Group { 28 | name: name.into(), 29 | description: description.into(), 30 | members: members.to_vec(), 31 | }) 32 | } 33 | } 34 | 35 | impl IcyBoardSerializer for GroupList { 36 | const FILE_TYPE: &'static str = "groups"; 37 | } 38 | -------------------------------------------------------------------------------- /icy_ppe/src/ast/syntax_tree.rs: -------------------------------------------------------------------------------- 1 | use super::{AstNode, AstVisitor, AstVisitorMut}; 2 | use std::{fmt, path::PathBuf}; 3 | 4 | #[derive(Debug)] 5 | pub struct Ast { 6 | pub nodes: Vec, 7 | pub file_name: PathBuf, 8 | 9 | pub require_user_variables: bool, 10 | } 11 | 12 | impl Ast { 13 | pub fn new() -> Self { 14 | Ast { 15 | nodes: vec![], 16 | file_name: PathBuf::new(), 17 | require_user_variables: false, 18 | } 19 | } 20 | 21 | pub fn visit>(&self, visitor: &mut V) { 22 | visitor.visit_ast(self); 23 | } 24 | 25 | #[must_use] 26 | pub fn visit_mut(&self, visitor: &mut V) -> Self { 27 | visitor.visit_ast(self) 28 | } 29 | } 30 | 31 | impl Default for Ast { 32 | fn default() -> Self { 33 | Self::new() 34 | } 35 | } 36 | 37 | impl fmt::Display for Ast { 38 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 39 | let mut output_visitor = crate::ast::output_visitor::OutputVisitor::default(); 40 | self.visit(&mut output_visitor); 41 | 42 | write!(f, "{}", output_visitor.output) 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /icy_ppe/src/PPE_fileformat.txt: -------------------------------------------------------------------------------- 1 | PPE files have the following form: 2 | 3 | HEADER 4 | VARIABLE_TABLE 5 | CODE_SIZE 6 | CODE 7 | 8 | Header: 9 | PCBoard Programming Language Executable \x0D\x0A\x1A 10 | 11 | is #.## for example "3.30" or "3.40" 12 | 13 | VARIABLE_TABLE 14 | 15 | A list of entries in the form: 16 | 17 | Header (encrypted): 18 | 19 | index u16 20 | dims u8 21 | vector_size u16 22 | matrix_size u16 23 | cube_size u16 24 | var_type u8 25 | flags u8 26 | 27 | - flags: if bit 0 is set then the variable won't be reinitialized. 28 | if it's 1 then the variable will be reinitalized (locals in a function/procedure) 29 | 30 | Content: 31 | 32 | For type string: 33 | 34 | size u16 35 | string u8[size] (encrypted) 36 | 37 | Otherwise: 38 | garbage u16 (VTABLE from C class - get's skipped by PCBoard, pure garbage) 39 | var_type u16 - should be u8, same as var_type from above basically 40 | content u64 - Constant expression that should be 41 | 42 | CODE_SIZE 43 | 44 | u16 to define the code block size in bytes. 45 | If the block length differs from code_size then the block was compressed using RLE encoding. 46 | 47 | CODE 48 | 49 | u16 array of statements 50 | -------------------------------------------------------------------------------- /icy_board_engine/src/icy_board/security.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | use super::state::Session; 4 | 5 | #[derive(Default, Clone, Serialize, Deserialize)] 6 | pub struct RequiredSecurity { 7 | level: u8, 8 | min_age: u8, 9 | groups: Vec, 10 | } 11 | 12 | impl RequiredSecurity { 13 | pub fn new(sec_level: u8) -> Self { 14 | Self { 15 | level: sec_level, 16 | min_age: 0, 17 | groups: Vec::new(), 18 | } 19 | } 20 | 21 | pub fn level(&self) -> u8 { 22 | self.level 23 | } 24 | 25 | pub fn is_empty(&self) -> bool { 26 | self.level == 0 && self.min_age == 0 && self.groups.is_empty() 27 | } 28 | 29 | pub fn user_can_access(&self, session: &Session) -> bool { 30 | if session.cur_security < self.level { 31 | return false; 32 | } 33 | 34 | if session.cur_groups.contains(&"no_age".to_string()) { 35 | // Todo: Age check 36 | } 37 | 38 | if self.groups.is_empty() { 39 | return true; 40 | } 41 | 42 | for sg in &session.cur_groups { 43 | for group in &self.groups { 44 | if sg == group { 45 | return true; 46 | } 47 | } 48 | } 49 | false 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /icy_ppe/src/decompiler/test_evaluation_visitor.rs: -------------------------------------------------------------------------------- 1 | use std::path::PathBuf; 2 | 3 | use crate::{ 4 | ast::Expression, 5 | executable::LAST_PPLC, 6 | parser::{Encoding, Parser}, 7 | }; 8 | 9 | use super::evaluation_visitor::OptimizationVisitor; 10 | 11 | fn parse_expression(input: &str) -> Expression { 12 | let mut parser = Parser::new(PathBuf::from("."), input, Encoding::Utf8, LAST_PPLC); 13 | parser.next_token(); 14 | let res = parser.parse_expression().unwrap(); 15 | assert_eq!(parser.get_cur_token(), None); 16 | res 17 | } 18 | 19 | fn test_expr(input: &str, expected: &str) { 20 | let expr = parse_expression(input); 21 | 22 | let out_expr = expr.visit_mut(&mut OptimizationVisitor::default()); 23 | 24 | assert_eq!(expected, out_expr.to_string()); 25 | } 26 | 27 | #[test] 28 | fn test_unary() { 29 | test_expr("!FALSE", "TRUE"); 30 | test_expr("!TRUE", "FALSE"); 31 | test_expr("!!FALSE", "FALSE"); 32 | test_expr("!!TRUE", "TRUE"); 33 | test_expr("+5", "5"); 34 | } 35 | 36 | #[test] 37 | fn test_binary() { 38 | test_expr("FALSE & A", "FALSE"); 39 | test_expr("TRUE | A", "TRUE"); 40 | 41 | test_expr("TRUE & A", "A"); 42 | test_expr("FALSE | A", "A"); 43 | 44 | test_expr("0 < 1", "TRUE"); 45 | test_expr("0 > 1", "FALSE"); 46 | 47 | test_expr("(0 > 1) & (A < B | B > C)", "FALSE"); 48 | } 49 | -------------------------------------------------------------------------------- /doc/qwk/CONFIG.TXT: -------------------------------------------------------------------------------- 1 | 2 | 3 | New (04/91) format for configuration messages 4 | 5 | To: QMAIL (or whatever) 6 | Subject: CONFIG 7 | 8 | Text has one command per line with the following options: 9 | 10 | ADD adds a conference 11 | DROP drops a conference 12 | RESET resets message pointer to value or 13 | can use HIGH-xxx 14 | CITY changes bbs user city 15 | PASSWORD changes bbs user password 16 | BPHONE changes bbs user business/data phone 17 | HPHONE changes bbs user home/voice phone 18 | PCBEXPERT [ON|OFF] turns bbs user expert mode on or off 19 | PCBPROT sets bbs user protocol to char (A thru Z) 20 | PCBCOMMENT sets bbs user comment 21 | PAGELEN sets bbs use pagelength 22 | PROTOCOL sets QWK door protocol to char (A thru Z) 23 | EXPERT [ON|OFF] sets QWK door expert mode on or off 24 | MAXSIZE sets maximum QWK size in bytes 25 | MAXNUMBER sets maximum msgs per conference 26 | AUTOSTART QWK door autostart 27 | 28 | -------------------------------------------------------------------------------- /doc/qwk/qwk11/CONFIG.TXT: -------------------------------------------------------------------------------- 1 | 2 | 3 | New (04/91) format for configuration messages 4 | 5 | To: QMAIL (or whatever) 6 | Subject: CONFIG 7 | 8 | Text has one command per line with the following options: 9 | 10 | ADD adds a conference 11 | DROP drops a conference 12 | RESET resets message pointer to value or 13 | can use HIGH-xxx 14 | CITY changes bbs user city 15 | PASSWORD changes bbs user password 16 | BPHONE changes bbs user business/data phone 17 | HPHONE changes bbs user home/voice phone 18 | PCBEXPERT [ON|OFF] turns bbs user expert mode on or off 19 | PCBPROT sets bbs user protocol to char (A thru Z) 20 | PCBCOMMENT sets bbs user comment 21 | PAGELEN sets bbs use pagelength 22 | PROTOCOL sets QWK door protocol to char (A thru Z) 23 | EXPERT [ON|OFF] sets QWK door expert mode on or off 24 | MAXSIZE sets maximum QWK size in bytes 25 | MAXNUMBER sets maximum msgs per conference 26 | AUTOSTART QWK door autostart 27 | 28 | -------------------------------------------------------------------------------- /icy_ppe/src/ast/expression_depth_visitor.rs: -------------------------------------------------------------------------------- 1 | use super::{ 2 | AstVisitor, BinaryExpression, ConstantExpression, FunctionCallExpression, ParensExpression, 3 | PredefinedFunctionCallExpression, UnaryExpression, 4 | }; 5 | 6 | #[derive(Default)] 7 | pub struct ExpressionDepthVisitor {} 8 | 9 | impl AstVisitor for ExpressionDepthVisitor { 10 | fn visit_identifier_expression(&mut self, _: &super::IdentifierExpression) -> usize { 11 | 1 12 | } 13 | 14 | fn visit_constant_expression(&mut self, _: &ConstantExpression) -> usize { 15 | 1 16 | } 17 | 18 | fn visit_binary_expression(&mut self, binary: &BinaryExpression) -> usize { 19 | 1 + binary 20 | .get_left_expression() 21 | .visit(self) 22 | .max(binary.get_right_expression().visit(self)) 23 | } 24 | 25 | fn visit_unary_expression(&mut self, unary: &UnaryExpression) -> usize { 26 | 1 + unary.get_expression().visit(self) 27 | } 28 | 29 | fn visit_predefined_function_call_expression( 30 | &mut self, 31 | _: &PredefinedFunctionCallExpression, 32 | ) -> usize { 33 | 1 34 | } 35 | 36 | fn visit_function_call_expression(&mut self, _: &FunctionCallExpression) -> usize { 37 | 1 38 | } 39 | 40 | fn visit_parens_expression(&mut self, parens: &ParensExpression) -> usize { 41 | 1 + parens.get_expression().visit(self) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /doc/qwk/COMMAND.TXT: -------------------------------------------------------------------------------- 1 | 2 | Old style configuration commands 3 | 4 | To: QMAIL (or whatever) 5 | 6 | Subject contains one of the following commands: 7 | 8 | ADD Add current conference 9 | ADD -20 Add current conference and set lastread pointer 10 | 20 below the end 11 | ADD 9876 Add current conference and set lastread pointer 12 | to message number 9876 13 | DROP Drop current conference 14 | RESET Reset current conference lastread pointer to 15 | the end 16 | RESET -20 Reset current conference lastread pointer to 17 | 20 below the end 18 | RESET 9876 Reset current conference lastread pointer to 19 | message number 9876 20 | BLTS ON Turn bulletins on 21 | BLTS OFF Turn bulletins off 22 | FILES ON Turn new files list on 23 | FILES OFF Turn new files list off 24 | WELCOME ON Turn welcome screen on 25 | WELCOME OFF Turn welcome screen off 26 | GOODBYE ON Turn goodbye screen on 27 | GOODBYE OFF Turn goodbye screen off 28 | 29 | If the subject is CONFIG, see the new format in COMMAND.TXT 30 | for an explanation. 31 | -------------------------------------------------------------------------------- /icy_board_engine/src/test_data/test_constants.pps: -------------------------------------------------------------------------------- 1 | PRINT AUTO,"," 2 | PRINT BELL,"," 3 | PRINT DEFS,"," 4 | PRINT ECHODOTS,"," 5 | PRINT ERASELINE,"," 6 | PRINT FCL,"," 7 | PRINT FIELDLEN,"," 8 | PRINT FNS,"," 9 | PRINT F_EXP,"," 10 | PRINT F_MW,"," 11 | PRINT F_REG,"," 12 | PRINT F_SEL,"," 13 | PRINT F_SYS,"," 14 | PRINT GRAPH,"," 15 | PRINT GUIDE,"," 16 | PRINT HIGHASCII,"," 17 | PRINT LANG,"," 18 | PRINT LFAFTER,"," 19 | PRINT LFBEFORE,"," 20 | PRINT LOGIT,"," 21 | PRINT LOGITLEFT,"," 22 | PRINT NC,"," 23 | PRINT NEWLINE,"," 24 | PRINT NOCLEAR,"," 25 | PRINT O_RD,"," 26 | PRINT O_RW,"," 27 | PRINT O_WR,"," 28 | PRINT SEC,"," 29 | PRINT SEEK_CUR,"," 30 | PRINT SEEK_END,"," 31 | PRINT SEEK_SET,"," 32 | PRINT STACKED,"," 33 | PRINT S_DB,"," 34 | PRINT S_DN,"," 35 | PRINT S_DR,"," 36 | PRINT S_DW,"," 37 | PRINT UPCASE,"," 38 | PRINT WORDWRAP,"," 39 | PRINT YESNO,"," 40 | PRINT START_BAL,"," 41 | PRINT START_SESSION,"," 42 | PRINT DEB_CALL,"," 43 | PRINT DEB_TIME,"," 44 | PRINT DEB_MSGREAD,"," 45 | PRINT DEB_MSGCAP,"," 46 | PRINT DEB_MSGWRITE,"," 47 | PRINT DEB_MSGECHOED,"," 48 | PRINT DEB_MSGPRIVATE,"," 49 | PRINT DEB_DOWNFILE,"," 50 | PRINT DEB_DOWNBYTES,"," 51 | PRINT DEB_CHAT,"," 52 | PRINT DEB_TPU,"," 53 | PRINT DEB_SPECIAL,"," 54 | PRINT CRED_UPFILE,"," 55 | PRINT CRED_UPBYTES,"," 56 | PRINT CRED_SPECIAL,"," 57 | PRINT SEC_DROP,"," 58 | ;; 59 | 8192,2048,0,1,32,2,2,1,2,16,1,4,8,1,4,4096,4,256,128,32768,65536,0,64,1024,0,2,1,2,1,2,0,16,3,0,1,2,8,512,16384,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17, -------------------------------------------------------------------------------- /doc/qwk/qwk11/COMMAND.TXT: -------------------------------------------------------------------------------- 1 | 2 | Old style configuration commands 3 | 4 | To: QMAIL (or whatever) 5 | 6 | Subject contains one of the following commands: 7 | 8 | ADD Add current conference 9 | ADD -20 Add current conference and set lastread pointer 10 | 20 below the end 11 | ADD 9876 Add current conference and set lastread pointer 12 | to message number 9876 13 | DROP Drop current conference 14 | RESET Reset current conference lastread pointer to 15 | the end 16 | RESET -20 Reset current conference lastread pointer to 17 | 20 below the end 18 | RESET 9876 Reset current conference lastread pointer to 19 | message number 9876 20 | BLTS ON Turn bulletins on 21 | BLTS OFF Turn bulletins off 22 | FILES ON Turn new files list on 23 | FILES OFF Turn new files list off 24 | WELCOME ON Turn welcome screen on 25 | WELCOME OFF Turn welcome screen off 26 | GOODBYE ON Turn goodbye screen on 27 | GOODBYE OFF Turn goodbye screen off 28 | 29 | If the subject is CONFIG, see the new format in COMMAND.TXT 30 | for an explanation. 31 | -------------------------------------------------------------------------------- /ppl-lsp/src/reference.rs: -------------------------------------------------------------------------------- 1 | use icy_ppe::{ast::Ast, parser::lexer::Spanned}; 2 | 3 | use icy_ppe::semantic::SemanticVisitor; 4 | 5 | #[derive(Debug, Clone)] 6 | pub enum ReferenceSymbol { 7 | Founded(Spanned), 8 | Founding(usize), 9 | } 10 | pub fn get_reference(ast: &Ast, offset: usize, include_self: bool) -> Vec> { 11 | let mut reference_list = vec![]; 12 | let mut semantic_visitor = SemanticVisitor::default(); 13 | ast.visit(&mut semantic_visitor); 14 | 15 | for (_, refs) in &semantic_visitor.references { 16 | if refs.contains(offset) { 17 | if let Some(decl) = &refs.declaration { 18 | if include_self || !decl.span.contains(&offset) { 19 | reference_list.push(decl.clone()); 20 | } 21 | } 22 | if let Some(decl) = &refs.implementation { 23 | if include_self || !decl.span.contains(&offset) { 24 | reference_list.push(decl.clone()); 25 | } 26 | } 27 | for r in &refs.usages { 28 | if include_self || !r.span.contains(&offset) { 29 | reference_list.push(r.clone()); 30 | } 31 | } 32 | 33 | for r in &refs.return_types { 34 | if include_self || !r.span.contains(&offset) { 35 | reference_list.push(r.clone()); 36 | } 37 | } 38 | } 39 | } 40 | reference_list 41 | } 42 | -------------------------------------------------------------------------------- /icy_board_engine/src/vm/errors.rs: -------------------------------------------------------------------------------- 1 | use icy_ppe::executable::VariableType; 2 | use thiserror::Error; 3 | 4 | #[derive(Error, Debug)] 5 | pub enum IcyError { 6 | #[error("Parameter {0} should be from type String")] 7 | ParameterStringExpected(u32), 8 | 9 | #[error("Parameter {0} should be from type Integer")] 10 | ParameterIntegerExpected(u32), 11 | 12 | #[error("File channel should be 0 <= 7 it was: {0}")] 13 | FileChannelOutOfBounds(i32), 14 | 15 | #[error("{0} should be from type Integer")] 16 | IntegerExpected(String), 17 | 18 | #[error("not supported")] 19 | NotSupported, 20 | 21 | #[error("Variable {0} not found.")] 22 | VariableNotFound(String), 23 | 24 | #[error("User {0} not found.")] 25 | UserNotFound(String), 26 | 27 | #[error("User not set.")] 28 | UserNotSet, 29 | 30 | #[error("Sort dest array should be int, was {0}.")] 31 | SortDestinationArrayIntRequired(VariableType), 32 | 33 | #[error("Error loading file ({0}): {1}")] 34 | ErrorLoadingFile(String, String), 35 | 36 | #[error("File not found ({0})")] 37 | FileNotFound(String), 38 | 39 | #[error("Invalid MNU file ({0}) : {1}")] 40 | InvalidMNU(String, String), 41 | 42 | #[error("Error generating TOML ({0}) : {1}")] 43 | ErrorGeneratingToml(String, String), 44 | 45 | #[error("Error parsing config ({0}) : {1}")] 46 | ErrorParsingConfig(String, String), 47 | 48 | #[error("Error saving file ({0}) : {1}")] 49 | ErrorSavingFile(String, String), 50 | } 51 | -------------------------------------------------------------------------------- /ppl-lsp/webpack.config.js: -------------------------------------------------------------------------------- 1 | //@ts-check 2 | 3 | "use strict"; 4 | 5 | const path = require("path"); 6 | 7 | /**@type {import('webpack').Configuration}*/ 8 | const config = { 9 | target: "webworker", // vscode extensions run in webworker context for VS Code web 📖 -> https://webpack.js.org/configuration/target/#target 10 | 11 | entry: "./client/src/extension.ts", // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/ 12 | output: { 13 | // the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/ 14 | path: path.resolve(__dirname, "dist"), 15 | filename: "extension.js", 16 | libraryTarget: "commonjs2", 17 | devtoolModuleFilenameTemplate: "../[resource-path]", 18 | }, 19 | devtool: "hidden-source-map", 20 | externals: { 21 | vscode: 22 | "commonjs vscode", // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/ 23 | }, 24 | resolve: { 25 | // support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader 26 | mainFields: ["browser", "module", "main"], // look for `browser` entry point in imported node modules 27 | extensions: [".ts", ".js"], 28 | alias: {}, 29 | }, 30 | module: { 31 | rules: [ 32 | { 33 | test: /\.ts$/, 34 | exclude: /node_modules/, 35 | use: [ 36 | { 37 | loader: "ts-loader", 38 | }, 39 | ], 40 | }, 41 | ], 42 | }, 43 | }; 44 | module.exports = config; 45 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | on: 3 | workflow_run: 4 | workflows: ["Run Tests"] 5 | branches: [main] 6 | types: 7 | - completed 8 | env: 9 | APP_NAME: ppl_engine 10 | CARGO_TERM_COLOR: always 11 | jobs: 12 | build_linux: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v3 16 | - name: Build 17 | run: | 18 | export VERSION="$(cargo get package.version)" 19 | echo "VERSION=$VERSION" >> $GITHUB_ENV 20 | cargo build --release 21 | - name: 'Upload deb' 22 | uses: actions/upload-artifact@v3 23 | with: 24 | name: ${{ env.APP_NAME }}_linux_${{ env.VERSION }} 25 | path: | 26 | ./target/release/ppld 27 | ./target/release/pplc 28 | ./target/release/pplx 29 | file_id.diz 30 | 31 | build_windows: 32 | runs-on: windows-latest 33 | steps: 34 | - uses: actions/checkout@v3 35 | - name: Build exe 36 | run: | 37 | $VERSION=$(cargo pkgid | foreach-object { $_ -replace '(.*)#','' }) 38 | echo "Version: $VERSION" 39 | cargo build --release 40 | - name: Copy exe 41 | run: | 42 | cp ".\target\release\ppld.exe" . 43 | cp ".\target\release\pplc.exe" . 44 | cp ".\target\release\pplx.exe" . 45 | - name: 'Upload plain exe' 46 | uses: actions/upload-artifact@v3 47 | with: 48 | name: ${{ env.APP_NAME }}_${{ env.VERSION }}_windows_exe 49 | path: | 50 | .\ppld.exe 51 | .\pplc.exe 52 | .\pplx.exe 53 | file_id.diz 54 | -------------------------------------------------------------------------------- /icy_board_engine/src/icy_board/bulletins.rs: -------------------------------------------------------------------------------- 1 | use std::{ 2 | ops::{Deref, DerefMut}, 3 | path::PathBuf, 4 | }; 5 | 6 | use icy_ppe::{tables::import_cp437_string, Res}; 7 | use serde::{Deserialize, Serialize}; 8 | 9 | use super::{is_null_8, IcyBoardSerializer, PCBoardRecordImporter}; 10 | 11 | #[derive(Serialize, Deserialize, Default)] 12 | pub struct Bullettin { 13 | pub file: PathBuf, 14 | 15 | #[serde(default)] 16 | #[serde(skip_serializing_if = "is_null_8")] 17 | pub required_security: u8, 18 | } 19 | 20 | #[derive(Serialize, Deserialize, Default)] 21 | pub struct BullettinList { 22 | #[serde(rename = "bullettin")] 23 | pub bullettins: Vec, 24 | } 25 | 26 | impl Deref for BullettinList { 27 | type Target = Vec; 28 | fn deref(&self) -> &Self::Target { 29 | &self.bullettins 30 | } 31 | } 32 | 33 | impl DerefMut for BullettinList { 34 | fn deref_mut(&mut self) -> &mut Self::Target { 35 | &mut self.bullettins 36 | } 37 | } 38 | 39 | impl IcyBoardSerializer for BullettinList { 40 | const FILE_TYPE: &'static str = "bullettins"; 41 | } 42 | 43 | pub const MASK_BULLETINS: &str = "0123456789ADGHLNRS"; 44 | 45 | impl PCBoardRecordImporter for BullettinList { 46 | const RECORD_SIZE: usize = 30; 47 | 48 | fn push(&mut self, value: Bullettin) { 49 | self.bullettins.push(value); 50 | } 51 | 52 | fn load_pcboard_record(data: &[u8]) -> Res { 53 | let file_name = import_cp437_string(data, true); 54 | Ok(Bullettin { 55 | file: PathBuf::from(file_name), 56 | required_security: 0, 57 | }) 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /doc/qwk/FILENAME.TXT: -------------------------------------------------------------------------------- 1 | 2 | 3 | Filenames used by the *.QWK format 4 | 5 | BBSID.QWK is an archive containing the files from the 6 | message door being sent to the caller. 7 | 8 | MESSAGES.DAT - a file containing the messages themselves 9 | in 128 byte records. 10 | 11 | CONTROL.DAT - a file with info on the system, caller, and 12 | conference names and numbers. 13 | 14 | 999.NDX - one file for each selected conference that 15 | contains pointers to the messages in MESSAGES.DAT 16 | There are usually several *.NDX files in each 17 | QWK file. (Right justified, padded with leading 18 | zeros to make the 3 characters). 19 | 20 | NEWFILES.DAT - an optional file that contains a list 21 | of new files from the Bbs. 22 | 23 | BLT-0.99 - optional files containing ascii or ansi 24 | bulletins. The 99 extension is replaced by the 25 | bulletin number (Left justified not padded). 26 | 27 | SESSION.TXT - an optional ascii/ansi file containing 28 | info on the activity occuring in the mail door. 29 | 30 | Optionally it may also contain ascii or ansi screens for 31 | Welcome, News, and Goodbye as named in the CONTROL.DAT 32 | file. 33 | 34 | BBSID.REP is an archive containing a single file of the 35 | messages sent from the caller to the Bbs. 36 | 37 | BBSID.MSG - a file containing the messages themselves 38 | in 128 byte records. The format is similar to 39 | MESSAGES.DAT. 40 | -------------------------------------------------------------------------------- /doc/qwk/qwk11/QWKINFO.TXT: -------------------------------------------------------------------------------- 1 | 2 | 3 | QWK mail format information 4 | 5 | By Mark May - Mythical Kingdom Software 6 | 7 | While writing a QWK utility, I found that there was no 8 | one place where all the necessary info on the QWK format 9 | was available. Thru messages in several network echo 10 | conferences (Thanks to Tim Farley, Mark Goodwin, Randy 11 | Blackmond, Mark Herring, Patrick Lee, Greg Hewgill, and 12 | others), I gradually collected the information enclosed 13 | in this archive. 14 | 15 | To save others the time collecting this information, I've 16 | put together this set of files by editing the information 17 | from the various sources so that it is conveniently 18 | available. 19 | 20 | Tim Farley is working on a more rigorous specification and 21 | I'm sure all of us would appreciate any help you can give 22 | him in this. If you find any errors or additional 23 | information, I'd also appreciate hearing about it so that 24 | I can further update this set of files. 25 | 26 | You may contact me at: 27 | 28 | Fido - 1:110/290 29 | RIME - ->MYTHKING 30 | Normal Bbs 513-237-7737 (at 9600 HST/V32) 31 | 32 | You may also contact me in the P/Net (programmers network) 33 | Bbs/Utils developers conference. 34 | 35 | 36 | Changes: 37 | 38 | v1.1 08/17/91 Added information on Door.Id 39 | Added info on conferences above 255 40 | Added info on message has tagline field 41 | Corrected info on message status values 42 | 43 | v1.0 05/28/91 Initial release 44 | -------------------------------------------------------------------------------- /icy_board_engine/src/icy_board/surveys.rs: -------------------------------------------------------------------------------- 1 | use std::{ 2 | ops::{Deref, DerefMut}, 3 | path::PathBuf, 4 | }; 5 | 6 | use icy_ppe::Res; 7 | use serde::{Deserialize, Serialize}; 8 | 9 | use super::{is_null_8, IcyBoardSerializer, PCBoardRecordImporter}; 10 | 11 | /// A survey is a question and answer pair. 12 | /// PCBoard calles them "Questionnairies" but we call them surveys. 13 | #[derive(Serialize, Deserialize, Default)] 14 | pub struct Survey { 15 | pub question_file: PathBuf, 16 | pub answer_file: PathBuf, 17 | 18 | #[serde(default)] 19 | #[serde(skip_serializing_if = "is_null_8")] 20 | pub required_security: u8, 21 | } 22 | 23 | #[derive(Serialize, Deserialize, Default)] 24 | pub struct SurveyList { 25 | #[serde(rename = "survey")] 26 | surveys: Vec, 27 | } 28 | 29 | impl Deref for SurveyList { 30 | type Target = Vec; 31 | fn deref(&self) -> &Self::Target { 32 | &self.surveys 33 | } 34 | } 35 | 36 | impl DerefMut for SurveyList { 37 | fn deref_mut(&mut self) -> &mut Self::Target { 38 | &mut self.surveys 39 | } 40 | } 41 | 42 | impl PCBoardRecordImporter for SurveyList { 43 | const RECORD_SIZE: usize = 60; 44 | 45 | fn push(&mut self, value: Survey) { 46 | self.surveys.push(value); 47 | } 48 | 49 | fn load_pcboard_record(data: &[u8]) -> Res { 50 | let question_file = PathBuf::from(icy_ppe::tables::import_cp437_string( 51 | &data[..Self::RECORD_SIZE / 2], 52 | true, 53 | )); 54 | let answer_file = PathBuf::from(icy_ppe::tables::import_cp437_string( 55 | &data[Self::RECORD_SIZE / 2..], 56 | true, 57 | )); 58 | Ok(Survey { 59 | question_file, 60 | answer_file, 61 | required_security: 0, 62 | }) 63 | } 64 | } 65 | 66 | impl IcyBoardSerializer for SurveyList { 67 | const FILE_TYPE: &'static str = "surveys"; 68 | } 69 | -------------------------------------------------------------------------------- /doc/qwk/qwk11/DOORID.TXT: -------------------------------------------------------------------------------- 1 | 2 | 3 | DOOR.ID 4 | 5 | Many maildoors now produce (and readers use) a file called 6 | Door.Id that was developed by Greg Hewgill. It is intended 7 | to give the reader information on the capabilities of the 8 | door that produced the packet (and presumably will process 9 | the *.REP produced). It is a straight text file with the 10 | following format. Each line is in the format ControlWord 11 | space equals space value. 12 | 13 | 14 | DOOR = 15 | This is the name of the door that created the QWK 16 | packet, eg. = Tomcat. 17 | 18 | VERSION = 19 | This is the version number of the door that created 20 | the packet, eg. = 2.9. 21 | 22 | SYSTEM = 23 | This is the underlying BBS system type and version, 24 | eg. = Wildcat 2.55. 25 | 26 | CONTROLNAME = 27 | This is the name to which the reader should send 28 | control messages, eg. = TOMCAT. 29 | 30 | CONTROLTYPE = 31 | This can be one of ADD, DROP, or REQUEST (or others). 32 | ADD and DROP are pretty obvious (they work as in 33 | Markmail), and REQUEST is for use with BBS systems 34 | that support file attachments. Try out SLMR with 35 | CONTROLTYPE = REQUEST and use the Q function. 36 | 37 | RECEIPT 38 | This flag indicates that the door/BBS is capable of 39 | return receipts when a message is received. If the 40 | first three letters of the subject are RRR, then the 41 | door should strip the RRR and set the 'return-receipt- 42 | requested' flag on the corresponding message. 43 |  -------------------------------------------------------------------------------- /doc/qwk/qwk11/FILENAME.TXT: -------------------------------------------------------------------------------- 1 | 2 | 3 | Filenames used by the *.QWK format 4 | 5 | BBSID.QWK is an archive containing the files from the 6 | message door being sent to the caller. 7 | 8 | MESSAGES.DAT - a file containing the messages themselves 9 | in 128 byte records. 10 | 11 | CONTROL.DAT - a file with info on the system, caller, and 12 | conference names and numbers. 13 | 14 | 999.NDX - one file for each selected conference that 15 | contains pointers to the messages in MESSAGES.DAT 16 | There are usually several *.NDX files in each 17 | QWK file. (Right justified, padded with leading 18 | zeros to make the 3 characters). 19 | 20 | NEWFILES.DAT - an optional file that contains a list 21 | of new files from the Bbs. 22 | 23 | BLT-0.99 - optional files containing ascii or ansi 24 | bulletins. The 99 extension is replaced by the 25 | bulletin number (Left justified not padded). 26 | 27 | DOOR.ID - an optional text file that contains info 28 | on the capabilities of the door that produced the 29 | QWK packet (so that the reader will only send 30 | control messages that can be handled). 31 | 32 | SESSION.TXT - an optional ascii/ansi file containing 33 | info on the activity occuring in the mail door. 34 | 35 | Optionally it may also contain ascii or ansi screens for 36 | Welcome, News, and Goodbye as named in the CONTROL.DAT 37 | file. 38 | 39 | BBSID.REP is an archive containing a single file of the 40 | messages sent from the caller to the Bbs. 41 | 42 | BBSID.MSG - a file containing the messages themselves 43 | in 128 byte records. The format is similar to 44 | MESSAGES.DAT. 45 | -------------------------------------------------------------------------------- /ppl-lsp/i18n/de/ppl_language_server.ftl: -------------------------------------------------------------------------------- 1 | hint-type-boolean= 2 | BOOLEAN 3 | 4 | Unsigned Char (1 Byte) 0 = FALSCH, sonst TRUE 5 | hint-type-date= 6 | DATE 7 | 8 | Unsigned Integer (2 Bytes) PCBoard julianisches Datum (Anzahl der Tage seit 1/1/1900) 9 | hint-type-ddate= 10 | DDATE 11 | 12 | Long Int mit Vorzeichen für julianisches Datum. DDATE ist für die Verwendung mit DBase-Datumsfeldern. 13 | Es hält einen langen Integer für julianische Daten. Wenn es in den Zeichenfolgentyp gezwungen wird, ist es im Format CCYYMMDD oder 19940527 14 | hint-type-integer= 15 | INTEGER / SDWORD / LONG 16 | 17 | Signed long Integer (4 Bytes) Bereich: -2,147,483,648 → +2,147,483,647 18 | hint-type-money= 19 | MONEY 20 | 21 | Signed long Integer (4 Bytes) Bereich: -$21,474,836.48 → +$21,474,836.47 22 | hint-type-string= 23 | STRING 24 | 25 | Zeichenfolge mit maximaler Länge von 256 Zeichen 26 | hint-type-time= 27 | TIME 28 | 29 | Signed long Integer (4 Bytes) Anzahl der Sekunden seit Mitternacht 30 | hint-type-bigstr= 31 | BIGSTR 32 | 33 | Zeichenfolge mit maximaler Länge von 2048 Zeichen. Kann auch CHR(0) Zeichen enthalten. 34 | hint-type-edate= 35 | EDATE 36 | 37 | Julianisches Datum im Earth Datum Format YYMM.DD. Gleicher Bereich wie DATE. 38 | hint-type-float= 39 | REAL / FLOAT 40 | 41 | 4-Byte Fließkommazahl Bereich: +/-3.4E-38 - +/-3.4E+38 (7-Stellen Präzision) 42 | hint-type-double= 43 | DREAL / DOUBLE 44 | 45 | 8-Byte Fließkommazahl Bereich: +/-1.7E-308 - +/-1.7E+308 (15-Stellen Präzision) 46 | hint-type-unsigned= 47 | UNSIGNED / DWORD / UDWORD 48 | 49 | 4-Byte unsigned Integer Bereich: 0 - 4,294,967,295 50 | hint-type-Byte= 51 | Byte / UByte 52 | 53 | 1-Byte unsigned Integer Bereich: 0 - 255 54 | hint-type-word= 55 | WORD / UWORD 56 | 57 | 2-Byte unsigned Integer Bereich: 0 - 65,535 58 | hint-type-sByte= 59 | SByte / SHORT 60 | 61 | 1-Byte signed Integer Bereich: -128 - 127 62 | hint-type-sword= 63 | SWORD / INT 64 | 65 | 2-Byte signed Integer Bereich: -32,768 - 32,767 66 | -------------------------------------------------------------------------------- /doc/qwk/CONTROL.TXT: -------------------------------------------------------------------------------- 1 | 2 | 3 | Format of Control.Dat file 4 | 5 | Control.Dat is a normal CR/LF style text file with the 6 | following lines in exactly the order shown. 7 | 8 | BBS name 9 | BBS City, BBS State 10 | BBS phone number {AAA-EEE-NNNN} 11 | Sysop name,Sysop {Sysop name in upper case followed 12 | by the literal ',Sysop'} 13 | Serial number ,BBS ID {Serial Number, UpperCase BBSID} 14 | Date of mail packet, time of packet {MM-DD-YYYY,HH:MM:SS} 15 | Caller's name {Uppercase} 16 | blank 17 | 0 18 | 0 19 | Number of conferences (in additon to conference 0 which is main) 20 | (ie use number of conferences minus one) 21 | Conference number 22 | Name of Conference (should be limited to maximum length of 12 characters) 23 | ... 24 | ... 25 | ... 26 | ... 27 | ... 28 | Conference number 29 | Name of Conference 30 | name of BBS welcome file 31 | name of NEWS file 32 | name of BBS goodbye file 33 | 34 | Other optional data may occur after the Goodbye file line, but the 35 | trend is to omit this data. If included it is as follows: 36 | 37 | 0 {Unknown} 38 | Screen Length 39 | USER NAME {Upper case} 40 | FirstName {Proper case} 41 | CITY, ST {Upper case} 42 | Data Phone {AAA EEE-NNNN} 43 | Voice Phone {AAA EEE-NNNN} 44 | Security Level 45 | Expiration Date {MM-DD-YY} 46 | Last On Date {MM-DD-YY} 47 | Last On Time {HH:MM} 48 | Number of calls 49 | 0 {Unknown} 50 | DownLoaded Bytes 51 | DownLoaded Count 52 | Uploaded Bytes 53 | Uploaded Count 54 | Time Limit Per Day {Minutes} 55 | Time Remaining {Minutes} 56 | Time Used Today {Minutes} 57 | DownLoad Limit/Day {Kilobytes} 58 | DownLoad Bytes Remaining Today {Bytes} 59 | DownLoaded Today {Bytes} 60 | Current Time {HH:MM} 61 | Current Date {MM-DD-YY} 62 | System Tag Line 63 | -------------------------------------------------------------------------------- /doc/qwk/qwk11/CONTROL.TXT: -------------------------------------------------------------------------------- 1 | 2 | 3 | Format of Control.Dat file 4 | 5 | Control.Dat is a normal CR/LF style text file with the 6 | following lines in exactly the order shown. 7 | 8 | BBS name 9 | BBS City, BBS State 10 | BBS phone number {AAA-EEE-NNNN} 11 | Sysop name,Sysop {Sysop name in upper case followed 12 | by the literal ',Sysop'} 13 | Serial number ,BBS ID {Serial Number, UpperCase BBSID} 14 | Date of mail packet, time of packet {MM-DD-YYYY,HH:MM:SS} 15 | Caller's name {Uppercase} 16 | blank 17 | 0 18 | 0 19 | Number of conferences (in additon to conference 0 which is main) 20 | (ie use number of conferences minus one) 21 | Conference number 22 | Name of Conference (should be limited to maximum length of 12 characters) 23 | ... 24 | ... 25 | ... 26 | ... 27 | ... 28 | Conference number 29 | Name of Conference 30 | name of BBS welcome file 31 | name of NEWS file 32 | name of BBS goodbye file 33 | 34 | Other optional data may occur after the Goodbye file line, but the 35 | trend is to omit this data. If included it is as follows: 36 | 37 | 0 {Unknown} 38 | Screen Length 39 | USER NAME {Upper case} 40 | FirstName {Proper case} 41 | CITY, ST {Upper case} 42 | Data Phone {AAA EEE-NNNN} 43 | Voice Phone {AAA EEE-NNNN} 44 | Security Level 45 | Expiration Date {MM-DD-YY} 46 | Last On Date {MM-DD-YY} 47 | Last On Time {HH:MM} 48 | Number of calls 49 | 0 {Unknown} 50 | DownLoaded Bytes 51 | DownLoaded Count 52 | Uploaded Bytes 53 | Uploaded Count 54 | Time Limit Per Day {Minutes} 55 | Time Remaining {Minutes} 56 | Time Used Today {Minutes} 57 | DownLoad Limit/Day {Kilobytes} 58 | DownLoad Bytes Remaining Today {Bytes} 59 | DownLoaded Today {Bytes} 60 | Current Time {HH:MM} 61 | Current Date {MM-DD-YY} 62 | System Tag Line 63 | -------------------------------------------------------------------------------- /icy_board_engine/src/icy_board/statistics.rs: -------------------------------------------------------------------------------- 1 | use std::path::Path; 2 | 3 | use chrono::Local; 4 | use icy_ppe::{tables::import_cp437_string, Res}; 5 | use serde::{Deserialize, Serialize}; 6 | 7 | use super::{IcyBoardSerializer, PCBoardBinImporter, PCBoardImport}; 8 | 9 | #[derive(Default, Clone, Serialize, Deserialize)] 10 | pub struct UsageStatistics { 11 | pub calls: u64, 12 | pub messages: u64, 13 | pub uploads: u64, 14 | pub uploads_kb: u64, 15 | pub downloads: u64, 16 | pub downloads_kb: u64, 17 | } 18 | 19 | #[derive(Default, Serialize, Deserialize)] 20 | pub struct Statistics { 21 | pub last_callers: Vec, 22 | pub last_caller: String, 23 | pub today: UsageStatistics, 24 | pub total: UsageStatistics, 25 | } 26 | 27 | impl Statistics {} 28 | 29 | impl IcyBoardSerializer for Statistics { 30 | const FILE_TYPE: &'static str = "statistics"; 31 | } 32 | 33 | impl PCBoardBinImporter for Statistics { 34 | const SIZE: usize = 100; 35 | 36 | fn import_data(data: &[u8]) -> Res { 37 | const LAST_CALLER_LEN: usize = 54; 38 | const TIME_LEN: usize = 6; 39 | 40 | let last_caller = import_cp437_string(&data[0..LAST_CALLER_LEN], true); 41 | 42 | // let time = String::from_utf8_lossy(&data[LAST_CALLER_LEN..LAST_CALLER_LEN+TIME_LEN]).to_string(); 43 | 44 | let i = LAST_CALLER_LEN + TIME_LEN; 45 | let new_msgs = i32::from_le_bytes([data[i], data[i + 1], data[i + 2], data[i + 3]]); 46 | let new_calls = i32::from_le_bytes([data[i + 4], data[i + 5], data[i + 6], data[i + 7]]); 47 | let total_up = i32::from_le_bytes([data[i + 8], data[i + 9], data[i + 10], data[i + 11]]); 48 | let total_dn = i32::from_le_bytes([data[i + 12], data[i + 13], data[i + 14], data[i + 15]]); 49 | let mut res = Statistics::default(); 50 | res.last_callers.push(last_caller); 51 | res.last_caller = Local::now().to_rfc3339(); 52 | res.total.calls = new_calls as u64; 53 | res.total.messages = new_msgs as u64; 54 | res.total.uploads_kb = total_up as u64; 55 | res.total.downloads_kb = total_dn as u64; 56 | Ok(res) 57 | } 58 | } 59 | 60 | impl PCBoardImport for Statistics { 61 | fn import_pcboard>(path: &P) -> Res { 62 | PCBoardBinImporter::import_pcboard(path) 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /ppl-lsp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ppl-language-server", 3 | "description": "nano rust language server", 4 | "license": "MIT", 5 | "version": "1.5.0", 6 | "categories": [], 7 | "keywords": [ 8 | "language-server", 9 | "tower-lsp" 10 | ], 11 | "repository": { 12 | "url": "https://github.com/IWANABETHATGUY/tower-lsp-boilerplate" 13 | }, 14 | "engines": { 15 | "vscode": "^1.66.0" 16 | }, 17 | "enabledApiProposals": [], 18 | "activationEvents": [ 19 | "onLanguage:ppl" 20 | ], 21 | "main": "./dist/extension.js", 22 | "contributes": { 23 | "languages": [ 24 | { 25 | "id": "ppl", 26 | "extensions": [ 27 | ".pps" 28 | ] 29 | } 30 | ], 31 | "configuration": { 32 | "type": "object", 33 | "title": "ppl-language-server", 34 | "properties": { 35 | "ppl-language-server.trace.server": { 36 | "type": "string", 37 | "scope": "window", 38 | "enum": [ 39 | "off", 40 | "messages", 41 | "verbose" 42 | ], 43 | "enumDescriptions": [ 44 | "No traces", 45 | "Error only", 46 | "Full log" 47 | ], 48 | "default": "off", 49 | "description": "Traces the communication between VS Code and the language server." 50 | } 51 | } 52 | } 53 | }, 54 | "scripts": { 55 | "postinstall": "cd client && pnpm i", 56 | "vscode:prepublish": "npm run esbuild-base -- --minify", 57 | "esbuild-base": "esbuild ./client/src/extension.ts --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node", 58 | "esbuild": "npm run esbuild-base -- --sourcemap", 59 | "esbuild-watch": "npm run esbuild-base -- --sourcemap --watch", 60 | "test-compile": "tsc -p ./", 61 | "compile": "cross-env NODE_ENV=production tsc -b", 62 | "watch": "rm -rf dist && tsc -b -w", 63 | "lint": "eslint src --ext ts", 64 | "pretest": "npm run compile && npm run lint", 65 | "test": "node ./out/test/runTest.js", 66 | "build": "webpack --config webpack.config.js", 67 | "package": "vsce package --no-dependencies", 68 | "publish": "vsce publish --no-dependencies" 69 | }, 70 | "devDependencies": { 71 | "@types/glob": "^7.1.3", 72 | "@types/mocha": "^8.0.0", 73 | "@types/node": "^12.12.0", 74 | "@types/vscode": "^1.44.0", 75 | "@typescript-eslint/eslint-plugin": "^3.8.0", 76 | "@typescript-eslint/parser": "^3.8.0", 77 | "cross-env": "^7.0.2", 78 | "electron-rebuild": "^1.11.0", 79 | "esbuild": "^0.15.10", 80 | "eslint": "^7.6.0", 81 | "glob": "^7.1.7", 82 | "mocha": "^8.0.1", 83 | "typescript": "^4.4.3", 84 | "vscode-test": "^1.4.0", 85 | "vscode-uri": "^3.0.2", 86 | "webpack": "^5.82.1" 87 | }, 88 | "dependencies": { 89 | "vscode-languageclient": "^8.0.2" 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /icy_ppe/src/decompiler/rename_visitor.rs: -------------------------------------------------------------------------------- 1 | use std::collections::HashMap; 2 | 3 | use crate::{ 4 | ast::{walk_for_stmt, AstVisitor, Expression}, 5 | executable::OpCode, 6 | }; 7 | 8 | #[derive(Default)] 9 | pub struct RenameScanVistitor { 10 | pub rename_map: HashMap, unicase::Ascii>, 11 | cur_index_var: usize, 12 | file_names: usize, 13 | x_coords: usize, 14 | y_coords: usize, 15 | } 16 | 17 | const INDEX_VARS: [&str; 4] = ["i", "j", "k", "l"]; 18 | 19 | impl AstVisitor<()> for RenameScanVistitor { 20 | fn visit_for_statement(&mut self, for_stmt: &crate::ast::ForStatement) { 21 | let var_name = for_stmt.get_identifier(); 22 | if !self.rename_map.contains_key(var_name) && self.cur_index_var < INDEX_VARS.len() { 23 | self.rename_map.insert( 24 | var_name.clone(), 25 | unicase::Ascii::new(INDEX_VARS[self.cur_index_var].to_string()), 26 | ); 27 | self.cur_index_var += 1; 28 | } 29 | walk_for_stmt(self, for_stmt); 30 | } 31 | 32 | fn visit_predefined_call_statement(&mut self, call: &crate::ast::PredefinedCallStatement) { 33 | match &call.get_func().opcode { 34 | OpCode::ANSIPOS => { 35 | if let Expression::Identifier(id) = &call.get_arguments()[0] { 36 | let var_name = id.get_identifier(); 37 | if !self.rename_map.contains_key(var_name) { 38 | self.x_coords += 1; 39 | self.rename_map.insert( 40 | var_name.clone(), 41 | unicase::Ascii::new(format!("X{}", self.x_coords)), 42 | ); 43 | } 44 | } 45 | if let Expression::Identifier(id) = &call.get_arguments()[1] { 46 | let var_name = id.get_identifier(); 47 | if !self.rename_map.contains_key(var_name) { 48 | self.y_coords += 1; 49 | self.rename_map.insert( 50 | var_name.clone(), 51 | unicase::Ascii::new(format!("Y{}", self.y_coords)), 52 | ); 53 | } 54 | } 55 | } 56 | OpCode::FOPEN | OpCode::DELETE | OpCode::DISPFILE => { 57 | if let Expression::Identifier(id) = &call.get_arguments()[0] { 58 | let var_name = id.get_identifier(); 59 | if !self.rename_map.contains_key(var_name) { 60 | self.file_names += 1; 61 | self.rename_map.insert( 62 | var_name.clone(), 63 | unicase::Ascii::new(format!("fileName{}", self.file_names)), 64 | ); 65 | } 66 | } 67 | } 68 | _ => {} 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /ppl-lsp/data/FUNCS: -------------------------------------------------------------------------------- 1 | WHILE 2 | END 3 | CLS 4 | CLREOL 5 | MORE 6 | WAIT 7 | COLOR 8 | GOTO 9 | LET 10 | PRINT 11 | PRINTLN 12 | IF 13 | CONFFLAG 14 | CONFUNFLAG 15 | DISPFILE 16 | INPUT 17 | FCREATE 18 | FOPEN 19 | FAPPEND 20 | FCLOSE 21 | FGET 22 | FPUT 23 | FPUTLN 24 | RESETDISP 25 | STARTDISP 26 | FPUTPAD 27 | HANGUP 28 | GETUSER 29 | PUTUSER 30 | DEFCOLOR 31 | DELETE 32 | DELUSER 33 | ADJTIME 34 | LOG 35 | INPUTSTR 36 | INPUTYN 37 | INPUTMONEY 38 | INPUTINT 39 | INPUTCC 40 | INPUTDATE 41 | INPUTTIME 42 | GOSUB 43 | RETURN 44 | PROMPTSTR 45 | DTRON 46 | DTROFF 47 | CDCHKON 48 | CDCHKOFF 49 | DELAY 50 | SENDMODEM 51 | INC 52 | DEC 53 | NEWLINE 54 | NEWLINES 55 | TOKENIZE 56 | GETTOKEN 57 | SHELL 58 | DISPTEXT 59 | STOP 60 | INPUTTEXT 61 | BEEP 62 | PUSH 63 | POP 64 | KBDSTUFF 65 | CALL 66 | JOIN 67 | QUEST 68 | BLT 69 | DIR 70 | KBDFILE 71 | BYE 72 | GOODBYE 73 | BROADCAST 74 | WAITFOR 75 | KBDCHKON 76 | KBDCHKOFF 77 | OPTEXT 78 | DISPSTR 79 | RDUNET 80 | WRUNET 81 | DOINTR 82 | VARSEG 83 | VAROFF 84 | POKEB 85 | POKEW 86 | VARADDR 87 | ANSIPOS 88 | BACKUP 89 | FORWARD 90 | FRESHLINE 91 | WRUSYS 92 | RDUSYS 93 | NEWPWD 94 | OPENCAP 95 | CLOSECAP 96 | MESSAGE 97 | SAVESCRN 98 | RESTSCRN 99 | SOUND 100 | CHAT 101 | SPRINT 102 | SPRINTLN 103 | MPRINT 104 | MPRINTLN 105 | RENAME 106 | FREWIND 107 | POKEDW 108 | DBGLEVEL 109 | SHOWON 110 | SHOWOFF 111 | PAGEON 112 | PAGEOFF 113 | FSEEK 114 | FFLUSH 115 | FREAD 116 | FWRITE 117 | FDEFIN 118 | FDEFOUT 119 | FDGET 120 | FDPUT 121 | FDPUTLN 122 | FDPUTPAD 123 | FDREAD 124 | FDWRITE 125 | ADJBYTES 126 | KBDSTRING 127 | ALIAS 128 | REDIM 129 | APPEND 130 | COPY 131 | KBDFLUSH 132 | MDMFLUSH 133 | KEYFLUSH 134 | LASTIN 135 | FLAG 136 | DOWNLOAD 137 | WRUSYSDOOR 138 | GETALTUSER 139 | ADJDBYTES 140 | ADJTBYTES 141 | ADJTFILES 142 | LANG 143 | SORT 144 | MOUSEREG 145 | SCRFILE 146 | SEARCHINIT 147 | SEARCHFIND 148 | SEARCHSTOP 149 | PRFOUND 150 | PRFOUNDLN 151 | TPAGET 152 | TPAPUT 153 | TPACGET 154 | TPACPUT 155 | TPAREAD 156 | TPAWRITE 157 | TPACREAD 158 | TPACWRITE 159 | BITSET 160 | BITCLEAR 161 | BRAG 162 | FREALTUSER 163 | SETLMR 164 | SETENV 165 | FCLOSEALL 166 | DECLARE 167 | FUNCTION 168 | PROCEDURE 169 | PCALL 170 | FPCLR 171 | BEGIN 172 | FEND 173 | STATIC 174 | STACKABORT 175 | DCREATE 176 | DOPEN 177 | DCLOSE 178 | DSETALIAS 179 | DPACK 180 | DCLOSEALL 181 | DLOCK 182 | DLOCKR 183 | DLOCKG 184 | DUNLOCK 185 | DNCREATE 186 | DNOPEN 187 | DNCLOSE 188 | DNCLOSEALL 189 | DNEW 190 | DADD 191 | DAPPEND 192 | DTOP 193 | DGO 194 | DBOTTOM 195 | DSKIP 196 | DBLANK 197 | DDELETE 198 | DRECALL 199 | DTAG 200 | DSEEK 201 | DFBLANK 202 | DGET 203 | DPUT 204 | DFCOPY 205 | EVAL 206 | ACCOUNT 207 | RECORDUSAGE 208 | MSGTOFILE 209 | QWKLIMITS 210 | COMMAND 211 | USELMRS 212 | CONFINFO 213 | ADJTUBYTES 214 | GRAFMODE 215 | ADDUSER 216 | KILLMSG 217 | CHDIR 218 | MKDIR 219 | REDIR 220 | FDOWRAKA 221 | FDOADDAKA 222 | FDOWRORG 223 | FDOADDORG 224 | FDOQMOD 225 | FDOQADD 226 | FDOQDEL 227 | SOUNDDELAY 228 | ShortDesc 229 | MoveMsg 230 | SetBankBal -------------------------------------------------------------------------------- /icy_ppe/src/ast/constants.dat: -------------------------------------------------------------------------------- 1 | TRUE, 0x01, General 2 | FALSE, 0x00, General 3 | STK_LIMIT, 6022 + 1024, General 4 | 5 | ATTACH_LIM_P, 0x03, General 6 | ATTACH_LIM_U, 0x02, General 7 | ACC_CUR_BAL, 0x04, General 8 | F_NET, 0x20, General 9 | CMAXMSGS, 0x01, General 10 | MAXMSGS, 0x00, General 11 | 12 | CUR_USER, 0, General 13 | NO_USER, -1, General 14 | 15 | ACC_STAT, 0x00, Account 16 | ACC_TIME, 0x01, Account 17 | ACC_MSGREAD, 0x02, Account 18 | ACC_MSGWRITE, 0x03, Account 19 | 20 | DEFS, 0x00, DispText+InputStr 21 | BELL, 0x00800, DispText 22 | LOGIT, 0x08000, DispText 23 | LOGITLEFT, 0x10000, DispText 24 | 25 | AUTO, 0x02000, InputStr 26 | ECHODOTS, 0x00001, InputStr 27 | ERASELINE, 0x00020, InputStr 28 | FIELDLEN, 0x00002, InputStr 29 | GUIDE, 0x00004, InputStr 30 | HIGHASCII, 0x01000, InputStr 31 | LFAFTER, 0x00100, InputStr+DispText 32 | LFBEFORE, 0x00080, InputStr+DispText 33 | NEWLINE, 0x00040, InputStr+DispText 34 | NOCLEAR, 0x00400, InputStr 35 | STACKED, 0x00010, InputStr 36 | UPCASE, 0x00008, InputStr 37 | WORDWRAP, 0x00200, InputStr 38 | YESNO, 0x04000, InputStr 39 | 40 | NEWBALANCE, 0x00, PcbAccount 41 | CHRG_CALL, 0x01, PcbAccount 42 | CHRG_TIME, 0x02, PcbAccount 43 | CHRG_PEAKTIME, 0x03, PcbAccount 44 | CHRG_CHAT, 0x04, PcbAccount 45 | CHRG_MSGREAD, 0x05, PcbAccount 46 | CHRG_MSGCAP, 0x06, PcbAccount 47 | CHRG_MSGWRITE, 0x07, PcbAccount 48 | CHRG_MSGECHOED, 0x08, PcbAccount 49 | CHRG_MSGPRIVATE, 0x09, PcbAccount 50 | CHRG_DOWNFILE, 0x0A, PcbAccount 51 | CHRG_DOWNBYTES, 0x0B, PcbAccount 52 | PAY_UPFILE, 0x0C, PcbAccount 53 | PAY_UPBYTES, 0x0D, PcbAccount 54 | WARNLEVEL, 0x0E, PcbAccount 55 | 56 | CRC_FILE, 0x01, Crc 57 | CRC_STR, 0x00, Crc 58 | 59 | START_BAL, 0x00, Account 60 | START_SESSION, 0x01, Account 61 | DEB_CALL, 0x02, Account 62 | DEB_TIME, 0x03, Account 63 | DEB_MSGREAD, 0x04, Account 64 | DEB_MSGCAP, 0x05, Account 65 | DEB_MSGWRITE, 0x06, Account 66 | DEB_MSGECHOED, 0x07, Account 67 | DEB_MSGPRIVATE, 0x08, Account 68 | DEB_DOWNFILE, 0x09, Account 69 | DEB_DOWNBYTES, 0x0A, Account 70 | DEB_CHAT, 0x0B, Account 71 | DEB_TPU, 0x0C, Account 72 | DEB_SPECIAL, 0x0D, Account 73 | CRED_UPFILE, 0x0E, Account 74 | CRED_UPBYTES, 0x0F, Account 75 | CRED_SPECIAL, 0x10, Account 76 | SEC_DROP, 0x11, Account 77 | 78 | F_EXP, 0x02, ConfFlag 79 | F_MW, 0x10, ConfFlag 80 | F_REG, 0x01, ConfFlag 81 | F_SEL, 0x04, ConfFlag 82 | F_SYS, 0x08, ConfFlag 83 | 84 | FCL, 0x02, StartDisp 85 | FNS, 0x01, StartDisp 86 | NC, 0x00, StartDisp 87 | 88 | GRAPH, 0x01, DispFile 89 | SEC, 0x02, DispFile 90 | LANG, 0x04, DispFile 91 | 92 | HDR_ACTIVE, 0x0E, ScanMsgHdr 93 | HDR_BLOCKS, 0x04, ScanMsgHdr 94 | HDR_DATE, 0x05, ScanMsgHdr 95 | HDR_ECHO, 0x0F, ScanMsgHdr 96 | HDR_FROM, 0x0B, ScanMsgHdr 97 | HDR_MSGNUM, 0x02, ScanMsgHdr 98 | HDR_MSGREF, 0x03, ScanMsgHdr 99 | HDR_PWD, 0x0D, ScanMsgHdr 100 | HDR_REPLY, 0x0A, ScanMsgHdr 101 | HDR_RPLYDATE, 0x08, ScanMsgHdr 102 | HDR_RPLYTIME, 0x09, ScanMsgHdr 103 | HDR_STATUS, 0x01, ScanMsgHdr 104 | HDR_SUBJ, 0x0C, ScanMsgHdr 105 | HDR_TIME, 0x06, ScanMsgHdr 106 | HDR_TO, 0x07, ScanMsgHdr 107 | 108 | O_RD, 0x00, FileAccess 109 | O_RW, 0x02, FileAccess 110 | O_WR, 0x01, FileAccess 111 | 112 | SEEK_CUR, 0x01, FileSeek 113 | SEEK_END, 0x02, FileSeek 114 | SEEK_SET, 0x00, FileSeek 115 | 116 | S_DB, 0x03, FileSec 117 | S_DN, 0x00, FileSec 118 | S_DR, 0x01, FileSec 119 | S_DW, 0x02, FileSec 120 | -------------------------------------------------------------------------------- /icy_ppe/src/parser/declaration_tests.rs: -------------------------------------------------------------------------------- 1 | use std::path::PathBuf; 2 | 3 | use crate::{ 4 | ast::{ 5 | AstNode, FunctionDeclarationAstNode, ParameterSpecifier, ProcedureDeclarationAstNode, 6 | VariableSpecifier, 7 | }, 8 | executable::{VariableType, LAST_PPLC}, 9 | }; 10 | 11 | use super::{Encoding, Parser}; 12 | 13 | fn parse_ast_node(input: &str, assert_eof: bool) -> AstNode { 14 | let mut parser = Parser::new(PathBuf::from("."), input, Encoding::Utf8, LAST_PPLC); 15 | parser.next_token(); 16 | let res = parser.parse_ast_node().unwrap(); 17 | if assert_eof { 18 | assert!(parser.get_cur_token().is_none()); 19 | } 20 | res 21 | } 22 | 23 | fn check_ast_node(input: &str, check: &AstNode) { 24 | let node = parse_ast_node(input, true); 25 | if !node.is_similar(check) { 26 | println!("AstNode {node:?} is not similar to {check:?}"); 27 | println!("was:\n{node}\nShould be:\n{check}"); 28 | panic!(); 29 | } 30 | } 31 | 32 | #[test] 33 | fn test_proc_declarations() { 34 | check_ast_node( 35 | "DECLARE PROCEDURE PROC001()", 36 | &ProcedureDeclarationAstNode::empty_node( 37 | unicase::Ascii::new("PROC001".to_string()), 38 | vec![], 39 | ), 40 | ); 41 | check_ast_node( 42 | "DECLARE PROCEDURE PROC001(BYTE B)", 43 | &ProcedureDeclarationAstNode::empty_node( 44 | unicase::Ascii::new("PROC001".to_string()), 45 | vec![ParameterSpecifier::empty( 46 | false, 47 | VariableType::Byte, 48 | VariableSpecifier::empty(unicase::Ascii::new("B".to_string()), vec![]), 49 | )], 50 | ), 51 | ); 52 | check_ast_node( 53 | "DECLARE PROCEDURE PROC001(VAR BYTE B)", 54 | &ProcedureDeclarationAstNode::empty_node( 55 | unicase::Ascii::new("PROC001".to_string()), 56 | vec![ParameterSpecifier::empty( 57 | true, 58 | VariableType::Byte, 59 | VariableSpecifier::empty(unicase::Ascii::new("B".to_string()), vec![]), 60 | )], 61 | ), 62 | ); 63 | } 64 | 65 | #[test] 66 | fn test_func_declarations() { 67 | check_ast_node( 68 | "DECLARE FUNCTION FUNC001() INTEGER", 69 | &FunctionDeclarationAstNode::empty_node( 70 | unicase::Ascii::new("FUNC001".to_string()), 71 | vec![], 72 | VariableType::Integer, 73 | ), 74 | ); 75 | check_ast_node( 76 | "DECLARE FUNCTION FUNC001(BYTE B) INTEGER", 77 | &FunctionDeclarationAstNode::empty_node( 78 | unicase::Ascii::new("FUNC001".to_string()), 79 | vec![ParameterSpecifier::empty( 80 | false, 81 | VariableType::Byte, 82 | VariableSpecifier::empty(unicase::Ascii::new("B".to_string()), vec![]), 83 | )], 84 | VariableType::Integer, 85 | ), 86 | ); 87 | } 88 | 89 | /* use super::*; 90 | 91 | #[test] 92 | fn test_procedure() { 93 | let prg = get_ast("Procedure Proc() PRINT 5 EndProc"); 94 | assert_eq!(1, prg.procedure_implementations.len()); 95 | } 96 | 97 | #[test] 98 | fn test_function() { 99 | let prg = get_ast("Function Func() BOOLEAN PRINT 5 EndFunc"); 100 | assert_eq!(1, prg.function_implementations.len()); 101 | }*/ 102 | -------------------------------------------------------------------------------- /ppld/src/tests.rs: -------------------------------------------------------------------------------- 1 | use std::env; 2 | 3 | use icy_ppe::{ 4 | ast::{output_visitor, OutputFunc}, 5 | executable::Executable, 6 | }; 7 | 8 | use crate::decompile; 9 | 10 | fn is_match(output: &str, original: &str) -> bool { 11 | let mut i = 0; 12 | let mut j = 0; 13 | 14 | let output = output.as_bytes(); 15 | let original = original.as_bytes(); 16 | 17 | while i < output.len() && j < original.len() { 18 | // skip comments - assume that ';' is not inside a string 19 | if output[i] == b';' { 20 | while output[i] != b'\n' { 21 | i += 1; 22 | } 23 | } 24 | 25 | if output[i] == original[j] { 26 | i += 1; 27 | j += 1; 28 | continue; 29 | } 30 | if char::is_whitespace(output[i] as char) { 31 | i += 1; 32 | continue; 33 | } 34 | if char::is_whitespace(original[j] as char) { 35 | j += 1; 36 | continue; 37 | } 38 | return false; 39 | } 40 | // skip original trailing ws. 41 | while j < original.len() && char::is_whitespace(original[j] as char) { 42 | j += 1; 43 | } 44 | if j >= original.len() { 45 | return true; 46 | } 47 | false 48 | } 49 | 50 | #[test] 51 | fn test_decompiler() { 52 | use std::fs::{self}; 53 | 54 | let mut data_path = env::current_dir().unwrap(); 55 | data_path.push("test_data"); 56 | //let mut success = 0; 57 | //let mut skipped = 0; 58 | for entry in fs::read_dir(data_path).expect("Error reading test_data directory.") { 59 | let cur_entry = entry.unwrap().path(); 60 | 61 | if cur_entry.extension().unwrap() != "ppe" { 62 | continue; 63 | } 64 | 65 | let file_name = cur_entry.as_os_str(); 66 | println!( 67 | "File: {}...", 68 | cur_entry.file_name().unwrap().to_str().unwrap() 69 | ); 70 | if [ 71 | "for_next.ppe", 72 | "select_case.ppe", 73 | "while_break_continue.ppe", 74 | "if_else_loop_bug.ppe", 75 | "for_break_continue.ppe", 76 | "99bottles.ppe", 77 | "if_elseif_else_endif_end.ppe", 78 | "if_then_else.ppe", 79 | "if_then.ppe", 80 | "while.ppe", 81 | "abort.ppe", 82 | "loggedon.ppe", 83 | ] 84 | .contains(&cur_entry.file_name().unwrap().to_str().unwrap()) 85 | { 86 | //skipped += 1; 87 | continue; 88 | } 89 | 90 | let executable = Executable::read_file(&file_name, false).unwrap(); 91 | let (d, _) = decompile(executable, false).unwrap(); 92 | let source_file = cur_entry.with_extension("pps"); 93 | let orig_text = fs::read_to_string(source_file).unwrap(); 94 | 95 | let mut output_visitor = output_visitor::OutputVisitor::default(); 96 | output_visitor.output_func = OutputFunc::Upper; 97 | output_visitor.skip_comments = true; 98 | d.visit(&mut output_visitor); 99 | 100 | let are_equal = is_match(&output_visitor.output, &orig_text); 101 | 102 | if are_equal { 103 | //success += 1; 104 | } else { 105 | println!( 106 | "'{}' not matched…\n{}-----\n{}", 107 | cur_entry.file_name().unwrap().to_str().unwrap(), 108 | output_visitor.output, 109 | orig_text 110 | ); 111 | } 112 | 113 | assert!(are_equal); 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /icy_board_engine/src/icy_board/output.rs: -------------------------------------------------------------------------------- 1 | use std::{ 2 | collections::VecDeque, 3 | io::{stdout, Write}, 4 | time::Duration, 5 | }; 6 | 7 | use crossterm::{ 8 | event::{poll, read, Event, KeyCode, KeyModifiers}, 9 | terminal::disable_raw_mode, 10 | }; 11 | use icy_ppe::Res; 12 | 13 | use crate::vm::BoardIO; 14 | 15 | #[derive(Default)] 16 | pub struct Output { 17 | char_buffer: VecDeque, 18 | } 19 | 20 | impl Output { 21 | fn fill_buffer(&mut self) -> Res<()> { 22 | while let Ok(true) = poll(Duration::from_millis(50)) { 23 | let r = read()?; 24 | if let Event::Key(key_evt) = r { 25 | match key_evt.code { 26 | KeyCode::Char(c) => { 27 | if (c == 'x' || c == 'c') 28 | && key_evt.modifiers.contains(KeyModifiers::CONTROL) 29 | { 30 | let _ = disable_raw_mode(); 31 | panic!("Ctrl-X or Ctrl-C pressed"); 32 | } 33 | self.char_buffer.push_back(c) 34 | } 35 | KeyCode::Enter => self.char_buffer.push_back('\r'), 36 | KeyCode::Backspace => self.char_buffer.push_back('\x08'), 37 | KeyCode::Esc => self.char_buffer.push_back('\x1B'), 38 | KeyCode::Tab => self.char_buffer.push_back('\x09'), 39 | KeyCode::Delete => self.char_buffer.push_back('\x7F'), 40 | 41 | KeyCode::Insert => self.char_buffer.extend("\x1B[2~".chars()), 42 | KeyCode::Home => self.char_buffer.extend("\x1B[H".chars()), 43 | KeyCode::End => self.char_buffer.extend("\x1B[F".chars()), 44 | KeyCode::Up => self.char_buffer.extend("\x1B[A".chars()), 45 | KeyCode::Down => self.char_buffer.extend("\x1B[B".chars()), 46 | KeyCode::Right => self.char_buffer.extend("\x1B[C".chars()), 47 | KeyCode::Left => self.char_buffer.extend("\x1B[D".chars()), 48 | KeyCode::PageUp => self.char_buffer.extend("\x1B[5~".chars()), 49 | KeyCode::PageDown => self.char_buffer.extend("\x1B[6~".chars()), 50 | 51 | _ => {} 52 | } 53 | } 54 | } 55 | Ok(()) 56 | } 57 | } 58 | 59 | impl BoardIO for Output { 60 | fn write_raw(&mut self, data: &[char]) -> Res<()> { 61 | for c in data { 62 | print!("{}", *c); 63 | } 64 | stdout().flush().unwrap(); 65 | Ok(()) 66 | } 67 | 68 | fn read(&mut self) -> Res { 69 | let mut result = String::new(); 70 | loop { 71 | let Ok(Some((_echo, ch))) = self.get_char() else { 72 | continue; 73 | }; 74 | if ch == '\r' || ch == '\n' { 75 | break; 76 | } 77 | result.push(ch); 78 | } 79 | Ok(result) 80 | } 81 | 82 | fn get_char(&mut self) -> Res> { 83 | self.fill_buffer()?; 84 | if let Some(c) = self.char_buffer.pop_front() { 85 | Ok(Some((true, c))) 86 | } else { 87 | Ok(None) 88 | } 89 | } 90 | 91 | fn inbytes(&mut self) -> i32 { 92 | let _ = self.fill_buffer(); 93 | self.char_buffer.len() as i32 94 | } 95 | 96 | fn hangup(&mut self) -> Res<()> { 97 | Ok(()) 98 | } 99 | 100 | fn put_keyboard_buffer(&mut self, value: &[char]) -> Res<()> { 101 | self.char_buffer.extend(value); 102 | Ok(()) 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /icy_ppe/src/executable/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod deserializer; 2 | pub mod disassembler; 3 | pub use deserializer::*; 4 | 5 | pub mod commands; 6 | pub use commands::*; 7 | 8 | pub mod smt_op_codes; 9 | pub use smt_op_codes::*; 10 | 11 | pub mod func_op_codes; 12 | pub use func_op_codes::*; 13 | 14 | pub mod variable_value; 15 | pub use variable_value::*; 16 | 17 | pub mod variable_table; 18 | pub use variable_table::*; 19 | 20 | pub mod exec; 21 | pub use exec::*; 22 | 23 | #[cfg(test)] 24 | pub mod expr_tests; 25 | #[cfg(test)] 26 | pub mod stmt_tests; 27 | 28 | pub const LAST_PPLC: u16 = 340; 29 | 30 | #[derive(Clone, Debug, Default)] 31 | pub struct VariableNameGenerator { 32 | _version: u16, 33 | user_vars_version: u16, 34 | 35 | string_vars: usize, 36 | int_vars: usize, 37 | bool_vars: usize, 38 | money_vars: usize, 39 | byte_vars: usize, 40 | time_vars: usize, 41 | date_vars: usize, 42 | generic_vars: usize, 43 | 44 | function_vars: usize, 45 | procedure_vars: usize, 46 | constants: usize, 47 | } 48 | 49 | impl VariableNameGenerator { 50 | pub fn get_next_name(&mut self, decl: &TableEntry) -> (String, bool) { 51 | let var_idx = decl.header.id - 1; 52 | if var_idx < USER_VARIABLES.len() 53 | && self.user_vars_version >= USER_VARIABLES[var_idx].version 54 | { 55 | return (USER_VARIABLES[var_idx].name.to_string(), true); 56 | } 57 | 58 | if decl.get_type() == EntryType::Constant { 59 | self.constants += 1; 60 | return (format!("CONST{:>03}", self.constants), false); 61 | } 62 | 63 | let name = match decl.header.variable_type { 64 | VariableType::String => { 65 | self.string_vars += 1; 66 | format!("STR{:>03}", self.string_vars) 67 | } 68 | VariableType::BigStr => { 69 | self.string_vars += 1; 70 | format!("BSTR{:>03}", self.string_vars) 71 | } 72 | VariableType::Integer => { 73 | self.int_vars += 1; 74 | format!("INT{:>03}", self.int_vars) 75 | } 76 | VariableType::Boolean => { 77 | self.bool_vars += 1; 78 | format!("BOOL{:>03}", self.bool_vars) 79 | } 80 | VariableType::Byte => { 81 | self.byte_vars += 1; 82 | format!("BYTE{:>03}", self.byte_vars) 83 | } 84 | VariableType::Money => { 85 | self.money_vars += 1; 86 | format!("MONEY{:>03}", self.money_vars) 87 | } 88 | VariableType::Time => { 89 | self.time_vars += 1; 90 | format!("TIME{:>03}", self.time_vars) 91 | } 92 | VariableType::Date => { 93 | self.date_vars += 1; 94 | format!("DATE{:>03}", self.date_vars) 95 | } 96 | VariableType::Function => { 97 | self.function_vars += 1; 98 | format!("FUNC{:>03}", self.function_vars) 99 | } 100 | VariableType::Procedure => { 101 | self.procedure_vars += 1; 102 | format!("PROC{:>03}", self.procedure_vars) 103 | } 104 | _ => { 105 | self.generic_vars += 1; 106 | format!("VAR{:>03}", self.generic_vars) 107 | } 108 | }; 109 | (name, false) 110 | } 111 | 112 | pub fn new(version: u16, user_vars_version: u16) -> Self { 113 | Self { 114 | _version: version, 115 | user_vars_version, 116 | ..Default::default() 117 | } 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /icy_board_engine/src/tests.rs: -------------------------------------------------------------------------------- 1 | use std::{ 2 | env, 3 | fs::read_to_string, 4 | path::PathBuf, 5 | sync::{Arc, Mutex}, 6 | }; 7 | 8 | use icy_ppe::{ 9 | compiler::PPECompiler, 10 | executable::{Executable, LAST_PPLC}, 11 | parser::{parse_ast, Encoding}, 12 | semantic::SemanticVisitor, 13 | Res, 14 | }; 15 | 16 | use crate::{ 17 | icy_board::state::IcyBoardState, 18 | vm::{run, BoardIO, MemoryIO}, 19 | }; 20 | #[test] 21 | fn test_compiler() { 22 | use std::fs::{self}; 23 | 24 | let mut data_path = env::current_dir().unwrap(); 25 | data_path.push("src/test_data"); 26 | //let mut success = 0; 27 | //let mut skipped = 0; 28 | for entry in fs::read_dir(data_path).expect("Error reading test_data directory.") { 29 | let cur_entry = entry.unwrap().path(); 30 | 31 | if cur_entry.extension().unwrap() != "pps" { 32 | continue; 33 | } 34 | 35 | let file_name = cur_entry.as_os_str(); 36 | println!( 37 | "File: {}...", 38 | cur_entry.file_name().unwrap().to_str().unwrap() 39 | ); 40 | 41 | let mut data = String::new(); 42 | let mut expected = String::new(); 43 | let mut read_expected = false; 44 | for line in read_to_string(file_name).unwrap().lines() { 45 | if read_expected { 46 | expected.push_str(line); 47 | expected.push('\n'); 48 | continue; 49 | } 50 | if line.starts_with(";;") { 51 | read_expected = true; 52 | } else { 53 | data.push_str(line); 54 | data.push('\n'); 55 | } 56 | } 57 | 58 | run_test(&data, expected.trim_end()); 59 | } 60 | } 61 | 62 | fn run_test(data: &str, output: &str) { 63 | let (ast, errors) = parse_ast(PathBuf::from("."), data, Encoding::Utf8, LAST_PPLC); 64 | 65 | let mut sv = SemanticVisitor::new(LAST_PPLC, errors); 66 | ast.visit(&mut sv); 67 | if sv.errors.lock().unwrap().has_errors() { 68 | println!("Errors:"); 69 | for e in &sv.errors.lock().unwrap().errors { 70 | println!("{}", e.error); 71 | } 72 | panic!(); 73 | } 74 | 75 | let mut exec = PPECompiler::default(); 76 | exec.compile(&ast); 77 | let binary = exec.create_executable(330).unwrap(); 78 | let mut buffer: Vec = binary.to_buffer().unwrap(); 79 | let exe = Executable::from_buffer(&mut buffer, false).unwrap(); 80 | let mut io = MemoryIO::new(); 81 | let output_str = Arc::new(Mutex::new(String::new())); 82 | 83 | let mut state = IcyBoardState::default(); 84 | state.ctx = Arc::new(Mutex::new(TestContext::new(output_str.clone()))); 85 | run(&".", &exe, &mut io, &mut state).unwrap(); 86 | 87 | let error = output != output_str.lock().unwrap().to_string().trim_end(); 88 | if error { 89 | println!("{output}"); 90 | println!("------------Was:"); 91 | println!("{}", output_str.lock().unwrap()); 92 | assert!(!error); 93 | } 94 | } 95 | 96 | struct TestContext { 97 | output: Arc>, 98 | } 99 | impl TestContext { 100 | pub fn new(output: Arc>) -> Self { 101 | Self { output } 102 | } 103 | } 104 | 105 | impl BoardIO for TestContext { 106 | fn get_char(&mut self) -> Res> { 107 | todo!() 108 | } 109 | 110 | fn write_raw(&mut self, data: &[char]) -> Res<()> { 111 | self.output.lock().unwrap().extend(data); 112 | Ok(()) 113 | } 114 | 115 | fn read(&mut self) -> Res { 116 | Ok(String::new()) 117 | } 118 | 119 | fn inbytes(&mut self) -> i32 { 120 | 0 121 | } 122 | 123 | fn hangup(&mut self) -> Res<()> { 124 | Ok(()) 125 | } 126 | 127 | fn put_keyboard_buffer(&mut self, _value: &[char]) -> Res<()> { 128 | Ok(()) 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /doc/qwk/NDX.TXT: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Format of Index files 5 | 6 | Index files are named XXX.NDX (where XXX is the conference 7 | number padded with leading zeros to make it three characters 8 | long. There is one *.NDX file for each conference chosen that 9 | contains messages in the MESSAGES.DAT file. 10 | 11 | The *.NDX file contain records five characters long that point 12 | to each message in that conference. 13 | 14 | 15 | NdxRecord = Record 16 | MsgPointer: BasicReal 17 | Conference: Byte; 18 | End; 19 | 20 | The BasicReal is a four byte number in BASIC MKS$ format. 21 | 22 | 23 | The following is a sample program unit for TurboPascal that 24 | converts between BasicReal format and LongInt format. 25 | 26 | ------------------------------------------------------------------------------ 27 | 28 | Unit BasicConvert; 29 | 30 | Interface 31 | Function BasicReal2Long(InValue: LongInt): LongInt; 32 | {Convert Basic Short Reals to LongInts} 33 | 34 | Function Long2BasicReal(InValue: LongInt): LongInt; 35 | {Convert LongInts to Basic Short Reals} 36 | 37 | Implementation 38 | 39 | Function BasicReal2Long(InValue: LongInt): LongInt; 40 | 41 | Var 42 | Temp: LongInt; 43 | Negative: Boolean; 44 | Expon: Integer; 45 | 46 | Begin 47 | If InValue And $00800000 <> 0 Then 48 | Negative := True 49 | Else 50 | Negative := False; 51 | Expon := InValue shr 24; 52 | Expon := Expon and $ff; 53 | Temp := InValue and $007FFFFF; 54 | Temp := Temp or $00800000; 55 | Expon := Expon - 152; 56 | If Expon < 0 Then Temp := Temp shr Abs(Expon) 57 | Else Temp := Temp shl Expon; 58 | If Negative Then 59 | BasicReal2Long := -Temp 60 | Else 61 | BasicReal2Long := Temp; 62 | If Expon = 0 Then 63 | BasicReal2Long := 0; 64 | End; 65 | 66 | 67 | Function Long2BasicReal(InValue: LongInt): LongInt; 68 | Var 69 | Negative: Boolean; 70 | Expon: LongInt; 71 | 72 | Begin 73 | If InValue = 0 Then 74 | Long2BasicReal := 0 75 | Else 76 | Begin 77 | If InValue < 0 Then 78 | Begin 79 | Negative := True; 80 | InValue := Abs(InValue); 81 | End 82 | Else 83 | Negative := False; 84 | Expon := 152; 85 | If InValue < $007FFFFF Then 86 | While ((InValue and $00800000) = 0) Do 87 | Begin 88 | InValue := InValue shl 1; 89 | Dec(Expon); 90 | End 91 | Else 92 | While ((InValue And $FF000000) <> 0) Do 93 | Begin 94 | InValue := InValue shr 1; 95 | Inc(Expon); 96 | End; 97 | InValue := InValue And $007FFFFF; 98 | If Negative Then 99 | InValue := InValue Or $00800000; 100 | Long2BasicReal := InValue + (Expon shl 24); 101 | End; 102 | End; 103 | 104 | End. 105 | 106 | ------------------------------------------------------------------------------ 107 | 108 | A quick and dirty conversion (handles positive numbers only) is possible 109 | with the following expression: 110 | 111 | MKSToNum := ((x AND NOT $ff000000) OR $00800000) 112 | SHR (24 - ((x SHR 24) AND $7f)); 113 | 114 | ------------------------------------------------------------------------------ 115 | 116 | The number contained in the MsgPointer is the record number 117 | (128 byte records - starting numbering from record 1 not 0) 118 | of the message header. Note that since the 1st record contains 119 | packet header, the lowest MsgPointer that can exist is 2. 120 | 121 | Some message readers will reformat the *.NDX files so that the 122 | MsgPointer becomes a LongInt fileseek position (using a record 123 | size of 1). To determine which type of index you are reading 124 | you should look at the size of the number. Any BasicReal will 125 | appear as a huge number that would unlikely ever be a byte 126 | seek positon. 127 | 128 | 129 | -------------------------------------------------------------------------------- /doc/qwk/qwk11/NDX.TXT: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Format of Index files 5 | 6 | Index files are named XXX.NDX (where XXX is the conference 7 | number padded with leading zeros to make it three characters 8 | long. There is one *.NDX file for each conference chosen that 9 | contains messages in the MESSAGES.DAT file. 10 | 11 | The *.NDX file contain records five characters long that point 12 | to each message in that conference. 13 | 14 | 15 | NdxRecord = Record 16 | MsgPointer: BasicReal 17 | Conference: Byte; 18 | End; 19 | 20 | The BasicReal is a four byte number in BASIC MKS$ format. 21 | 22 | 23 | The following is a sample program unit for TurboPascal that 24 | converts between BasicReal format and LongInt format. 25 | 26 | ------------------------------------------------------------------------------ 27 | 28 | Unit BasicConvert; 29 | 30 | Interface 31 | Function BasicReal2Long(InValue: LongInt): LongInt; 32 | {Convert Basic Short Reals to LongInts} 33 | 34 | Function Long2BasicReal(InValue: LongInt): LongInt; 35 | {Convert LongInts to Basic Short Reals} 36 | 37 | Implementation 38 | 39 | Function BasicReal2Long(InValue: LongInt): LongInt; 40 | 41 | Var 42 | Temp: LongInt; 43 | Negative: Boolean; 44 | Expon: Integer; 45 | 46 | Begin 47 | If InValue And $00800000 <> 0 Then 48 | Negative := True 49 | Else 50 | Negative := False; 51 | Expon := InValue shr 24; 52 | Expon := Expon and $ff; 53 | Temp := InValue and $007FFFFF; 54 | Temp := Temp or $00800000; 55 | Expon := Expon - 152; 56 | If Expon < 0 Then Temp := Temp shr Abs(Expon) 57 | Else Temp := Temp shl Expon; 58 | If Negative Then 59 | BasicReal2Long := -Temp 60 | Else 61 | BasicReal2Long := Temp; 62 | If Expon = 0 Then 63 | BasicReal2Long := 0; 64 | End; 65 | 66 | 67 | Function Long2BasicReal(InValue: LongInt): LongInt; 68 | Var 69 | Negative: Boolean; 70 | Expon: LongInt; 71 | 72 | Begin 73 | If InValue = 0 Then 74 | Long2BasicReal := 0 75 | Else 76 | Begin 77 | If InValue < 0 Then 78 | Begin 79 | Negative := True; 80 | InValue := Abs(InValue); 81 | End 82 | Else 83 | Negative := False; 84 | Expon := 152; 85 | If InValue < $007FFFFF Then 86 | While ((InValue and $00800000) = 0) Do 87 | Begin 88 | InValue := InValue shl 1; 89 | Dec(Expon); 90 | End 91 | Else 92 | While ((InValue And $FF000000) <> 0) Do 93 | Begin 94 | InValue := InValue shr 1; 95 | Inc(Expon); 96 | End; 97 | InValue := InValue And $007FFFFF; 98 | If Negative Then 99 | InValue := InValue Or $00800000; 100 | Long2BasicReal := InValue + (Expon shl 24); 101 | End; 102 | End; 103 | 104 | End. 105 | 106 | ------------------------------------------------------------------------------ 107 | 108 | A quick and dirty conversion (handles positive numbers only) is possible 109 | with the following expression: 110 | 111 | MKSToNum := ((x AND NOT $ff000000) OR $00800000) 112 | SHR (24 - ((x SHR 24) AND $7f)); 113 | 114 | ------------------------------------------------------------------------------ 115 | 116 | The number contained in the MsgPointer is the record number 117 | (128 byte records - starting numbering from record 1 not 0) 118 | of the message header. Note that since the 1st record contains 119 | packet header, the lowest MsgPointer that can exist is 2. 120 | 121 | Some message readers will reformat the *.NDX files so that the 122 | MsgPointer becomes a LongInt fileseek position (using a record 123 | size of 1). To determine which type of index you are reading 124 | you should look at the size of the number. Any BasicReal will 125 | appear as a huge number that would unlikely ever be a byte 126 | seek positon. 127 | 128 | 129 | -------------------------------------------------------------------------------- /pplx/src/main.rs: -------------------------------------------------------------------------------- 1 | use clap::Parser; 2 | use crossterm::cursor::MoveTo; 3 | use crossterm::event::{KeyboardEnhancementFlags, PushKeyboardEnhancementFlags}; 4 | use crossterm::execute; 5 | use crossterm::queue; 6 | use crossterm::style::Attribute; 7 | use crossterm::style::Color; 8 | use crossterm::style::Print; 9 | use crossterm::style::SetAttribute; 10 | use crossterm::style::SetForegroundColor; 11 | use crossterm::terminal::disable_raw_mode; 12 | use crossterm::terminal::enable_raw_mode; 13 | use crossterm::ExecutableCommand; 14 | use icy_board_engine::icy_board::state::IcyBoardState; 15 | use icy_board_engine::vm::run; 16 | use icy_board_engine::vm::DiskIO; 17 | use icy_ppe::executable::Executable; 18 | use semver::Version; 19 | use std::ffi::OsStr; 20 | use std::io::stdout; 21 | use std::path::Path; 22 | 23 | #[derive(clap::Parser)] 24 | #[command(version="", about="PCBoard Programming Language Execution Environment", long_about = None)] 25 | struct Cli { 26 | /// if set, the executable will run in sysop mode 27 | #[arg(long, short)] 28 | sysop: bool, 29 | 30 | /// file[.ppe] to run 31 | file: String, 32 | } 33 | 34 | lazy_static::lazy_static! { 35 | static ref VERSION: Version = Version::parse(env!("CARGO_PKG_VERSION")).unwrap(); 36 | } 37 | 38 | fn main() { 39 | let arguments = Cli::parse(); 40 | let mut file_name = arguments.file; 41 | let extension = Path::new(&file_name).extension().and_then(OsStr::to_str); 42 | if extension.is_none() { 43 | file_name.push_str(".ppe"); 44 | } /* 45 | let users = vec![ 46 | PcbUser { 47 | user: PcbUserRecord { 48 | name: "sysop".to_string(), 49 | password: "sysop".to_string(), 50 | security_level: 110, 51 | ..Default::default() 52 | }, 53 | inf: Default::default(), 54 | }, 55 | PcbUser { 56 | user: PcbUserRecord { 57 | name: "guest".to_string(), 58 | password: "guest".to_string(), 59 | security_level: 10, 60 | ..Default::default() 61 | }, 62 | inf: Default::default(), 63 | }, 64 | ];*/ 65 | 66 | let mut icy_board_data = IcyBoardState::default(); 67 | icy_board_data.session.is_sysop = arguments.sysop; 68 | 69 | // icy_board_data.board.lock().unwrap().users = users; 70 | 71 | match Executable::read_file(&file_name, false) { 72 | Ok(exe) => { 73 | let mut io = DiskIO::new(".", None); 74 | 75 | enable_raw_mode().unwrap(); 76 | let supports_keyboard_enhancement = matches!( 77 | crossterm::terminal::supports_keyboard_enhancement(), 78 | Ok(true) 79 | ); 80 | 81 | if supports_keyboard_enhancement { 82 | queue!( 83 | stdout(), 84 | PushKeyboardEnhancementFlags( 85 | KeyboardEnhancementFlags::DISAMBIGUATE_ESCAPE_CODES 86 | | KeyboardEnhancementFlags::REPORT_ALL_KEYS_AS_ESCAPE_CODES 87 | | KeyboardEnhancementFlags::REPORT_ALTERNATE_KEYS 88 | | KeyboardEnhancementFlags::REPORT_EVENT_TYPES 89 | ) 90 | ) 91 | .unwrap(); 92 | } 93 | 94 | stdout() 95 | .execute(crossterm::terminal::Clear( 96 | crossterm::terminal::ClearType::All, 97 | )) 98 | .unwrap() 99 | .execute(MoveTo(0, 0)) 100 | .unwrap(); 101 | 102 | run(&file_name, &exe, &mut io, &mut icy_board_data).unwrap(); 103 | 104 | disable_raw_mode().unwrap(); 105 | } 106 | Err(err) => { 107 | execute!( 108 | stdout(), 109 | SetAttribute(Attribute::Bold), 110 | SetForegroundColor(Color::Red), 111 | Print("ERROR: ".to_string()), 112 | SetAttribute(Attribute::Reset), 113 | SetAttribute(Attribute::Bold), 114 | Print(format!("{}", err)), 115 | SetAttribute(Attribute::Reset), 116 | ) 117 | .unwrap(); 118 | println!(); 119 | println!(); 120 | } 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /icy_ppe/src/executable/expr_tests.rs: -------------------------------------------------------------------------------- 1 | use crate::executable::{EntryType, FunctionValue, VariableType, VariableValue}; 2 | 3 | use super::{Executable, FuncOpCode, PPEExpr, TableEntry, FUNCTION_DEFINITIONS}; 4 | 5 | #[test] 6 | fn test_value_serialization() { 7 | let val = PPEExpr::Value(2); 8 | test_serialize(&val, &[2, 0]); 9 | } 10 | 11 | #[test] 12 | fn test_dim_serialization() { 13 | let val = PPEExpr::Dim(2, vec![PPEExpr::Value(2)]); 14 | test_serialize(&val, &[2, 1, 2, 0, 0]); 15 | 16 | let val = PPEExpr::Dim(2, vec![PPEExpr::Value(2), PPEExpr::Value(3)]); 17 | test_serialize(&val, &[2, 2, 2, 0, 0, 3, 0, 0]); 18 | 19 | let val = PPEExpr::Dim( 20 | 2, 21 | vec![PPEExpr::Value(2), PPEExpr::Value(3), PPEExpr::Value(4)], 22 | ); 23 | test_serialize(&val, &[2, 3, 2, 0, 0, 3, 0, 0, 4, 0, 0]); 24 | } 25 | 26 | #[test] 27 | fn test_predefined_functions_serialization() { 28 | let i = -(FuncOpCode::RIGHT as i32); 29 | let val = PPEExpr::PredefinedFunctionCall( 30 | &FUNCTION_DEFINITIONS[i as usize], 31 | vec![PPEExpr::Value(2), PPEExpr::Value(3)], 32 | ); 33 | test_serialize(&val, &[2, 0, 3, 0, FuncOpCode::RIGHT as i16]); 34 | 35 | let i = -(FuncOpCode::MID as i32); 36 | let val = PPEExpr::PredefinedFunctionCall( 37 | &FUNCTION_DEFINITIONS[i as usize], 38 | vec![PPEExpr::Value(2), PPEExpr::Value(3), PPEExpr::Value(4)], 39 | ); 40 | test_serialize(&val, &[2, 0, 3, 0, 4, 0, FuncOpCode::MID as i16]); 41 | } 42 | 43 | #[test] 44 | fn test_binary_expression_serialization() { 45 | let val = PPEExpr::BinaryExpression( 46 | crate::ast::BinOp::Add, 47 | Box::new(PPEExpr::Value(2)), 48 | Box::new(PPEExpr::Value(3)), 49 | ); 50 | test_serialize(&val, &[2, 0, 3, 0, FuncOpCode::PLUS as i16]); 51 | } 52 | 53 | #[test] 54 | fn test_unary_expression_serialization() { 55 | let val = PPEExpr::UnaryExpression(crate::ast::UnaryOp::Minus, Box::new(PPEExpr::Value(2))); 56 | test_serialize(&val, &[2, 0, FuncOpCode::UMINUS as i16]); 57 | } 58 | 59 | #[test] 60 | fn test_function_call_serialization() { 61 | let val = PPEExpr::FunctionCall(6, vec![]); 62 | test_serialize(&val, &[6, 0]); 63 | let val = PPEExpr::FunctionCall(7, vec![PPEExpr::Value(5)]); 64 | test_serialize(&val, &[7, 0, 5, 0, 0]); 65 | 66 | let val = PPEExpr::FunctionCall(8, vec![PPEExpr::Value(2), PPEExpr::Value(3)]); 67 | test_serialize(&val, &[8, 0, 2, 0, 0, 3, 0, 0]); 68 | } 69 | 70 | fn test_serialize(val: &PPEExpr, expected: &[i16]) { 71 | assert_eq!( 72 | val.get_size(), 73 | expected.len(), 74 | "Serialization size mismatch for {val:?}" 75 | ); 76 | let mut result = Vec::new(); 77 | val.serialize(&mut result); 78 | assert_eq!(result, expected); 79 | 80 | test_deserialization(&result, val); 81 | } 82 | 83 | fn test_deserialization(script: &[i16], expected: &PPEExpr) { 84 | let mut exe = Executable::default(); 85 | for i in 0..5 { 86 | exe.variable_table.push(TableEntry { 87 | name: format!("int{i}"), 88 | value: VariableValue::new_int(i), 89 | header: super::VarHeader { 90 | id: i as usize + 1, 91 | variable_type: VariableType::Integer, 92 | ..Default::default() 93 | }, 94 | entry_type: EntryType::Constant, 95 | function_id: 0, 96 | }); 97 | } 98 | for id in 6..9 { 99 | let func = FunctionValue { 100 | parameters: id - 6, 101 | local_variables: 1, 102 | start_offset: 1, 103 | first_var_id: 5, 104 | return_var: 6, 105 | }; 106 | 107 | exe.variable_table.push(TableEntry { 108 | name: format!("func{}", id - 5), 109 | value: VariableValue { 110 | vtype: VariableType::Function, 111 | data: func.to_data(), 112 | ..Default::default() 113 | }, 114 | header: super::VarHeader { 115 | id: id as usize, 116 | variable_type: VariableType::Function, 117 | ..Default::default() 118 | }, 119 | entry_type: super::EntryType::Constant, 120 | function_id: 0, 121 | }); 122 | } 123 | 124 | exe.script_buffer = script.to_vec(); 125 | let mut deserializer = super::PPEDeserializer::default(); 126 | let expr = deserializer.deserialize_expression(&exe).unwrap().unwrap(); 127 | 128 | assert_eq!(expr, *expected); 129 | assert_eq!(expr.get_size(), exe.script_buffer.len()); 130 | 131 | assert_eq!(deserializer.offset, exe.script_buffer.len()); 132 | } 133 | --------------------------------------------------------------------------------