MY-BASIC应用1:MY-BASIC解析器介绍

MY-BASIC is a lightweight BASIC interpreter written in standard C in dual files.
//MY-BASIC是一个轻量级的BASIC解释器,用标准C语言在双文件中编写。
 
It's aimed to be embeddable, extendable and portable.
//它的目标是可嵌入、可扩展和可移植。

It is a dynamic typed programming language,reserves structured syntax,
//它是一种动态类型的编程语言,保留结构化语法
 
supports a style of prototype-based programming (OOP),
//支持一种基于原型的编程风格(OOP)

also implements a functional paradigm by lambda abstraction.
//还通过lambda抽象实现了函数范型。

The core is written in a C source file and an associated header file.
//核心是在一个C源文件和一个相关的头文件中编写的。

It's easy to either use it as a standalone interpreter or embed it with existing projects in C, C++, Java, Objective-C, Swift, C#, etc.
and totally customizable by adding your own scripting interfaces.
它既可以作为一个独立的解释器使用,
也可以嵌入到现有的C、c++、Java、Objective-C、Swift、c#等项目中,
并且可以通过添加自己的脚本接口完全定制。

Main features
主要特征

MY-BASIC offers a wide range of features including:
MY-BASIC 提供广阔的功能,如下:

    Written in standard C, source code is portable to a dozen of platforms
    //用标准C编写的源代码可以移植到十几个平台

    Lightweight (within less than 128KB footprint), fast, and configurable
    //轻量级(小于128KB内存占用)、快速且可配置

    With both retro and modern BASIC syntax
    //具有复古和现代的基本语法

    Case-insensitive tokenization, and many other indelible BASIC flavour
    //不区分大小写的标记,和许多其他BASIC不可磨灭的元素

    Unicode support
    //Unicode 支持

    Prototype-based programming, with reflection support
    //基于原型的编程,支持反射

    Lambda abstraction enhanced functional programming
    //Lambda抽象增强了函数式编程

    Customizable referenced/non-referenced usertype
    //可定制的引用/非引用usertype

    Collection construction and manipulation functions for LIST and DICT
    //用于列表和DICT的集合构造和操作函数

    Automatic releasing for referenced values (prototype, lambda, referenced usertype, list, dictionary, etc.) benefited from reference counting and garbage collection
    //对引用值(原型、lambda、引用的usertype、列表、字典等)的自动释放得益于引用计数和垃圾收集

    Common numeric and string functions
    //常见的数字和字符串函数

    Structured sub routine definition with the DEF/ENDDEF statements
    //使用DEF/ENDDEF语句定义结构化子例程

    Structured IF/THEN/ELSEIF/ELSE/ENDIF
    //结构:IF/THEN/ELSEIF/ELSE/ENDIF

    Structured FOR/TO/STEP/NEXT, FOR/IN/NEXT, WHILE/WEND, DO/UNTIL
    //结构:FOR/TO/STEP/NEXT, FOR/IN/NEXT, WHILE/WEND, DO/UNTIL

    Reserved retro GOTO, GOSUB/RETURN
    //保留的复古 GOTO, GOSUB/RETURN

    Importing multiple source files with the IMPORT statement
    //使用IMPORT语句导入多个源文件

    Debug API
    //调试API

    Customizable memory pool
    //可定制的内存池

    Easy API, for extending new BASIC functions
    //简单的API,用于扩展新的基本函数

    Easy interacting BASIC facilities at native side, and vice versa
    //易于在本机端交互基本设施,反之亦然

    More features under development
    //更多功能正在开发中

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值