<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE250%3Alab-9%3Atwon069</id>
	<title>SE250:lab-9:twon069 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE250%3Alab-9%3Atwon069"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-9:twon069&amp;action=history"/>
	<updated>2026-04-28T14:47:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.kram.nz/index.php?title=SE250:lab-9:twon069&amp;diff=8751&amp;oldid=prev</id>
		<title>Mark: 3 revision(s)</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-9:twon069&amp;diff=8751&amp;oldid=prev"/>
		<updated>2008-11-03T05:20:40Z</updated>

		<summary type="html">&lt;p&gt;3 revision(s)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==PROBLEMS!==&lt;br /&gt;
*Took quite a while reading through the pdf, and very confused afterward.&lt;br /&gt;
*After choosing option 1, very confused as what I&amp;#039;m suppose to do, so I looked at the toy_tokeniser and decided, this could be it! (copy &amp;amp; paste = win!)&lt;br /&gt;
&lt;br /&gt;
==Approach==&lt;br /&gt;
*After reading through toy_tokeniser and tokenise.h, and came to a great realization of what to do! Flesh out all functions in toy_tokeniser! and rewrite them to a PROPER tokeniser.&lt;br /&gt;
*Started with eqToken() function, and below is what I&amp;#039;ve came up according to the constraint:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool eqToken( Token a, Token b ) {&lt;br /&gt;
	if (a.type != b.type) {&lt;br /&gt;
		return false;&lt;br /&gt;
	}&lt;br /&gt;
	if (a.type == T_INTEGER) {&lt;br /&gt;
		return a.val.intval == b.val.intval;&lt;br /&gt;
	} else if (a.type == T_FLOAT) {&lt;br /&gt;
		return a.val.fltval == b.val.fltval;&lt;br /&gt;
	} else if (a.type == T_IDENT || a.type == T_SYMBOL) {&lt;br /&gt;
		return a.val.symval == b.val.symval;&lt;br /&gt;
	} else if (a.type == T_STRING) {&lt;br /&gt;
		return a.val.strval == b.val.strval;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//T_END and T_NOTHING are treated equal&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Rest of the function beside, void init_predefined_tokens( ), seen correct to me... confused again due to the lengthy lab notes and it&amp;#039;s this easy?&lt;br /&gt;
*So continue onto void init_predefined_tokens( )...&lt;br /&gt;
&lt;br /&gt;
*After reading through the pdf nth time, with no mentioning of init_predefiened_tokens is suppose to do, I logged off.&lt;br /&gt;
&lt;br /&gt;
==CONCLUSION SO FAR==&lt;br /&gt;
Very confusing lab, very confusing indeed....&lt;br /&gt;
&lt;br /&gt;
TO BE CONTINUE....&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>