This project is an offshoot of AppleCommander's import of a BASIC program. The tooling will have more capabilities than what is available in AppleCommander.
This project is split into multiple sub-projects:
An Applesoft BASIC tool library and command-line tool.
License: GNU General Public License v3.0
This project is an offshoot of AppleCommander's import of a BASIC program. The tooling will have more capabilities than what is available in AppleCommander.
This project is split into multiple sub-projects:
Sample Program:
"""
100 PRINT "HELLO, WORLD!"
"""
This crashes with:
make/bt Test.bas -o Test.tok
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: picocli.CommandLine$ExecutionException: Error while calling command (io.github.applecommander.bastokenizer.tools.bt.Main@18769467): java.util.NoSuchElementException
at picocli.CommandLine.execute(CommandLine.java:837)
at picocli.CommandLine.access$700(CommandLine.java:111)
at picocli.CommandLine$RunLast.handle(CommandLine.java:994)
at picocli.CommandLine$RunLast.handle(CommandLine.java:962)
at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:870)
at picocli.CommandLine.parseWithHandlers(CommandLine.java:1153)
at picocli.CommandLine.call(CommandLine.java:1405)
at picocli.CommandLine.call(CommandLine.java:1333)
at io.github.applecommander.bastokenizer.tools.bt.Main.main(Main.java:102)
... 8 more
Caused by: java.util.NoSuchElementException
at java.util.LinkedList.removeFirst(LinkedList.java:270)
at java.util.LinkedList.remove(LinkedList.java:685)
at io.github.applecommander.bastokenizer.api.Parser.expectNumber(Parser.java:64)
at io.github.applecommander.bastokenizer.api.Parser.readLine(Parser.java:34)
at io.github.applecommander.bastokenizer.api.Parser.parse(Parser.java:27)
at io.github.applecommander.bastokenizer.tools.bt.Main.process(Main.java:144)
at io.github.applecommander.bastokenizer.tools.bt.Main.call(Main.java:113)
at io.github.applecommander.bastokenizer.tools.bt.Main.call(Main.java:32)
at picocli.CommandLine.execute(CommandLine.java:830)
... 16 more
make[1]: *** [Test.tok] Error 1
make: *** [all] Error 2
Command ExternalBuildToolExecution failed with a nonzero exit code
Variable names with line number cross-reference.
Goal here is that parsing '1' versus '1000' is a bit faster.
Given the B or BAS token stream, detokenize Applesoft programs. Should recognize binary components due to gaps in basic code and export as companion binary.
Likely requires change to subcommands?
Line numbers used in:
GOSUB
nGOTO
nIF
... THEN
nLIST
n [ ,m ]ON
x GOTO
n, m, ...ON
x GOSUB
n, m, ...ONERR
GOTO
nRUN
nWould need to support code like:
label:
print "Hi"
goto label
Which would then get transpiled into:
10 PRINT "Hi" : GOTO 10
Going to try http://picocli.info/.
Noting that current versions of Eclipse no longer reliably recognize older versions of Gradle projects reliably. Bump embedded version and adjust builds accordingly.
Currently if you typo something in the input program and tokenization fails, the resulting error message is not very informative about where is the problem. e.g. you get a nested exception where the lowest level is:
Caused by: java.io.IOException: Unknown! ttype=63, nval=30.000000, sval=null
at io.github.applecommander.bastokenizer.api.TokenReader.next(TokenReader.java:149)
at io.github.applecommander.bastokenizer.api.TokenReader.tokenize(TokenReader.java:54)
at io.github.applecommander.bastokenizer.api.TokenReader.tokenize(TokenReader.java:40)
at io.github.applecommander.bastokenizer.tools.bt.Main.process(Main.java:139)
at io.github.applecommander.bastokenizer.tools.bt.Main.call(Main.java:113)
at io.github.applecommander.bastokenizer.tools.bt.Main.call(Main.java:32)
at picocli.CommandLine.execute(CommandLine.java:830)
which is trying to tell me that there is an unexpected '?' character (ASCII 63) somewhere on line 30.
Needs to be aware of line numbers and references.
$ java bastools-tools-bt-0.4.0.jar
Error: Could not find or load main class bastools-tools-bt-0.4.0.jar
Caused by: java.lang.ClassNotFoundException: bastools-tools-bt-0.4.0.jar
Maybe this means flesh out the AppleCommander AppleSingle capabilities and make it an independent project.
This project includes the GPL 3 LICENSE file, but does not indicate whether it is licensed under GPL 3 only, or GPL 3 or later. Could you indicate this somewhere, maybe in the readme? Thanks.
Thank you for making these utilities; I'm delighted. The $embed
functionality is exactly what I was looking for, unfortunately I'm having trouble getting it to work with bt 0.3.1.
printf $'\x60' > rts
echo '1 PRINT "BEFORE CALL"' > hello
echo '2 $embed file="rts", moveto="$300"' >> hello
echo '3 PRINT "AFTER CALL"' >> hello
applecommander -dos140 test.dsk
bt hello --applesingle --stdout | applecommander -as test.dsk hello
If I run this program:
]RUN HELLO
BEFORE CALL
?UNDEF'D STATEMENT ERROR IN 2
If I list this program:
]LIST
1 PRINT "BEFORE CALL"
2 CALL 2110: GOTO 3
15493 SPEED= DEL = SPEED= ? DEL
> SPEED= DEL ? SPEED=
937 DEL C COLOR=
24830
17985 TER CALL"
A lowercase variable name causes a ?SYNTAX ERROR
!
If this goes to Maven Central, should the project shift to Gradle like the rest of the projects?
Future idea. Need to build expression tree and reduce.
This would make all floating-point conversation work be done once.
Presumably these are all triggered by repeated colons in the source TEXT::HOME
=> TEXT
, empty statement, HOME
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.