summaryrefslogtreecommitdiff
path: root/tests/examplefiles/example.snobol
blob: 26ca5cf4112a9fdbb800a22acff1a1fff71e9e21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-SOME RANDOM DIRECTIVE WOULD GO HERE
*
* SNOBOL4 example file for lexer
*
 SOME.THING_OR_OTHER32 = 1 + 1.0 - 1E3 * 1E-3 ** 2.718284590E0
+ :F(END)S(IN_LOOP) 
 PATTERN = LEN(3) ("GAR" | "BAR")
IN_LOOP THING = INPUT :F(END)
 THING LEN(3) ("GAR" | "BAR") :S(OK)
 OUTPUT = THING " : Failure!" :(IN_LOOP)
OK OUTPUT = THING ' : "Success"!' :(IN_LOOP)
END
FOOBAR
FOOGAR
THiNIg