UNPKG

boolean-expressions

Version:

Boolean expression parser and evaluator. Makes use of the Ohm grammar package with grammar rules found [here](https://github.com/avadavat/boolean-expressions/blob/master/src/grammar/grammarRules.ts).

62 lines (61 loc) 1.56 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var andOperators = ["and", "And", "AND", "aND", "&", "&&", "/\\"]; exports.andOperators = andOperators; var orOperators = ["or", "OR", "Or", "oR", "|", "||", "\\/"]; exports.orOperators = orOperators; var xorOperators = [ "xor", "XOR", "Xor", "xOr", "^", "!=", "=/=", "~=", "not equals" ]; exports.xorOperators = xorOperators; var notOperators = ["not", "NOT", "Not", "noT", "~", "!"]; exports.notOperators = notOperators; var ifOperators = [ "->", "-->", "=>", "==>", "implies", "imply", "ImPlY", "IMPLiES" ]; exports.ifOperators = ifOperators; var biconditionalOperators = [ "<->", "<=>", "<-->", "<==>", "=", "==", "iff", "if and only if" ]; exports.biconditionalOperators = biconditionalOperators; var converseOperators = ["<-", "<--", "<=", "<=="]; exports.converseOperators = converseOperators; var nonimplicationOperators = [ "-/->", "=/=>", "nimply", "nimplies", "NIMPLY", "NIMPLIES" ]; exports.nonimplicationOperators = nonimplicationOperators; var converseNonimplicationOperators = ["<-/-", "<=/="]; exports.converseNonimplicationOperators = converseNonimplicationOperators; var nandOperators = ["nand", "NAND", "not and"]; exports.nandOperators = nandOperators; var norOperators = ["nor", "NOR", "not or"]; exports.norOperators = norOperators; var xnorOperators = ["xnor", "XNOR", "equals", "EQUALS", "not xor"]; exports.xnorOperators = xnorOperators;