(* ISO EBNF description of the PoZeTools input syntax, using Extended Backus-Naur Form according to ISO/IEC 14977 : 1996(E). See inputfile 'x.poze' which serves as a valid 'poze' example. PoZeTools v 0.52, march 31, 2005. Copyright (c) 2002-2005 Pieter Suurmond. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ON INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *) (* A 'poze' may specify multiple poles and zeros, but not more than one gain parameter. They may appear in any order. Each pole, zero and optional gain takes one single line. Empty lines and lines starting with # are ignored. *) poze = {pole | zero | empty | remark}, [gain], {pole | zero | empty | remark}; pole = {vwhite}, ('P'|'p'), specifier, complex, new line; zero = {vwhite}, ('Z'|'z'), specifier, complex, new line; gain = {vwhite}, ('G'|'g'), specifier, complex, new line; empty = {vwhite}, new line; remark = '#', anything, new line; specifier = {vwhite}, '=', {vwhite}; anything = {terminal character | horizontal tabulation character}; (* All poles, zeros and the optional gain may be supplied in either polar or cartesian form. Note that a 'negative magnitude' may be specified in polar notation! *) complex = ['-'], (cartesian | polar); cartesian = (real, [('+'|'-'), imaginary]) | (imaginary, [('+'|'-'), real ]); polar = [real], exp, '(', {vwhite}, ['-'], arg, {vwhite}, ')', {vwhite}; real = integer, ['.', integer], {vwhite}; imaginary = [real], i; arg = ([real], ([pi], i) | (i, pi) ) | ([pi], ([real], i) | (i, real)) | (i, ([real], [pi]) | (pi, real)); exp = ('e'|'E'), ('x'|'X'), ('p'|'P'), {vwhite}; pi = ('p'|'P'), ('i'|'I'), {vwhite}; i = ('j'|'J'), {vwhite}; vwhite = ' ' | horizontal tabulation character; (* As defined by ISO/IEC 14977 (the following 7 definitions are redundant): *) integer = decimal digit, {decimal digit}; decimal digit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'; (* \t *) horizontal tabulation character = ? ISO 6429 character Horizontal Tabulation ?; (* \r *) new line = {? ISO 6429 character Carriage Return ?}, (* \n *) ? ISO 6429 character Line Feed ?, {? ISO 6429 character Carriage Return ?}; terminal character = letter | decimal digit | ',' | '=' | '|' | '*)' | ')' | ']' | '}' | '-' | "'" | '*' | '"' | '?' | '(*' | '(' | '[' | '{' | ';' | other character; other character = ' ' | ':' | '+' | '_' | '%' | '@' | '&' | '#' | '$' | '<' | '>' | '\' | '^' | '`' | '~'; letter = 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z'; (* End of poze definition. *)