- Grey.Fox+
- 28 Jan 2009 02:16:26 pm
- Last edited by Eeems on 03 Feb 2009 06:33:35 pm; edited 5 times in total
Recently I've been working on a program aimed at helping basic programmers enter long lines of code without having to enter it all by hand.
how it works is you enter your code like normal, but instead of entering a long line of code you enter a ^ then the command, when you run Grey.Fox+ it will ask you what program you want to compile then it will search through it for a ^ when it gets too one it will scroll through the Library and fond the replacement, when it has found the replacement it will copy the code into a temporary file along with the code that hasn't got a ^, after it gets to a .. symbolizing the end of the area needing compiling it will prompt you to tell it which file you want to compile it too, and it will create the file and copy over the temp, then it will delete the temp. the library is easy to edit and add your own code to.
I'm going to post its beta soon and it would be nice if some constructive criticism came in, as well as help with any problems I have with it
EDIT:
I have finally finished the project. if anybody has some ideas for a ++ version just post it
Now at the third revision. Work on the second version is now under way
http://www.cemetech.net/programs/index.php?mode=file&path=/83plus/basic/programs/Grey.fox_plus_v1.3.7.zip
VERSION HISTORY:
v0.1b did not work at all
v0.2b fixed bug first working version
v0.3b first upload, small code optimizations
v0.4b added more to the lib, more code optimization
v0.5b better read me, commenting added
v0.6b final beta, more code optimizations, got rid of theta TEMP program
v1.0 first none beta, never uploaded. delete source code option added
v1.0.1 small fix to code. final version.
v1.2.0 and its small counterparts were had larger code fixes, mainly getting rid of the extra files. Also the error trap was moved into the GDFP program
v1.3.0 included more functions
v1.3.2 and up stabilized the code and included the unreleased GDFPF program (allows you to add commands to the library safely without deleting other commands
v1.3.7 was the first completely stable code of this revision
::SOURCE CODE OF THE PARSER::
Code:
::SOURCE FOR THE LIB::
Code:
how it works is you enter your code like normal, but instead of entering a long line of code you enter a ^ then the command, when you run Grey.Fox+ it will ask you what program you want to compile then it will search through it for a ^ when it gets too one it will scroll through the Library and fond the replacement, when it has found the replacement it will copy the code into a temporary file along with the code that hasn't got a ^, after it gets to a .. symbolizing the end of the area needing compiling it will prompt you to tell it which file you want to compile it too, and it will create the file and copy over the temp, then it will delete the temp. the library is easy to edit and add your own code to.
I'm going to post its beta soon and it would be nice if some constructive criticism came in, as well as help with any problems I have with it
EDIT:
I have finally finished the project. if anybody has some ideas for a ++ version just post it
Now at the third revision. Work on the second version is now under way
http://www.cemetech.net/programs/index.php?mode=file&path=/83plus/basic/programs/Grey.fox_plus_v1.3.7.zip
VERSION HISTORY:
v0.1b did not work at all
v0.2b fixed bug first working version
v0.3b first upload, small code optimizations
v0.4b added more to the lib, more code optimization
v0.5b better read me, commenting added
v0.6b final beta, more code optimizations, got rid of theta TEMP program
v1.0 first none beta, never uploaded. delete source code option added
v1.0.1 small fix to code. final version.
v1.2.0 and its small counterparts were had larger code fixes, mainly getting rid of the extra files. Also the error trap was moved into the GDFP program
v1.3.0 included more functions
v1.3.2 and up stabilized the code and included the unreleased GDFPF program (allows you to add commands to the library safely without deleting other commands
v1.3.7 was the first completely stable code of this revision
::SOURCE CODE OF THE PARSER::
Code:
::"Grey.Fox+ Parser v1.3.7
::DCS6
:"89B3FA2AAAAB71B2700020200070C023E0073FFC3FFFE000C4240A66AA254576
:Lbl 1
:ClrHome
:Menu("Grey.Fox+ Parser","Parse",P,"Add to Lib",A,"Quit",Q
:Lbl P
:Disp "Grey.Fox+ Parser
:Input "prgm",Str1
:Input "Parsed-prgm",Str2
:"θLIB→Str3
:Str2→Str0
:12→θ
:Asm(prgmθC3
:0→K
:0→A
:" →Str9
:While Str9≠"..
:ClrHome
:A+1→A
:1→θ
:Str1→Str0
:A:Asm(prgmθC3
:If sub(Str9,1,1)="+
:sub(Str9,2,length(Str9)-1→Str3
:If sub(Str9,1,1)="*
:Then
:ClrHome
:Disp "INSERTING
:Output(1,11,sub(Str9,2,length(Str9)-1
:A-1→A
:sub(Str9,2,length(Str9)-1)→Str4
:0→M
:Str1→Str0
:3→θ
:A+1:Asm(prgmθC3
:While Str9≠"..
:M+1→M
:Str4→Str0
:1→θ
:M:Asm(prgmθC3
:If Str9≠"..
:Then
:Str1→Str0
:Str9→Str7
:Output(2,1,"
:Output(2,1,Str9
:2→θ
:Str7→Str9
:A+1:Asm(prgmθC3
:End
:End
:"*→Str9
:End
:If sub(Str9,1,1)="^
:Then
:Str9→Str8
:Output(1,1,Str9
:Str3→Str0
:{-}1→L
:" →Str9
:While Str9≠Str8
:1→θ
:L+2→L
:L:Asm(prgmθC3
:Output(2,1,"
:Output(2,1,Str9
:If Str9="..
:Then
:ClrHome
:Disp "Err::syntax
:Output(3,1,"----------------
:Output(4,1,Str8
:Input "::Correction::",Str8
:{-}1→L
:End
:End
:L+1→L
:L:Asm(prgmθC3
:Str2→Str0
:K+1→K
:2→θ
:K:Asm(prgmθC3
:Output(3,1,Str9
:Else
:sub(Str9,1,1)→Str7
:If Str9≠".." and Str7≠">" and Str7≠"+" and Str7≠"*
:Then
:K+1→K
:2→θ
:Str2→Str0
:K:Asm(prgmθC3
:Output(3,1,Str9
:End
:End
:End
:ClrHome
:Pause "Program parsed
:Menu("Delete source?","Yes",D,"No",Q
:Lbl D
:7→θ
:Str1→Str0
:Asm(prgmθC3
:Lbl Q
:ClrHome
:Output(1,14,"
:Return
:Lbl A
:Output(1,1,"GDF+ FORMATTER v0.1b"
:Pause
:Lbl 0
:ClrHome
:Input "Cmd name: ^",Str8
:"^"+Str8→Str8
:Input "Cmd insert: ",Str9
:2→θ
:"θLIB→Str0
:1:Asm(prgmθC3
:Str8→Str9
:1:Asm(prgmθC3
:Menu("MORE?","Yes",0,"No",1
Generated by SourceCoder (http://www.cemetech.net/projects/basicelite/sourcecoder.php)
© 2005 Cemetech (http://www.cemetech.net)
::SOURCE FOR THE LIB::
Code:
:^OUT
:Output(1,1,Ans
:^GRSET
:Func:CoordOn:GridOff:AxesOn:LabelOff:ExprOn
:^TEXT
:0→X:0→Y:0→K:While K≠105:Pxl-Change(Y,X):0→K:While K=0:getKey→K:End:Pxl-Change(Y,X):If K=24:X-1→X:If K=25:Y-1→Y:If K=26:X+1→X:If K=34:Y+1→Y:If X={-}1:0→X:If X=95:94→X:If Y={-}1:0→Y:If Y=65:64→Y:End:Input "Text(Y,X,'",Str1:Text(Y,X,Str1
:^SHADE
:Disp "":Output(1,1,"Shade(":Input "",Str1:Str►Equ(Str1,X<span style="font-size: 0.7em">1T</span>):ClrHome:Disp "":Output(1,1,"Shade(0,":Input "",Str1:Str►Equ(Str1,Y<span style="font-size: 0.7em">1T</span>):Shade(X<span style="font-size: 0.7em">1T</span>,Y<span style="font-size: 0.7em">1T</span>
:^GSET
:ClrDraw:Func:CoordOff:GridOff:AxesOff:LabelOff:ExprOff:ZStandard
:^PAUSE
:0→K:0→E:Repeat K or E<20:getKey→K:E+1→E:End
:^CIRCLE
:Input :X→A:Y→B:Input :sqrt((X-A){^2}+(Y-B){^2})→C:Circle(A,B,C
:^QUITS
:ClrHome:ClrDraw:AxesOn:Stop
:^QUITR
:ClrHome:ClrDraw:Return
:^SETPROG
:Input "NEWFILE: ",Str0:det(0,Str0,5)
:^DELPROG
:Input "DELFILE: ",Str0:det(0,Str0,4
:^STATS
:det(4,0):Ans→R:det(4,1):Ans→A:det(4,3):Ans→Str1
:^GGF
:Input "GROUP?",Str0:det(11,Str0):Output(1,1,Ans):Pause :Input "EXTRACT?",A:det(12,Str0,A):If Ans:Disp "DONE":If not(Ans):Disp "Err::?"
:^CLR
:real(0,1):ClrHome
:^SCREEN
:AxesOff:real(7,0):real(6
:^A PROG
:Input "RUN prgm",Str0:Str0:real(10,0,0
:^XK
:real(8
:^MOS HDR
::"Grey.Fox+ parsed
:^A-GET
:Repeat getKey:End
:^K-GET
:0→K:While not(K):getKey→K:End
:^D8 HDR
::DCS
:^D16 HDR
::DCS6
:^ICON8
:"3F5191FB8F8581FF
:^ICON16
:"3E5B529692BBF24296109E388A10FE00000065B45AAA69A24080028001000000
:^GREY1
:0→K:While not(K):real(3,1,0,1):real(3,2,0,1):getKey→K:End
:^GREY2
:0→K:While not(K):real(3,3,0,1):real(3,4,0,1):getKey→K:End
:^NO DONE
:ClrHome:Output(1,14,"
:^NO DONE ASM
:Asm(prgmθKD
:^PEN
:0→X:0→Y:0→K:While K≠105:Pxl-Change(Y,X):0→K:While K=0:getKey→K:End:Pxl-Change(Y,X):If K=21:Pxl-Change(Y,X):If K=24:X-1→X:If K=25:Y-1→Y:If K=26:X+1→X:If K=34:Y+1→Y:If X={-}1:0→X:If X=95:94→X:If Y={-}1:0→Y:If Y=65:64→Y:End
:^LINE
:Input :X→A:Y→B:Pt-On(X,Y):Input :Line(X,Y,A,B
:^X-TEST
:1:real(0):If not(Ans):Then:ClrHome:Disp "INSTALL xLIB":Return:End
:^DISP
:Disp Ans
:..
:..
Generated by SourceCoder (http://www.cemetech.net/projects/basicelite/sourcecoder.php)
© 2005 Cemetech (http://www.cemetech.net)