GithubHelp home page GithubHelp logo

udhos / basgo Goto Github PK

View Code? Open in Web Editor NEW
35.0 7.0 2.0 840 KB

basgo compiles BASIC-lang to Golang. Then 'go build' can translate code to native executable binary.

License: MIT License

Go 73.40% Shell 0.58% Yacc 24.61% VBA 0.01% BASIC 1.40% FreeBasic 0.01%
golang go basic gw-basic basica compiler basic-lang native executable binary

basgo's Introduction

udhos here ๐Ÿ‘‹

  • ๐Ÿ”ญ Looking for fun in technology
  • ๐ŸŒฑ Learning new languages
  • ๐Ÿค” What is the next big thing?
  • ๐Ÿ’ฌ Willing to chat
  • ๐Ÿ˜„ Happy hacking

Anurag's GitHub stats

Github Contributions

basgo's People

Contributors

udhos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

refaqtor dirani

basgo's Issues

LOCATE requires SCREEN 0

SCREEN 0 enables terminal features for the command LOCATE.

This LOCATE will NOT work:

20 locate 10,10: ? "test"
30 ?:while i$="":?"hit ENTER to exit":i$=input$(1):?i$:wend

This LOCATE will work:

10 screen 0
20 locate 10,10: ? "test"
30 ?:while i$="":?"hit ENTER to exit":i$=input$(1):?i$:wend

Support BASIC string with percent sign (%)

This BASIC code:

echo '10 print "%"' | basgo-build > a.go && go run a.go

Produces this invalid Go code:

fmt.Print(`%!`(MISSING))

It is possible to work-around this defect by escaping % with %%:

echo '10 print "%%"' | basgo-build > a.go && go run a.go

failing to build on debian sid(unstable), amd64(x86_64)

so i try to run:

git clone https://github.com/udhos/basgo
cd basgo
go get -d modernc.org/goyacc
go generate ./basparser
go install ./basgo-build

which ends up with:

Cloning into 'basgo'...
remote: Enumerating objects: 3719, done.
remote: Counting objects: 100% (40/40), done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 3719 (delta 17), reused 27 (delta 10), pack-reused 3679
Receiving objects: 100% (3719/3719), 833.34 KiB | 13.89 MiB/s, done.
Resolving deltas: 100% (2140/2140), done.
invalid escape, or illegal reserved word: precedence: parser.y:133
basparser/generate.go:1: running "goyacc": exit status 1
# github.com/udhos/basgo/basparser
basparser/lex.go:65:7: undefined: TkKeywordRem
basparser/lex.go:67:7: undefined: TkCommentQ
basparser/lex.go:69:7: undefined: TkString
parser.y:5: imported and not used: "fmt" as __yyfmt__
parser.y:7: imported and not used: "fmt"
parser.y:9: imported and not used: "strconv"
parser.y:10: imported and not used: "strings"
parser.y:13: imported and not used: "github.com/udhos/baslib/baslib/file"
basparser/token.go:8:23: undefined: TkNull
basparser/token.go:9:23: undefined: TkIdentifier
basparser/lex.go:69:7: too many errors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.