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

robomind-parser

v1.1.1

Published

Parser for the RoboMind scripting language

Downloads

5

Readme

robomind-parser

Build Status Dependency Status devDependency Status

Parses a RoboMind .irobo and/or .map file into an AST, which can be interpreted using robomind-interpreter.

robomind-parser uses PEG.js internally, and has been tested reasonably well. It supports translation of keywords into multiple languages, like RoboMind.

robomind-parser was written for use in SkidBot.

Example

$ ./bin/robomind-parser test.irobo

API

var parser = require('robomind-parser');
  • parser.languages An array containing all the language codes of languages robomind-parser supports.
  • parser.info(type, lang) Provides information about the grammar of the RoboMind language.
    • type should be one of 'keywords', 'atoms', 'variables'.
    • lang should be one of the values of parser.languages,
  • parser.parseScript(code, opts) Parses code and returns an ast. opts can be
    • language: is 'en' by default. You can change this to parse keywords in another language
    • any peg.js options to pass to the parser (startRule excluded)
  • parser.parseScriptFile(path[, opts], cb) The same as above, but now taking a path instead of code, and using a callback function to provide the result since this requires IO.
  • parser.parseMap(code) See above.
  • parser.parseMapFile(path, cb) See above.
  • parser.SyntaxError The SyntaxError function this parser uses. Handy for instanceof checks in error handlers.

Contributing

You don't need to be able to code to contribute, everyone can help with translations. Do make sure that the translations are the same as the one RoboMind uses, otherwise it becomes impossible to load its files.

You can translate robomind-parser on the online Launchpad site.

If you do want to work on the code, these are useful commands to know:

  • npm install - needs to be run only once.
  • npm test - to rebuild, run the test suite, and collect coverage information.
  • npm run build - to just rebuild.

TODOS

  • more translations
  • more tests