npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@gobstones/gobstones-lang-def

v0.1.0

Published

The definition for the gobstones language

Downloads

3

Readme

gobstones-lang-def

The definition of the Gobstones Language

Licence Version API Docs

GitHub Workflow Tests GitHub Workflow Build

This component has the definition of the Gobstones Language, its syntactical structure and the means to define concrete strings to use for each of its elements. The component contains the tools needed to produce Gobstones Language valid Abstract Syntax Trees (ASTs), taking as input the definition of the concrete strings for each of the language syntactical elements, and a program using those strings. In this way, Gobstones programs in different languages (like Spanish or English) can be converted to a valid AST. Additionally, different specific domains can be designed without the need to modify the base language.

The process from a Gobstones program to a valid AST includes:

  • a lexical analysis producing 'tokens',
  • a parsing process converting the tokens to an non checked AST, and
  • a final process of linting validation for the AST. For each of these processes, a module is provided: Lexer, Parser, and Linter. The lexer, Lexer, takes a source input with the Gobstones program to process, and depending on which class in the hierarchy is used, also a definition of the concrete words of the language, and returns a list of tokens. The parser, Parser, takes a list of tokens, and returns a non-validated AST. The linter, Linter, takes a non-validated AST, and returns a valid AST. Any of these phases can fail if some error is encountered.

It is usual to name the process involving the three phases also as 'parsing', abusing the naming. However, we will distinguish them, and define a module GLanguage capturing the process of receiving a source input an invoking one, two, or all the three phases in sequence. This can be controlled from the CLI using configuration parameters, or called from another module.

The component also contains definitions of the interfaces and classes needed to provide an association between language syntactical elements and concrete strings. The module is WordsDef, and has classes for defining the the concrete strings of the base language, versions in English, Spanish, and Portuguese, each one using the Standard Domain (the board and stones). Additionally, there are several other modules that intervene during the process, such as the CLI, the definition of specialized errors, translations for error messages and CLI, etc.

Install

Install with your favorite package manager by running one of the following commands:

npm:

npm install --save @gobstones/gobstones-lang-def

Usage

< COMPLETE - Explain how to use your library. >

< COMPLETE - Explain how to import the library and use it as a module.>

CLI

< COMPLETE - If your library supports CLI, explain how to use it. Else, you may delete this section. >

Contributing

See the Gobstones Platform Contribution Guidelines to contribute.