-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[asl][reference] work on Literals chapter and print statements
- Loading branch information
1 parent
2ba6d59
commit 11d0abf
Showing
8 changed files
with
190 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
asllib/tests/ASLSemanticsReference.t/SemanticsRule.SPrint.asl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
type MyEnum of enumeration { LABEL_A, LABEL_B, LABEL_C }; | ||
func main () => integer | ||
begin | ||
print("string_"); | ||
print("number_"); | ||
println(1); | ||
println(1_000__000); | ||
println(0xa_b_c_d_e_f__A__B__C__D__E__F__0___12345567890); | ||
println(TRUE); | ||
println(FALSE); | ||
println(1234567890.0123456789); | ||
println("hello\\world\n\t \"here I am \""); | ||
print(""); | ||
println('11 01'); | ||
println(''); | ||
println(LABEL_B); | ||
return 0; | ||
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
// Comment example 1. | ||
|
||
// In next line, the two strings "/*" and "*/" are regular characters within the comment | ||
// start of comment, /* still in comment */ and still in comment which ends with newline | ||
|
||
/* line 1 of example 2, a single comment 4 lines long. | ||
line 2 of the comment | ||
// line 3 of the comment, the "//" at start of this line are just regular characters | ||
// line 4 of the comment, this 4 line comment ends with these two characters -->*/ | ||
|
||
/* L1 Comment example 3, shows you cannot nest or mix comment styles. | ||
/* L2 Note the declaration of the storage FOO on L6, is outside of the comment. | ||
/* L3 Note the first two characters on L6 do NOT start a nested comment. | ||
/* L4 However, the two chars '*' and '/' following the line number L6, terminate | ||
/* L5 the comment started on L1. | ||
/* L6 */ var FOO : integer = 1; // The declaration of FOO is not within any comment */ | ||
|
||
/* L7 The last two characters on line L6 have no special meaning, */ | ||
/* L8 they are just characters within the comment that started with the "//". */ |