New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ngls

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngls

Natural language layer on top of GLS.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

NGLS - Natural General Language Syntax

Build Status NPM version

A natural language layer on top of GLS.

General Language Syntax (GLS) is a unified syntax that compiles into a number of OOP languages. NGLS converts natural language to GLS syntax, which can then be converted into real code.

NGLSGLSJavaScript
Comment that this is an awesome projectcomment line : This is an awesome project// This is an awesome project
Gimme a for loop for i from 0 to 10 plsfor numbers start : i number 0 10for (let i = 0; i < 10; i++) {
How about an int named count equal to 7variable : count int 7let count = 7;

Usage

(coming soon!)

Development

NGLS uses Gulp to automate building, which requires Node.js.

To build from scratch, install Node.js and run the following commands:

npm install -g gulp
npm install
gulp

To build, run gulp. You can build+lint the souce without running tests using gulp src, or just build+lint+run tests using gulp test. The full list of tasks is in gulpfile.js.

Alternately, use tsc to build source files under /src to /lib, and tsc -w to build upon file changes.

Commands

Each supported GLS command needs a matchers.ts exporting a MatchersList and a command.ts exporting a Command.

MatchersList

Each command's MatchersList tests whether input strings can be converted to that GLS. If the string can, a string[] of matches from the test is converted to an object satisfying that command's ICommandArgs.

For each list of tests, the first matching test (if any) will be used. Testers satisfy the IMatchTest interface and are typically implemented with a regular expression.

Command

A command takes in a settings object and converts it to lines of GLS and/or recursive NGLS command, as one string[] per line. Recursive NGLS commands must start with "{ " and end with " }".

Tests

Integration tests are done using BDD. Folders under /test/integration will contain a source.txt file with raw text source and an expected.txt file with the expected output. These are verifified during gulp test:integration.

Keywords

gls

FAQs

Package last updated on 16 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts