qy - alt-python same as alt-js
qy [
infile/
stdin] [
-o outfile]
qy [
-hHVs]
--- src.qy
fn f(){
if(1==1){print(10)}
}
~$ qy src.qy #..or: cat src.qy | qy
#>> def f():pass
if 1==1:pass
print(10)
pass
pass
--- support-syntax info
~$ qy -s | qy
#>> output sample code
- -hHV
- usage, version
- -s
- output sample code
- -o file
- output dist (dfl:stdout)
qy is transpiler(==text conv) for c-lang style programmer.
you can write python code with c-syntax.
- for(){}, if(){} >>> indent code
- &&, || >>> 'and' 'or' etc
- /*...*/ >>> """..."""
- and other word/syntax conv
- ignore(fall-through) other syntax == allow mix python raw code
currently supports only a few syntax. you can add your own rule with editing
qy(posix-sh) directly.
(add 'try-except' blockcode)
~$ your_editor $(which qy)
_EL <- "else" / "el" >>> _EL <- "else"/"el" /"try"/"except"
see 'ped -h' help about peg-grammer.
suc/fail == 0/not0
-
c compiler(posix-2001+), posix-shell
Copyright (C) 2022 Momi-g, AGPLv3+
2022-09-27 v1.0.0 (2022-09-27 v1.0.0)
-