Skip to content

Latest commit

 

History

History
 
 

policy-dsl

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Policy DSL

This repo contains the antlr grammar file (parser/Policy.g4) for the verification policy DSL.

All other files in this repo are for testing the grammar file.

Usage

Node version >= 14 is required for antlr (if using fnm, just run fnm use)

npm install
npm test

Parser Generation

antlr is a parser generation tool that is used for generating the lexer and parser from the grammar file.

Once antlr is installed (>= v4.9, since that's the version they switched to es6 modules), the parser files can be regenerated with:

antlr4 -Dlanguage=JavaScript parser/Policy.g4

Resources