The Common Expression Language (CEL) is a non-Turing complete language designed for simplicity, speed, safety, and portability. CEL's C-like syntax looks nearly identical to equivalent expressions in C++, Go, Java, and TypeScript. A CEL "program" is a single expression. The examples have been tagged as java, go, and typescript within the markdown to showcase the commonality of the syntax. CEL is ideal for lightweight expression evaluation when a fully sandboxed scripting language is too resource intensive. To get started, try the Codelab. Determine the variables and functions you want to provide to CEL. Parse and check an expression to make sure it's valid. Then evaluate the output AST against some input. Checking is optional but strongly encouraged. The parsing phase indicates whether the expression is syntactically valid and expands any macros present within the environment. Parsing and checking are more computationally expensive than evaluation.

Features

  • Parse and Check
  • Macros are optional but enabled by default
  • Evaluate for fun and profit
  • To improve the odds of successful evaluation with partial state, CEL uses commutative logical operators &&, ||
  • Parse and check errors have friendly error messages with pointers to where the issues occur in source
  • Both the parsed and checked expressions contain source position information about each node that appears in the output AST

Project Samples

Project Activity

See All Activity >

Categories

Frameworks

License

Apache License V2.0

Follow Common Expression Language

Common Expression Language Web Site

Other Useful Business Software
Auth0 for AI Agents now in GA Icon
Auth0 for AI Agents now in GA

Ready to implement AI with confidence (without sacrificing security)?

Connect your AI agents to apps and data more securely, give users control over the actions AI agents can perform and the data they can access, and enable human confirmation for critical agent actions.
Start building today
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Common Expression Language!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Go

Related Categories

Go Frameworks

Registered

2023-01-31