Skip to content

Latest commit

 

History

History
375 lines (325 loc) · 5.91 KB

LANGUAGE.md

File metadata and controls

375 lines (325 loc) · 5.91 KB

ENGLISH

Neural Language (AI)

NL(AI)

Hello, World!

printTest
Hello, World!
end

Let's break it down line by line:

printTest

This means that all subsequent records are outputs to the console.

Hello, World!

This is the actual Hello, World!

end

This means that we no longer output subsequent records to the console.

Functions:

printDebug
This is debug message.
end

Output:

  DEBUG: This is debug message.
printDebugInfo
This is debug info message.
end

Output:

  INFO: This is debug info message.
printDebugWarn
This is debug warning message.
end

Output:

  WARNING: This is debug warning message.
printDebugErr
This is debug error message.
end

Output:

  ERROR! This is debug error message.
getRequest

Requests a request from the user to the neural network.

getWeights

Gets the weight and bias for a token from a file.

clearRequest

Clears the request variable.

noDebug
true/false
end

Prohibits/allows the output of debug messages. Output:

No Debug = true/false
cmd
sh/bat command (In Linux uses sh, in Windows uses bat)
end

Executes terminal commands.

check
res/file.nlai
src/file.cpp
catchErr
Error message.
error
end

Checks files for openability. Otherwise, it calls catchErr. In catchErr, you can optionally call error, which will interrupt the execution of the process. Output, if the files didn't open:

  ERROR! Error message.
  ERROR! An 'error' called in file 'file.nlai' at line 6.
function
res/function.nlai
end

Executes the code in the file specified in the path. The path is specified from the place where the interpreter was called. If the code in the file function.nlai:

printTest
File is opened.
end

Then the output:

File is opened.
leave

Interrupts the execution of the code without an error. (With code 0) Output:

  INFO: An 'leave' called in file 'file.nlai' at line 1.
error

Interrupts the execution of the code with an error. (With code 1) Output:

  ERROR! An 'error' called in file 'file.nlai' at line 1.

Functions in 'settings.nlai':

MAINFILE
res/file.nlai
end

Sets the file that will be interpreted first. Output:

  Main File = res/file.nlai
printTest
Hello, World!
end

This is output to the console.

noDebug
true/false
end

Prohibits/allows the output of debug messages. Output:

No Debug = true/false

The end.

RUSSIAN

Нейронный Язык (ИИ)

NL(AI)

(англ. - Neural Language (AI))

Hello, World!

printTest
Hello, World!
end

Разберём построчно:

printTest

Это означает, что все последующие записи - выводы в консоль.

Hello, World!

Это, собственно, сам Hello, World!

end

Это означает, что мы больше не выводим в консоль последующие записи.

Функции:

printDebug
This is debug message.
end

Вывод:

  DEBUG: This is debug message.
printDebugInfo
This is debug info message.
end

Вывод:

  INFO: This is debug info message.
printDebugWarn
This is debug warning message.
end

Вывод:

  WARNING: This is debug warning message.
printDebugErr
This is debug error message.
end

Вывод:

  ERROR! This is debug error message.
getRequest

Запрашивает у пользователя запрос к нейросети.

getWeights

Получает вес и смещение для токена из файла.

clearRequest

Очищает переменную request.

noDebug
true/false
end

Запрещает/разрешает вывод debug-сообщений. Вывод:

No Debug = true/false
cmd
sh/bat command (На Linux используется sh, на Windows используется bat)
end

Выполняет команды терминала.

check
res/file.nlai
src/file.cpp
catchErr
Error message.
error
end

Проверяет файлы на открываемость. В противном случае вызывает catchErr. В catchErr, по желанию, можно вызвать error, который прервёт выполнение процесса. Вывод, если файлы не открылись:

  ERROR! Error message.
  ERROR! An 'error' called in file 'file.nlai' at line 6.
function
res/function.nlai
end

Выполняет код в файле, указанном в пути. Путь указывается из того места, где был вызван интерпретатор. Если код в файле function.nlai:

printTest
File is opened.
end

То вывод:

File is opened.
leave

Прерывает выполнение кода без ошибки. (С кодом 0) Вывод:

  INFO: An 'leave' called in file 'file.nlai' at line 1.
error

Прерывает выполнение кода с ошибкой. (С кодом 1) Вывод:

  ERROR! An 'error' called in file 'file.nlai' at line 1.

Функции 'settings.nlai':

MAINFILE
res/file.nlai
end

Задаёт файл, который будет интерпретироваться в первую очередь. Вывод:

  Main File = res/file.nlai
printTest
Hello, World!
end

Это вывод в консоль.

noDebug
true/false
end

Запрещает/разрешает вывод debug-сообщений. Вывод:

No Debug = true/false

Конец.