summaryrefslogtreecommitdiffstats
path: root/microbe/parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'microbe/parser.h')
-rw-r--r--microbe/parser.h54
1 files changed, 27 insertions, 27 deletions
diff --git a/microbe/parser.h b/microbe/parser.h
index ece433d..7a51e41 100644
--- a/microbe/parser.h
+++ b/microbe/parser.h
@@ -25,8 +25,8 @@
#include "instruction.h"
#include "microbe.h"
-#include "qmap.h"
-#include "qvaluelist.h"
+#include "tqmap.h"
+#include "tqvaluelist.h"
class PIC14;
@@ -48,7 +48,7 @@ class Statement
/**
* Returns the microbe code from content.
*/
- QString text() const { return content.text(); }
+ TQString text() const { return content.text(); }
/**
* If this Statement is for a for loop, then content will contain
* something like "for x = 1 to 10", and bracedCode will contain the
@@ -62,11 +62,11 @@ class Statement
/**
* This breaks up the line seperated by spaces,{,and =/
*/
- static QStringList tokenise(const QString &line);
+ static TQStringList tokenise(const TQString &line);
/**
- * @see tokenise(const QString &line)
+ * @see tokenise(const TQString &line)
*/
- QStringList tokenise() const { return tokenise( content.text() ); }
+ TQStringList tokenise() const { return tokenise( content.text() ); }
/**
* @returns whether or not the content looks like a label (ends with a
* colon).
@@ -74,7 +74,7 @@ class Statement
bool isLabel() const { return content.text().right(1) == ":"; }
};
-typedef QValueList<Statement> StatementList;
+typedef TQValueList<Statement> StatementList;
/**
@author Daniel Clarke
@@ -114,12 +114,12 @@ class Field
/**
* Create a Field.
*/
- Field( Type type, const QString & key = 0 );
+ Field( Type type, const TQString & key = 0 );
/**
* Create a Field (this constructor should only be used with
* FixedStrings.
*/
- Field( Type type, const QString & key, const QString & string, bool compulsory = true);
+ Field( Type type, const TQString & key, const TQString & string, bool compulsory = true);
/**
* The type of field expected.
@@ -128,13 +128,13 @@ class Field
/**
* String data relevant to the field dependent on m_type.
*/
- QString string() const { return m_string; }
+ TQString string() const { return m_string; }
/**
* The key in which the found token will be attached to
* in the output map. If it is an empty string, then the field will be
* processed but not put in the output, effectively ignoring it.
*/
- QString key() const { return m_key; }
+ TQString key() const { return m_key; }
/**
* Only FixedStrings may be compulsory, that is the only type that can
* actually have its presence checked.
@@ -147,8 +147,8 @@ class Field
private:
Type m_type;
- QString m_string;
- QString m_key;
+ TQString m_string;
+ TQString m_key;
bool m_compulsory;
};
@@ -167,14 +167,14 @@ class OutputField
/**
* Constructs an output field consisting of a single string.
*/
- OutputField( const QString &string );
+ OutputField( const TQString &string );
- QString string() const { return m_string; }
+ TQString string() const { return m_string; }
SourceLineList bracedCode() const { return m_bracedCode; }
bool found() const { return m_found; }
private:
- QString m_string;
+ TQString m_string;
SourceLineList m_bracedCode;
/**
* This specifies if a non compulsory field was found or not.
@@ -182,9 +182,9 @@ class OutputField
bool m_found;
};
-typedef QValueList<Field> StatementDefinition;
-typedef QMap<QString,StatementDefinition> DefinitionMap;
-typedef QMap<QString,OutputField> OutputFieldMap;
+typedef TQValueList<Field> StatementDefinition;
+typedef TQMap<TQString,StatementDefinition> DefinitionMap;
+typedef TQMap<TQString,OutputField> OutputFieldMap;
/**
@@ -203,7 +203,7 @@ class Parser
* message, only applicable to some errors (such as a use of a reserved
* keyword).
*/
- void mistake( Microbe::MistakeType type, const QString & context = 0 );
+ void mistake( Microbe::MistakeType type, const TQString & context = 0 );
/**
* Creates a new instance of the parser class with all state information
* (class members) copied from this instance of the class. Don't forget to
@@ -241,21 +241,21 @@ class Parser
* 1 = variable.
* 2 = expression that needs evaluating.
*/
- ExprType getExpressionType( const QString & expression );
+ ExprType getExpressionType( const TQString & expression );
/**
* Examines the text to see if it looks like a literal, i.e. of the form
* "321890","021348","0x3C","b'0100110'","0101001b","h'43A'", or "2Ah".
* Everything else is considered non-literal.
* @see literalToInt.
*/
- static bool isLiteral( const QString &text );
+ static bool isLiteral( const TQString &text );
/**
* Tries to convert the given literal string into a integer. If it fails,
* i.e. it is not any recognised literal, then it returns -1 and sets *ok to
* false. Else, *ok is set to true and the literal value is returned.
* @see isLiteral
*/
- static int literalToInt( const QString & literal, bool * ok = 0l );
+ static int literalToInt( const TQString & literal, bool * ok = 0l );
/**
* Does the specified operation on the given numbers and returns the result.
*/
@@ -264,10 +264,10 @@ class Parser
* @return whether it was an assignment (which might not have been in
* the proper form).
*/
- bool processAssignment(const QString &line);
+ bool processAssignment(const TQString &line);
- void compileConditionalExpression( const QString & expression, Code * ifCode, Code * elseCode ) const;
- QString processConstant(const QString &expression, bool * isConstant, bool suppressNumberTooBig = false) const;
+ void compileConditionalExpression( const TQString & expression, Code * ifCode, Code * elseCode ) const;
+ TQString processConstant(const TQString &expression, bool * isConstant, bool suppressNumberTooBig = false) const;
private:
/**
@@ -276,7 +276,7 @@ class Parser
* @param name Name of the statement to be processed
* @param fieldMap A map of named fields as appropriate to the statement
*/
- void processStatement( const QString & name, const OutputFieldMap & fieldMap );
+ void processStatement( const TQString & name, const OutputFieldMap & fieldMap );
DefinitionMap m_definitionMap;
PIC14 * m_pPic;