1.1.2 • Published 6 years ago

pegjs-prolog-parser v1.1.2

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

PEGjs Prolog Parser

Description

Supports a function called parse which takes in a Prolog string and returns an AST from it. The AST returned is an ASTNode from the asty npm module.

Usage

const parser = require('pegjs-prolog-parser');

const clause = "script(X).";

const result = parser.parse(clause);

console.log(result.dump());

// Result:
//
// Prolog [1,1]
// └── Compound [1,1]
//    ├── Functor (value: "script") [1,1]
//    └── Arguments [1,8]
//        └── Variable (value: "X") [1,8]
1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago