Skip to content

mmalofeev/MVL

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MVL

a.k.a Most Valuable Language

Build

git clone https://github.com/mishok2503/MVL.git
cd MVL/
./run.sh <file-name>

Parser output AST to file <file-name>.out in JSON. Lexer output logs to file lexer.log.

Syntax

Functions defenitions
f_name(arg1, arg2) {
    skip?
}
Loops
while [expr] {
    skip?
}
Default operators

|+|, |-|, |^|, |==|, |<=|, |>=|, ||||, |&&|, |*|, |/|, !, -

User operators

base operators: |[ +, -, *, /, ^, !, <, >, =, [<>=/]=]| operator = |(base operators)+|

If
if [expr] {
    skip?
} endif
if [expr] {
    skip?
} else {
    skip?
} endif
Operators overloading
|new operator|: {
    skip?
}
Comments
multistring

open: +_+, close - -_-
example:

+_+ comment here 
  +_+ and here -_- 
still here -_-
singlestring

syntax: O_o example:

O_o comment here O_o and here
not comment

Vim support

Alt text

Install

cd vim_support

Add vimrc file contents into your ~/.vimrc file.

mkdir -p ~/.vim/syntax/
cp mvl.vim ~/.vim/syntax/
cp mvl_keywords.txt ~/.vim/

Now you can see highlighting and use autocomplete, by pressing Ctrl+n, inside our *.mvl files.
There is also automatic addition of brackets, and macroses @m for main function and @f for other functions.
Comment lines: select lines in visual mode (or nothing for one line) and type ,cc for comment and ,cu for uncomment lines.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 52.9%
  • Lex 40.3%
  • Vim Script 6.2%
  • Shell 0.6%