Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWWDillingham WesleyDillingham <wwdillingham@sugarlabs.org>2009-07-01 18:45:38 (GMT)
committer WWDillingham WesleyDillingham <wwdillingham@sugarlabs.org>2009-07-01 18:45:38 (GMT)
commite22b74cec4a393fce7945cb31fa3327c0e1a7047 (patch)
treec61681e875e46ab8f72044457fb1ba5f29d793d9
parent40b5bf7a4bd79ebde318f2fd8239c19a732588ec (diff)
Non_compound[] now being tallied
-rw-r--r--order_of_operations_parser.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/order_of_operations_parser.php b/order_of_operations_parser.php
index 2a0af29..d2d5e54 100644
--- a/order_of_operations_parser.php
+++ b/order_of_operations_parser.php
@@ -181,7 +181,11 @@ for (i=0;i<=$numRecords;i++)
// can simply not use regexp but replace with a literal reg expression
if(preg_match("+", $equation) && (preg_match("-", $equation) || preg_match("/", $equation) || preg_match("*", $equation)))
{
-
+
+ if ($tok[3] = "1") //is it also correct? put it in a different associative array with the same key
+ {
+ $compound_correct[tok[0]]++;
+ }
}
elseif( (preg_match("-", $equation)) && (preg_match("+", $equation) || preg_match("\/", $equation) || preg_match("*", $equation)))
{
@@ -195,6 +199,10 @@ for (i=0;i<=$numRecords;i++)
{
}
+ else
+ {
+ $non_compound[tok[0]++;
+ }
/*