Esempio n. 1
0
        private void write()
        {
            // the meat: write to a buffer and remove when action keys are found (identifying
            // segments by their signatures...
            if (EngineCurrentKeyPress.ProcessingRequired())
            {
                if (EngineBuffer.IsMatchedKeyword())
                {
                    switch (EngineBuffer.KeywordPeek())
                    {
                    case KeywordTypeEnum.ControlFlow:
                        WriteControlFlowKeyword();
                        break;

                    case KeywordTypeEnum.DataType:
                        WriteDataTypeKeyword();
                        break;

                    case KeywordTypeEnum.Function:
                        WriteFunctionKeyword();
                        break;

                    case KeywordTypeEnum.Operator:
                        WriteOperatorKeyword();
                        break;

                    case KeywordTypeEnum.Other:
                        WriteOtherKeyword();
                        break;
                    }
                }

                else if (EngineBuffer.IsNumericConstant())
                {
                    WriteNumericConstant();
                }

                else if (EngineBuffer.IsSQLServerVariable())
                {
                    WriteSqlServerVariable();
                }

                else if (EngineBuffer.IsTextConstant())
                {
                    WriteTextConstant();
                }

                else if (EngineBuffer.IsMatchedOrganisationId())
                {
                    WriteOrganisationId();
                }

                else if (EngineBuffer.IsFieldOrVariable())
                {
                    WriteField();
                }

                if (EngineCurrentKeyPress.KeyFamily == KeyFamilyEnum.OperatorKey)
                {
                    WriteOperator();
                }
                else
                {
                    WriteAction();
                }
            }
            else
            {
                EngineBuffer.Next(EngineCurrentKeyPress);
            }
        }