pt::grammar::peg
    start := (Expression)
    rules
        AddOp :: <value> :=
            /
                '-'
                '+'
        Digit :: <value> :=
            /
                '0'
                '1'
                '2'
                '3'
                '4'
                '5'
                '6'
                '7'
                '8'
                '9'
        Expression :: <value> :=
            /
                (Function)
                /
                    x
                        '\('
                        (Expression)
                        '\)'
                    x
                        (Factor)
                        *
                            x
                                (MulOp)
                                (Factor)
        Factor :: <value> :=
            x
                (Term)
                *
                    x
                        (AddOp)
                        (Term)
        Function :: <value> :=
            (Sinus)
        MulOp :: <value> :=
            /
                '*'
                '/'
        Number :: <value> :=
            x
                ?
                    (Sign)
                +
                    (Digit)
        Sign :: <value> :=
            /
                '-'
                '+'
        Sinus :: <value> :=
            x
                's'
                'i'
                'n'
                '\('
                (Expression)
                '\)'
        Term :: <value> :=
            (Number)
