admin管理员组文章数量:1130349
illustrate how to implement a lisp interpreter,see pic
1.lexer:
lexer read and translate the input string "(+ 1 2 )" into tokens.(Pair)
2.parser:
parser translate the tokens into AST(abstract syntax tree)
3.evaluator:
evaluator evaluate the AST to a result.
4 return the result==>3,done. so easy!:)
illustrate how to implement a lisp interpreter,see pic
1.lexer:
lexer read and translate the input string "(+ 1 2 )" into tokens.(Pair)
2.parser:
parser translate the tokens into AST(abstract syntax tree)
3.evaluator:
evaluator evaluate the AST to a result.
4 return the result==>3,done. so easy!:)
本文标签: implementillustrateinterpreterlisp
版权声明:本文标题:illustrate how to implement alisp interpreter 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/jiaocheng/1758283986a2777633.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论