Git Product home page Git Product logo

simplexer's Introduction

Work example

For the time I did not update readme file output could change. However now test.txt is:

// this function adds to numbers
function add(a, b) {
	return a + b;
}

print("adfb"); // print some text
a = 56;
b = a - 20;
res = add(a, b);

and output is:

File test.txt was successfuly read
Line: (1,1)     Type: COMMENT       Symbol:  this function adds to numbers
Line: (2,1)     Type: SYMBOL        Symbol: function
Line: (2,10)    Type: SYMBOL        Symbol: add
Line: (2,13)    Type: LEFT_PARAN    Symbol:
Line: (2,14)    Type: SYMBOL        Symbol: a
Line: (2,15)    Type: COMMA         Symbol:
Line: (2,17)    Type: SYMBOL        Symbol: b
Line: (2,18)    Type: RIGHT_PARAN   Symbol:
Line: (2,20)    Type: LEFT_CURLY    Symbol:
Line: (3,2)     Type: SYMBOL        Symbol: return
Line: (3,9)     Type: SYMBOL        Symbol: a
Line: (3,11)    Type: PLUS          Symbol:
Line: (3,13)    Type: SYMBOL        Symbol: b
Line: (3,14)    Type: SEMICOLON     Symbol:
Line: (4,1)     Type: RIGHT_CURLY   Symbol:
Line: (6,1)     Type: SYMBOL        Symbol: print
Line: (6,6)     Type: LEFT_PARAN    Symbol:
Line: (6,7)     Type: STRING        Symbol: adfb
Line: (6,13)    Type: RIGHT_PARAN   Symbol:
Line: (6,14)    Type: SEMICOLON     Symbol:
Line: (6,16)    Type: COMMENT       Symbol:  print some text
Line: (7,1)     Type: SYMBOL        Symbol: a
Line: (7,3)     Type: EQUAL         Symbol:
Line: (7,5)     Type: INTEGER       Symbol: 56
Line: (7,7)     Type: SEMICOLON     Symbol:
Line: (8,1)     Type: SYMBOL        Symbol: b
Line: (8,3)     Type: EQUAL         Symbol:
Line: (8,5)     Type: SYMBOL        Symbol: a
Line: (8,7)     Type: MINUS         Symbol:
Line: (8,9)     Type: INTEGER       Symbol: 20
Line: (8,11)    Type: SEMICOLON     Symbol:
Line: (9,1)     Type: SYMBOL        Symbol: res
Line: (9,5)     Type: EQUAL         Symbol:
Line: (9,7)     Type: SYMBOL        Symbol: add
Line: (9,10)    Type: LEFT_PARAN    Symbol:
Line: (9,11)    Type: SYMBOL        Symbol: a
Line: (9,12)    Type: COMMA         Symbol:
Line: (9,14)    Type: SYMBOL        Symbol: b
Line: (9,15)    Type: RIGHT_PARAN   Symbol:
Line: (9,16)    Type: SEMICOLON     Symbol:

simplexer's People

Contributors

artenni4 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.