1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
35 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
37 Istream& IPstream::read(token& t)
39 // Return the put back token if it exists
40 if (Istream::getBack(t))
54 // Set the line number of this token to the current stream line number
55 t.lineNumber() = lineNumber();
57 // Analyse input starting with this character.
61 case token::END_STATEMENT :
62 case token::BEGIN_LIST :
63 case token::END_LIST :
64 case token::BEGIN_SQR :
66 case token::BEGIN_BLOCK :
67 case token::END_BLOCK :
72 case token::SUBTRACT :
73 case token::MULTIPLY :
76 t = token::punctuationToken(c);
83 word* wPtr = new word;
86 if (token::compound::isCompound(*wPtr))
88 t = token::compound::New(*wPtr, *this).ptr();
107 string* sPtr = new string;
136 case token::FLOAT_SCALAR :
151 case token::DOUBLE_SCALAR :
165 // Character (returned as a single character word) or error
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 } // End namespace Foam
187 // ************************************************************************* //