summaryrefslogtreecommitdiff
path: root/ragel/rlparse.kl
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2007-03-10 03:58:06 +0000
committerAdrian Thurston <thurston@complang.org>2007-03-10 03:58:06 +0000
commit4821a45415f38bc697ea4eef95da049ffade6dfc (patch)
treec871f682a3eab330c1e2d44e014909f4c3e69db4 /ragel/rlparse.kl
parent947b51210397908ceaa44eddd1e228e5eaea08f3 (diff)
downloadragel-4821a45415f38bc697ea4eef95da049ffade6dfc.tar.gz
When multiple conditions are executed on a single character they need to have a
forced order. Previously, ordering relied on pointer-based sets, which caused results to vary by compiler. Ordering is now done using conditon action declaration order. This fixes the failure of cond4.rl which occurred with g++ 4.1 and other compiler versions.
Diffstat (limited to 'ragel/rlparse.kl')
-rw-r--r--ragel/rlparse.kl5
1 files changed, 3 insertions, 2 deletions
diff --git a/ragel/rlparse.kl b/ragel/rlparse.kl
index 37e52875..4fb79765 100644
--- a/ragel/rlparse.kl
+++ b/ragel/rlparse.kl
@@ -109,7 +109,8 @@ action_spec:
else {
//cerr << "NEW ACTION " << $2->data << " " << $4->inlineList << endl;
/* Add the action to the list of actions. */
- Action *newAction = new Action( $3->loc, $2->data, $4->inlineList );
+ Action *newAction = new Action( $3->loc, $2->data,
+ $4->inlineList, pd->nextCondId++ );
/* Insert to list and dict. */
pd->actionList.append( newAction );
@@ -688,7 +689,7 @@ nonterm action_embed_block uses action_ref;
action_embed_block:
'{' inline_block '}' final {
/* Create the action, add it to the list and pass up. */
- Action *newAction = new Action( $1->loc, 0, $2->inlineList );
+ Action *newAction = new Action( $1->loc, 0, $2->inlineList, pd->nextCondId++ );
pd->actionList.append( newAction );
$$->action = newAction;
};