首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > 在一个简单的java脚本解释器

在一个简单的java脚本解释器

资 源 简 介

This project implements a simple script interpreter in Java. Its purpose is to provide a simple code base that is easy to understand and be used for learning basic techniques in writing an interpreter. The project contains the following: * Hand written Lexer * Parser that process tokens from the Lexer to check the syntax and generate an Abstract Syntax Tree * An Interpreter that evaluates the abstract syntax tree by visiting the nodes. It also performs some semantic checking. Here is an example script it successfully runs: ``` /* * @author Cameron Zemek */ // This script is an example of a simple language. // There are only three basic data types: numbers, strings, boolean a_number = 3 ^ 2; a_string = "hello"; a_bool = true; // Operators concat_string = "hello" ~ " " ~ "world."; fav_string = 3 ~ " is my favourite number"; result_number = 1 + 2 - 1 * 5 / 3.2 + 2^2; isEmail =

文 件 列 表

ZemScript
bin
src
test
lib
build.xml
LICENSE.txt
sample.zem

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
  • 晋财 27分钟前 成为了本站会员

  • WYG 1天前 成为了本站会员

  • Shine 1天前 成为了本站会员

  • 柳贻 1天前 成为了本站会员

  • hallelujah_HL 1天前 成为了本站会员

  • 焦昱贺 1天前 成为了本站会员

  • Rubin 1天前 成为了本站会员

  • Li 2天前 成为了本站会员

  • bigfatcat1977 3天前 成为了本站会员

  • just4down 3天前 成为了本站会员

0.186169s