Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
github.com/prataprc/goparsec
A library to construct top-down recursive backtracking parsers using parser-combinators. Before proceeding you might want to take at peep at theory of parser combinators. As for this package, it provides:
To construct syntax-trees based on detailed grammar try with AST struct
NOTE that AST object is a recent development and expect user to adapt to newer versions
Every combinator should confirm to the following signature,
// ParsecNode type defines a node in the AST
type ParsecNode interface{}
// Parser function parses input text, higher order parsers are
// constructed using combinators.
type Parser func(Scanner) (ParsecNode, Scanner)
// Nodify callback function to construct custom ParsecNode.
type Nodify func([]ParsecNode) ParsecNode
Combinators take a variable number of parser functions and return a new parser function.
Builtin scanner library manages the input buffer and implements a cursor into the buffer. Create a new scanner instance,
s := parsec.NewScanner(text)
The scanner library supplies method like Match(pattern)
,
SkipAny(pattern)
and Endof()
, refer to for
more information on each of these methods.
Panics are to be expected when APIs are misused. Programmers might choose to ignore errors, but not panics. For example:
Clone the repository run the benchmark suite
$ cd expr/
$ go test -test.bench=. -test.benchmem=true
$ cd json/
$ go test -test.bench=. -test.benchmem=true
To run the example program,
# to parse expression
$ go run tools/parsec/parsec.go -expr "10 + 29"
# to parse JSON string
$ go run tools/parsec/parsec.go -json '{ "key1" : [10, "hello", true, null, false] }'
If your project is using goparsec you can raise an issue to list them under this section.
Maybe
combinatormaster
is the development branch.FAQs
Unknown package
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
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.