diff options
Diffstat (limited to 'linden/indra/lscript/lscript_compile/indra.y')
-rw-r--r-- | linden/indra/lscript/lscript_compile/indra.y | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/linden/indra/lscript/lscript_compile/indra.y b/linden/indra/lscript/lscript_compile/indra.y index d10cbfe..fdc240c 100644 --- a/linden/indra/lscript/lscript_compile/indra.y +++ b/linden/indra/lscript/lscript_compile/indra.y | |||
@@ -136,6 +136,9 @@ | |||
136 | %token ZERO_VECTOR | 136 | %token ZERO_VECTOR |
137 | %token ZERO_ROTATION | 137 | %token ZERO_ROTATION |
138 | 138 | ||
139 | %token TOUCH_INVALID_VECTOR | ||
140 | %token TOUCH_INVALID_TEXCOORD | ||
141 | |||
139 | %nonassoc LOWER_THAN_ELSE | 142 | %nonassoc LOWER_THAN_ELSE |
140 | %nonassoc ELSE | 143 | %nonassoc ELSE |
141 | 144 | ||
@@ -439,6 +442,40 @@ vector_constant | |||
439 | $$ = new LLScriptSAVector(gLine, gColumn, sa0, sa1, sa2); | 442 | $$ = new LLScriptSAVector(gLine, gColumn, sa0, sa1, sa2); |
440 | gAllocationManager->addAllocation($$); | 443 | gAllocationManager->addAllocation($$); |
441 | } | 444 | } |
445 | | TOUCH_INVALID_VECTOR | ||
446 | { | ||
447 | LLScriptConstantFloat *cf0 = new LLScriptConstantFloat(gLine, gColumn, 0.f); | ||
448 | gAllocationManager->addAllocation(cf0); | ||
449 | LLScriptSAConstant *sa0 = new LLScriptSAConstant(gLine, gColumn, cf0); | ||
450 | gAllocationManager->addAllocation(sa0); | ||
451 | LLScriptConstantFloat *cf1 = new LLScriptConstantFloat(gLine, gColumn, 0.f); | ||
452 | gAllocationManager->addAllocation(cf1); | ||
453 | LLScriptSAConstant *sa1 = new LLScriptSAConstant(gLine, gColumn, cf1); | ||
454 | gAllocationManager->addAllocation(sa1); | ||
455 | LLScriptConstantFloat *cf2 = new LLScriptConstantFloat(gLine, gColumn, 0.f); | ||
456 | gAllocationManager->addAllocation(cf2); | ||
457 | LLScriptSAConstant *sa2 = new LLScriptSAConstant(gLine, gColumn, cf2); | ||
458 | gAllocationManager->addAllocation(sa2); | ||
459 | $$ = new LLScriptSAVector(gLine, gColumn, sa0, sa1, sa2); | ||
460 | gAllocationManager->addAllocation($$); | ||
461 | } | ||
462 | | TOUCH_INVALID_TEXCOORD | ||
463 | { | ||
464 | LLScriptConstantFloat *cf0 = new LLScriptConstantFloat(gLine, gColumn, -1.f); | ||
465 | gAllocationManager->addAllocation(cf0); | ||
466 | LLScriptSAConstant *sa0 = new LLScriptSAConstant(gLine, gColumn, cf0); | ||
467 | gAllocationManager->addAllocation(sa0); | ||
468 | LLScriptConstantFloat *cf1 = new LLScriptConstantFloat(gLine, gColumn, -1.f); | ||
469 | gAllocationManager->addAllocation(cf1); | ||
470 | LLScriptSAConstant *sa1 = new LLScriptSAConstant(gLine, gColumn, cf1); | ||
471 | gAllocationManager->addAllocation(sa1); | ||
472 | LLScriptConstantFloat *cf2 = new LLScriptConstantFloat(gLine, gColumn, 0.f); | ||
473 | gAllocationManager->addAllocation(cf2); | ||
474 | LLScriptSAConstant *sa2 = new LLScriptSAConstant(gLine, gColumn, cf2); | ||
475 | gAllocationManager->addAllocation(sa2); | ||
476 | $$ = new LLScriptSAVector(gLine, gColumn, sa0, sa1, sa2); | ||
477 | gAllocationManager->addAllocation($$); | ||
478 | } | ||
442 | ; | 479 | ; |
443 | 480 | ||
444 | quaternion_constant | 481 | quaternion_constant |
@@ -1645,6 +1682,40 @@ vector_initializer | |||
1645 | $$ = new LLScriptVectorInitializer(gLine, gColumn, sa0, sa1, sa2); | 1682 | $$ = new LLScriptVectorInitializer(gLine, gColumn, sa0, sa1, sa2); |
1646 | gAllocationManager->addAllocation($$); | 1683 | gAllocationManager->addAllocation($$); |
1647 | } | 1684 | } |
1685 | | TOUCH_INVALID_VECTOR | ||
1686 | { | ||
1687 | LLScriptConstantFloat *cf0 = new LLScriptConstantFloat(gLine, gColumn, 0.f); | ||
1688 | gAllocationManager->addAllocation(cf0); | ||
1689 | LLScriptConstantExpression *sa0 = new LLScriptConstantExpression(gLine, gColumn, cf0); | ||
1690 | gAllocationManager->addAllocation(sa0); | ||
1691 | LLScriptConstantFloat *cf1 = new LLScriptConstantFloat(gLine, gColumn, 0.f); | ||
1692 | gAllocationManager->addAllocation(cf1); | ||
1693 | LLScriptConstantExpression *sa1 = new LLScriptConstantExpression(gLine, gColumn, cf1); | ||
1694 | gAllocationManager->addAllocation(sa1); | ||
1695 | LLScriptConstantFloat *cf2 = new LLScriptConstantFloat(gLine, gColumn, 0.f); | ||
1696 | gAllocationManager->addAllocation(cf2); | ||
1697 | LLScriptConstantExpression *sa2 = new LLScriptConstantExpression(gLine, gColumn, cf2); | ||
1698 | gAllocationManager->addAllocation(sa2); | ||
1699 | $$ = new LLScriptVectorInitializer(gLine, gColumn, sa0, sa1, sa2); | ||
1700 | gAllocationManager->addAllocation($$); | ||
1701 | } | ||
1702 | | TOUCH_INVALID_TEXCOORD | ||
1703 | { | ||
1704 | LLScriptConstantFloat *cf0 = new LLScriptConstantFloat(gLine, gColumn, -1.f); | ||
1705 | gAllocationManager->addAllocation(cf0); | ||
1706 | LLScriptConstantExpression *sa0 = new LLScriptConstantExpression(gLine, gColumn, cf0); | ||
1707 | gAllocationManager->addAllocation(sa0); | ||
1708 | LLScriptConstantFloat *cf1 = new LLScriptConstantFloat(gLine, gColumn, -1.f); | ||
1709 | gAllocationManager->addAllocation(cf1); | ||
1710 | LLScriptConstantExpression *sa1 = new LLScriptConstantExpression(gLine, gColumn, cf1); | ||
1711 | gAllocationManager->addAllocation(sa1); | ||
1712 | LLScriptConstantFloat *cf2 = new LLScriptConstantFloat(gLine, gColumn, 0.f); | ||
1713 | gAllocationManager->addAllocation(cf2); | ||
1714 | LLScriptConstantExpression *sa2 = new LLScriptConstantExpression(gLine, gColumn, cf2); | ||
1715 | gAllocationManager->addAllocation(sa2); | ||
1716 | $$ = new LLScriptVectorInitializer(gLine, gColumn, sa0, sa1, sa2); | ||
1717 | gAllocationManager->addAllocation($$); | ||
1718 | } | ||
1648 | ; | 1719 | ; |
1649 | 1720 | ||
1650 | quaternion_initializer | 1721 | quaternion_initializer |