Syntax for Algebraic Option

When adding a named expression, HFSS users have the option of defining it using algebraic expressions.

An algebraic expression is either a namedExpression, a constant, a name, an operator, two expressions separated by a binaryOperator, or an expression enclosed in parenthesis.

An operator is an opName followed by arguments.

An argument is either empty parenthesis, an expression enclosed by parenthesis, or two expressions separated by a comma and enclosed by parenthesis.

A binaryOperator is one of the following literals: ‘+’, ‘-’, ‘*’, ‘/’

A name is either a project, design, or intrinsic variable (scalar or vector), or a geometry.

A constant can be one of the following:

The syntax for an algebraic expression is summarized below.

expression : namedExpression

| constant

| name

| operator

| expression binaryOperator expression

| '(' expression ')'

operator : opName arguments

binaryOperator : + | - | * | /

arguments : <empty>

| '(' expression ')'

| '(' expression ',' expression ')