ifc-syntax-express-parser
/
0.2.4
ifc-syntax-express-parser 0.2.4
Install from the command line:
Learn more about npm packages
$ npm install @alanrynne/ifc-syntax-express-parser@0.2.4
Install via package.json:
"@alanrynne/ifc-syntax-express-parser": "0.2.4"
About this version
Parser for EXPRESS
files, originally coded to provide type information to the IFC Syntax VSCode extension, also developed by myself.
It uses Nearley.js parser, and a reverse-engineered grammar, since the EXPRESS
language has no documentation that I could find.
WARNING: This instructions will be valid once the package is published to
npm
.
npm install ifc-syntax-express-parser
Using it is fairly easy, just create a new ExpressParser
class instance, and call the parse()
function with the path of the file as input.
import { ExpressParser } from "ifc-syntax-express-parser"
const filePath = "./path/to/your/file.exp"
const expressParser = new ExpressParser()
expressParser.parse(filePath).then((schema: IIfcSchema) => {
// Do whatever you need with the schema entities.
})
Contributions are always welcome! Feel free to open Issues or PRs.