Jeongik Cha | 1199caa | 2021-07-20 12:32:58 +0900 | [diff] [blame] | 1 | #---------------------------- |
| 2 | # Example Configuration File |
| 3 | #--------------------------- |
| 4 | # |
| 5 | |
| 6 | application: |
| 7 | { |
| 8 | |
| 9 | /* This section defines some settings for our |
| 10 | * main application window, such as size and |
| 11 | * position. |
| 12 | */ |
| 13 | |
| 14 | window: |
| 15 | { |
| 16 | title = "My Application"; |
| 17 | size = { /* width */ w = 640; /* height */ h = 480; }; |
| 18 | pos = { x = 350; y = 250; }; |
| 19 | }; |
| 20 | |
| 21 | a = 5; |
| 22 | b = 6; |
| 23 | ff = 1E6; |
| 24 | test-comment = "/* hello\n \"there\"*/"; |
| 25 | |
| 26 | test-long-string = "A very long string that spans multiple lines. " |
| 27 | /* but wait, there's more... */ "Adjacent strings are automatically" |
| 28 | " concatenated."; |
| 29 | |
| 30 | test-escaped-string = "\"This is\n a test.\""; |
| 31 | |
| 32 | group1: |
| 33 | { |
| 34 | x = 5; y = 10; |
| 35 | my_array = [ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 ]; |
| 36 | flag = TRUE; |
| 37 | |
| 38 | group2: { zzz = "this is a test"; }; |
| 39 | |
| 40 | states = [ "CT", // Connecticut |
| 41 | "CA", // California |
| 42 | "TX", // Texas |
| 43 | "NV", // Nevada |
| 44 | "FL" // Florida |
| 45 | ]; |
| 46 | }; |
| 47 | |
| 48 | /* this would cause an error */ |
| 49 | // a = "hi!"; |
| 50 | }; |
| 51 | |
| 52 | binary = [ 0xAA, 0xBB, 0xCC ]; |
| 53 | |
| 54 | list = ( ( "abc", 123, true ), 1.234, ( /* an empty list */ ) ,[ 1, 2, 3 ], |
| 55 | { a = (1, 2, true); } ); |
| 56 | |
| 57 | books = ( "inventory", |
| 58 | { title = "Treasure Island"; |
| 59 | author = "Robert Louis Stevenson"; |
| 60 | price = 29.99; |
| 61 | qty = 5; }, |
| 62 | { title = "Snow Crash"; |
| 63 | author = "Neal Stephenson"; |
| 64 | price = 9.99; |
| 65 | qty = 8; }, |
| 66 | { } ); |
| 67 | |
| 68 | # miscellaneous stuff |
| 69 | |
| 70 | misc: |
| 71 | { |
| 72 | port = 5000; |
| 73 | pi = 3.14159265; |
| 74 | enabled = FALSE; |
| 75 | mask = 0xAABBCCDD; |
| 76 | unicode = "STARGΛ̊TE SG-1"; // UTF-8 string |
| 77 | bigint = 9223372036854775807L; |
| 78 | bighex = 0x1122334455667788L; |
| 79 | }; |
| 80 | |
| 81 | |
| 82 | ### eof |