Some languages (e.g. in C, C++ and [[PHP]]) define a fixed set of operators, while others (e.g. [[Prolog]],<ref>{{Cite web|url=https://www.swi-prolog.org/pldoc/man?predicate=op/3|title=SWI-Prolog -- op/3|website=www.swi-prolog.org}}</ref> [[Seed7]],<ref>{{Cite web|url=http://seed7.sourceforge.net/examples/operator.htm|title=Declare an operator|website=seed7.sourceforge.net}}</ref> [[F Sharp (programming language)|F#]], [[OCaml]], [[Haskell]]) allow for user-defined operators. Some programming languages restrict operator symbols to special characters like {{mono|1='''[[Addition|+]]'''}} or {{mono|1='''[[Assignment (computer science)|:=]]'''}} while others allow names like <code>[[Integer_division#Division_of_integers|div]]</code> (e.g. [[Pascal (programming language)|Pascal]]).
Most languages have built-in operators, but do not allowsupport user-defined operators,assince thisthe feature significantly complicates parsing.{{efn|Introducing a new operator changes the [[lexical specification]] of the language, which changes the [[lexical analysis]]. The arity and precedence of the operator is then part of the phrase syntax of the language, which changes the phrase-level analysis. For example, adding an operator <code>@</code> requires lexing and tokenizing this character, and the phrase structure (syntax tree) depends on the arity and precedence of this operator.}} Many languages only allow operators to be used for built-in types, but otherssome allow existing operators to be used[[operator overloading|overloaded]] for user-defined types (via [[operator overloading]]). Some languages allow new operators to be defined,however, either at compile time or at run time. Thiswhich may involve meta-programming (specifying the operators in a separate language), or within the language itself. Definition of new operators, particularly runtime definition, often makes correct [[static analysis]] of programs impossible, since the syntax of the language may be Turing-complete, so even constructing the syntax tree may require solving the halting problem, which is impossible. This occurs for [[Perl]], for example, and some dialects of [[Lisp (programming language)|Lisp]].