
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
antlr4-helper
Advanced tools
A NPM library that assists in various Antlr4 parse, language analysis, and language manipulation tasks
The goal of this project is to provided classes and interfaces that assist with the interaction of Antlr parsers. Making things like language manipulation and analysis much easier.
npm install -S antlr4-helper
const antlrHelper = require('antlr4-helper');
const TinycLexer = require('./parser/TinycLexer').TinycLexer;
const TinycParser = require('./parser/TinycParser').TinycParser;
const factory = antlrHelper.createFactoryBuilder()
.lexer((input) => new TinycLexer(input))
.parser(tokenStream => new TinycParser(tokenStream))
.rootRule((parser) => parser.program())
.build();
const parser = antlrHelper.createParser(factory);
parser.parse('variable = 100;');
parser.checkForErrors();
//
// Find only variables
//
parser.filter((rule) => rule.getName() === 'id')
.forEach((rule) => {
const ruleName = rule.getName();
console.log(ruleName); // id
console.log(rule.getText()); // variable
});
const antlrHelper = require('antlr4-helper');
const TinycLexer = require('./parser/TinycLexer').TinycLexer;
const TinycParser = require('./parser/TinycParser').TinycParser;
const factory = antlrHelper.createFactoryBuilder()
.lexer((input) => new TinycLexer(input))
.parser(tokenStream => new TinycParser(tokenStream))
.rootRule((parser) => parser.program())
.build();
const parser = antlrHelper.createParser(factory);
parser.parse('a = 10;');
parser.checkForErrors(); // No parse errors
//
// Find the first rule
//
const rule = parser.findRuleByName('id');
rule.setText('var');
console.log("The changed text:");
console.log(parser.getText()); //var = 10;
console.log("The replaced variable:");
const varName = rule.getText();
console.log(varName); //var;
FAQs
A NPM library that assists in various Antlr4 parse, language analysis, and language manipulation tasks
The npm package antlr4-helper receives a total of 25 weekly downloads. As such, antlr4-helper popularity was classified as not popular.
We found that antlr4-helper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.