This commit is contained in:
miks1965 2018-06-12 21:29:12 +03:00
parent 5a9ef45312
commit e0bf9736d4
8 changed files with 39 additions and 6 deletions

View file

@ -0,0 +1,7 @@
uses Graph3D;
begin
var s := Sphere(0,1,2,2,Colors.Orchid);
s.AddChild(Sphere(0,2,1,0.5,Colors.White));
s.Rotate(OrtZ,90);
end.

View file

@ -0,0 +1,17 @@
uses Graph3D;
begin
for var i:=0 to 6 do
Sphere(6-2*i,-3,0,1,
Materials.Diffuse(Colors.Green) +
Materials.Specular(255-32*i,100));
for var i:=0 to 6 do
Sphere(6-2*i,0,0,1,
Materials.Diffuse(Colors.Green) +
Materials.Specular(255,100-15*i));
for var i:=0 to 6 do
Sphere(6-2*i,3,0,1,
Materials.Diffuse(Colors.Green) +
Materials.Specular(128,100) +
Materials.Emissive(GrayColor(15*i)));
end.

View file

@ -1,9 +1,9 @@
//
// This CSharp output file generated by Gardens Point LEX
// Version: 1.1.3.301
// Machine: DESKTOP-7B4K9VB
// DateTime: 04.06.2018 17:39:57
// UserName: Bogdan
// Machine: DESKTOP-A6LT9RI
// DateTime: 12.06.2018 21:27:13
// UserName: ?????????
// GPLEX input file <ABCPascal.lex>
// GPLEX frame file <embedded resource>
//

View file

@ -2950,6 +2950,8 @@ typeof_expr
question_expr
: expr_l1 tkQuestion expr_l1 tkColon expr_l1
{
if ($3 is nil_const && $5 is nil_const)
parsertools.AddErrorFromResource("TWO_NILS_IN_QUESTION_EXPR",@3);
$$ = new question_colon_expression($1, $3, $5, @$);
}
;

View file

@ -1,9 +1,9 @@
// (see accompanying GPPGcopyright.rtf)
// GPPG version 1.3.6
// Machine: DESKTOP-7B4K9VB
// DateTime: 04.06.2018 17:39:58
// UserName: Bogdan
// Machine: DESKTOP-A6LT9RI
// DateTime: 12.06.2018 21:27:14
// UserName: ?????????
// Input file <ABCPascal.y>
// options: no-lines gplex
@ -5146,6 +5146,8 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
break;
case 582: // question_expr -> expr_l1, tkQuestion, expr_l1, tkColon, expr_l1
{
if (ValueStack[ValueStack.Depth-3].ex is nil_const && ValueStack[ValueStack.Depth-1].ex is nil_const)
parsertools.AddErrorFromResource("TWO_NILS_IN_QUESTION_EXPR",LocationStack[LocationStack.Depth-3]);
CurrentSemanticValue.ex = new question_colon_expression(ValueStack[ValueStack.Depth-5].ex, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
}
break;

View file

@ -189,6 +189,9 @@ script=

View file

@ -62,3 +62,4 @@ OVERLOAD_IS_NOT_USED=overload is not used in PascalABC.NET
ONLY_BASE_ASSIGNMENT_FOR_TUPLE=Tuple allows only base assignment :=
BAD_FORMAT_STRING=Interpolated string has invalid format
TUPLE_ELEMENTS_COUNT_MUST_BE_LESSEQUAL_7=Count of Tuple elements must be <=7
TWO_NILS_IN_QUESTION_EXPR=The conditional expression cannot contain nil constants on both branches

View file

@ -61,3 +61,4 @@ OVERLOAD_IS_NOT_USED=overload не используется в PascalABC.NET
ONLY_BASE_ASSIGNMENT_FOR_TUPLE=Для кортежа допустимо только обычное присваивание :=
BAD_FORMAT_STRING=Встречена неправильная форматная строка
TUPLE_ELEMENTS_COUNT_MUST_BE_LESSEQUAL_7=Количество элементов кортежа не должно быть больше 7
TWO_NILS_IN_QUESTION_EXPR=Условное выражение не может содержать константы nil по обеим веткам