Skip to content

TheWebDevel/monkey-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Writing an Interpreter in Go

Parsing

Parsers

According to Wikipedia

A parser is a software component that takes input data (frequently text) and builds a data structure – often some kind of parse tree, abstract syntax tree or other hierarchical structure – giving a structural representation of the input, checking for correct syntax in the process. [...] The parser is often preceded by a separate lexical analyser, which creates tokens from the sequence of input characters;

A parser turns it into a data structure that represents the input

> output
{ name: 'Thorsten', age: 28 }
> output.name 'Thorsten'
> output.age 28

How is it related to a Interpreter? A JSON parser takes text as input and builds the data structure that represents the input. That's exactly what a parser for a programming language does.

About

An Interpreter for a programming language called Monkey written in Go (Book: https://interpreterbook.com/)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages