⚠️ This repo has been deprecated in favour of the new monorepo I created with all my IFC related code. You can check it out at:It includes:
ifc
andexpress
parsers- The IFC Syntax VSCode Extension code
- The IFC Language Server
- An IFC to Typescript code generator
- An IFC documentation extraction tool
See you there!!
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.