ama - 2012-06-10

::: if the first digit starts with + or - it fails
:::if the culture is not English it fails because of decimal character
:::if one write 1*+1 it fails
:::All that I solved by small modifications in Lexxer

    'Lexxer tokenizes the input string for parsing
    Public Shared Function Lexxer(str As String) As Queue(Of [Object])
        If str Is Nothing OrElse str.Length = 0 Then
            Throw New Exception("empty string")
        End If
        Dim Temp_queue As Queue(Of [Object]) = New Queue(Of Object)()
        Dim Temp_string As New StringBuilder(str)

        'used for signed numbers.
        'If there were two operators in a row (eg, "1 * - 1"), 
        'the second minus is a negation sign
        Dim TokensInARow As Integer = 1 'it starts implicit with "=" sumbol
        'deal with different cultures
        Dim DecimalSeparator As String =  _
System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator()

:::and
:::replace each "." by DecimalSeparator

:::And then change the signed number detection

'two tokens in a row and the second token being '-' or '+' means it a negative number
'eg: "1 * - 1" means tokens  {"1", "*", "-1" } not {"1","*","-", "1"}
                Dim Temp_Symb As Object = Symbols.[ADD]
                If TokensInARow >= 2 Then _
                Temp_Symb = Temp_queue.ElementAt(Temp_queue.Count - 1)
                If TokensInARow >= 2 AndAlso _
                    (Temp_Symb.Equals(Symbols.[SUB]) OrElse _
                Temp_Symb.Equals(Symbols.[ADD])) Then
                    ParseDigits = Temp_Symb.ToString & ParseDigits