WebML: A Standard ML Compiler for the Web

栏目: IT技术 · 发布时间: 4年前

内容简介:WebML is to be a Standard ML (SML '97) Compiler that works on web browsers and generatesUnder very early stage of initial development. Compiles only minimal subset of SML codes. The garbage collector is not complete.not yet implemented

WebML -- A Standard ML compiler for the Web

WebML is to be a Standard ML (SML '97) Compiler that works on web browsers and generates WebAssembly binaries. WebAssembly binaries can be run on web browsers. This means you can run SMl REPL on web browsers.

Status

Under very early stage of initial development. Compiles only minimal subset of SML codes. The garbage collector is not complete.

Implemented features

Core

  • Declaration
    • val
      • basic ( val ident = expr )
      • pattern ( val pat = expr )
      • tyvar val 'a pat = expr
      • typed ( val pat : ty = expr )
      • and ( val pat = expr and pat = expr )
    • fun
      • basic ( fun ident ident ... = expr )
      • pattern ( fun ident pat ... = expr )
      • multi-clause ( fun ident pat ... = expr | ident pat ... = expr )
      • op ( fun op ident pat ... = expr )
      • tyvar ( fun 'a ident pat ... = expr )
      • typed ( fun ident pat ... : ty = expr )
      • and ( fun ident pat ... = expr and ident pat ... = expr )
    • type ( type ident = ty )
    • datatype
      • datatype ident = Con of ty | Con ...
        • basic ( datatype ident = Con of ty | Con ... )
        • tyvar ( datatype 'a ident = Con of ty | Con ... )
        • and ( datatype ident = Con | ... and ident = Con | ... )
        • withtype ( datatype ident = Con ... withtype .. )
      • datatype ident = datatype ident
    • abstype
    • exception
    • local ... in ... end
    • open ..
    • decl ; decl
      • decl decl
      • decl ; decl
    • infix
    • infixr
    • nofix
  • Expressions
    • special constant
      • integer
      • real
        • 123.456
        • 123e456
        • 123E456
        • 123e~456
      • word
      • char
      • string
    • value identifier
    • op
    • record
      • basic ( { label = expr , ...} )
      • tuple
      • 0-tuple
      • #label
    • list ( [expr, ..., expr] )
    • (expr; ...; expr)
    • paren ( (expr) )
    • let .. in .. end
      • basic ( let decl ... in expr end )
      • derived ( let decl ... in expr; ...; expr end )
    • function application
    • infix operator
      • L
      • R
    • typed ( exp : ty )
    • exception
      • handle
      • raise
    • fn
      • basic ( fn ident => expr )
      • pattern ( fn pat => expr )
      • multi-clause fn pat => expr | pat => expr ...
    • andalso
    • orelse
    • if .. then .. else
    • while .. do ..
    • case .. of ..
  • Pattern
    • wildcard
    • special constant
      • integer
      • word
      • char
      • string
    • value identifier
    • op
    • record
      • basic ( { label = pat , ...} )
      • wildcard ( ... )
      • label as variable ( { var (as pat), ...} )
      • tuple
      • 0-tuple
    • list
    • paren
    • Constructor
    • infix
    • typed ( pat : ty )
    • layerd ( ident as pat )
  • Type
    • type variable
    • record
    • type construction
      • without param ( ident )
      • with param ( ty ident )
    • tuple
    • function
    • paren
  • Initial Basis
    • unit
    • bool
      • true
      • false
    • int
    • word
    • string
    • char
    • list
      • nil
      • ::
    • ref
      • ref
      • :=
    • exn
    • =
    • Match
    • Bind
  • Overloaded
    • +
    • -
    • *
    • div
    • mod
    • /
    • <
    • >
    • <=
    • >=
    • abs
    • ~

Module

not yet implemented

Program

  • Program
    • decl ( decl decl ... )
    • expr ( expr decl ... )
      • Note: toplevel expression expr should be treated as val it = expr

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

反欺骗的艺术

反欺骗的艺术

(美) 米特尼克(Mitnick, K. D.) / 潘爱民 / 清华大学出版社 / 2014-7-1 / 49.80元

凯文•米特尼克(Kevin D. Mitnick)曾经是历史上最令FBI头痛的计算机顽徒之一,现在他已经完成了大量的文章、图书、影片和记录文件。自从2000年从联邦监狱中获释以来,米特尼克改变了他的生活方式,成了全球广受欢迎的计算机安全专家之一。在他的首部将功补过的作品中,这位全世界最著名的黑客为“放下屠刀,立地成佛”这句佛语赋予了新的含义。 在《反欺骗的艺术——世界传奇黑客的经历分享》中,......一起来看看 《反欺骗的艺术》 这本书的介绍吧!

URL 编码/解码
URL 编码/解码

URL 编码/解码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具