Giter Club home page Giter Club logo

gootest's Introduction

About project

This is interpreter and debugger of guu language

The project has separate modules:

  • gui - view part, user interface

  • core - scanner, syntaxAnalyzer, semanticAnalyzer, interpreter and debugger

  • common - constants which is used between modules

Features:

  • you can use step_into or step_over

  • check current memory

  • check current stacktrace

  • add multiple lines to debug

  • empty lines will be skipped

Tested with

java 8 oracle java version "1.8.0_201" Java(TM) SE Runtime Environment (build 1.8.0_201-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)


Gradle 5.4.1

Build time: 2019-04-26 08:14:42 UTC Revision: 261d171646b36a6a28d5a19a69676cd098a4c19d

Kotlin: 1.3.21 Groovy: 2.5.4 Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018 JVM: 1.8.0_201 (Oracle Corporation 25.201-b09) OS: Linux 4.18.0-17-generic amd64

ubuntu budgie

Build project

  1. You need java 8 oracle and gradle 5.4 to build this project

  2. Go to root gradle directory

  3. Run gradle build

  4. Next run jar with oracle java8, java -jar ./gui/build/libs/gui-1.0-SNAPSHOT.jar path_to_file

Interface

In project three fields. First contains your code, second is used for interpret your commands and third for output

Commands

Debugger commands

  • i - step_into to next debug line it's similar to step_into

  • o - step_over to next line , skip debug of calls

  • var - output current memory

  • trace - output current stackTrace

ShortCuts commands

  • Ctrl + S save to file

  • F7 - step into

  • F8 - step_over

Console commands

  • add - add stop points to line

  • remove - delete stop point at number

  • points - output current stop points

  • stop - stop currentSession of debug or run

  • debug - start debug code

  • run - execute code

  • clear - clear console output

Instruction to add new operator

1 Add new token in /core/src/main/kotlin/org/goo/scanner/Token.kt

2 Add new token in scanner tokenDeterminer /core/src/main/kotlin/org/goo/scanner/TokenDeterminer.kt

3 Next add new token in /core/src/main/kotlin/org/goo/syntax/ContinuousStartState.kt and in /core/src/main/kotlin/org/goo/syntax/WaitFirstOperatorState.kt

4 Realize new operator in /core/src/main/kotlin/org/goo/interpreter/operators

5 And add it to mapping in /core/src/main/kotlin/org/goo/interpreter/Interpreter.kt

Available operators

Example

sub test
    print b
sub main
    set a 5
    random b
    print a
    call test
  • print - print variable

  • set - set to var numeric value

  • call - call sub with name var

  • random - set random numeric to var

For test

For test you can run with example.txt file

Technologies

Feature versions

  • Change to socket connection, between debugger and gui

  • add gui buttons for debug

gootest's People

Contributors

kostya05983 avatar

Watchers

 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.