Giter Site home page Giter Site logo

basic-kt's Introduction

Բեյսիկ-Փ լեզվի ինտերպրետատորն իրականացված Kotlin լեզվով

Բեյսիկ-Փ լեզվի քերականությունը (EBNF)

Program = { Subroutine NewLines }.
NewLines = EOL { EOL }.
Subroutine = 'SUB' IDENT '(' [IdentList] ')' NewLines 
       StatementList 'END' 'SUB'.
StatementList = { Statement NewLines }.
IdentList = IDENT {',' IDENT}.
Statement = Input | Print | Let | If | While | For | Call.
Input = 'INPUT' IDENT.
Print = 'PRINT' Expression.
Let = 'LET' IDENT '=' Expression.
If = 'IF' Expression 'THEN' NewLines StatementList
     {'ELSEIF' Expression 'THEN' NewLines StatementList }
     ['ELSE' NewLines StatementList] 'END' 'IF'.
While = 'WHILE' Expression NewLines StatementList 'END' 'WHILE'.
For = 'FOR' IDENT '=' Expression 'TO' Expression ['STEP' Expression]
      NewLines StatementList 'END' 'FOR'.
Call = 'CALL' IDENT [ExpressionList].
ExpressionList = Expression {',' Expression}.
Expression = Disjunction {'AND' Disjunction}.
Disjunction = Equality {'OR' Equality}.
Equality = Comparison ('=' | '<>') Comparison.
Comparison = Multiplication ('>' | '>=' | '<' | '<=') Multiplication.
Multiplication = Addition {('*' | '/' | '\') Addition}.
Addition = Power {('+' | '-' | '&') Power}.
Power = Factor ['^' Power].
Factor = DOUBLE | STRING | IDENT | '(' Expression ')' 
       | IDENT '(' [ExpressionList] ')'.

basic-kt's People

Contributors

armenbadal avatar

Watchers

James Cloos avatar  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.