在windows上运行效果如下:
安装过程帮助:
Installation
安装
Using standalone interpreter binary
//使用独立解释器二进制文件
This repository contains precompiled binaries for Windows and macOS,
the easiest way is to download to get a direct playground.
Or you can make a build by:
//这个库包含预编译的Windows和macOS二进制文件,
//最简单方法下载二进制文件直接进入Happy
//或者你可以自己编译:
Using the Visual Studio workspace my_basic.sln on Windows to build an executable
Using the Xcode workspace my_basic_mac.xcodeproj on macOS to build an executable
Using the makefile on *nix OS to build an executable
//1、在window系统使用VS工作空间中my_basic.sln去创建并运行
//2、在macOS系统使用Xcode工作空间中my_basic_mac.xcodeproj去创建并运行
//3、在*nix OS系统使用makefile去创建并运行
Follow these steps to compile an interpreter binary manually for any platform:
//按照以下步骤为任何平台手工编译解释器二进制文件
Retrieve everything under the core and shell folders for a minimum build
Setup your toolchain for compiling and linking
Compile core/my_basic.c and shell/main.c, with both including core/my_basic.h;
then link up an executable
//1、检索core和shell文件夹下的所有内容,以获得最小的构建
//2、设置用于编译和链接的工具链
//3、编译core/my_basic.c 和 shell/main.c,同时包含core/my_basic.h ,然后连接执行
The standalone interpreter supports three running modes:
//设置用于编译和链接的工具链:
Execute the binary without arguments to use the interactive mode
//在没有参数的情况下执行二进制文件,以使用交互模式
Type "HELP" and hint Enter to get usages of it
//键入“HELP”并提示Enter以获得它的用法
Pass a file to the binary to load and run that BASIC source code
//将文件传递给二进制文件以加载和运行基本源代码
Pass an argument -e followed with an expression to evaluate and print instantly as a simple calculator, eg. -e "2 * (3 + 4)"
//传递一个参数-e,后面跟着一个表达式来计算,并立即作为一个简单的计算器打印出来:eg. -e "2 * (3 + 4)"
内容正在更新中,请继续查看。。。