Lines Matching full:eof
34 case EOF:
35 buf.WriteString("EOF")
51 if tok == EOF {
62 {``, "EOF"},
63 {`123`, "123 EOF"},
64 {`x.y`, "x . y EOF"},
65 {`chocolate.éclair`, `chocolate . éclair EOF`},
66 {`123 "foo" hello x.y`, `123 "foo" hello x . y EOF`},
67 {`print(x)`, "print ( x ) EOF"},
68 {`print(x); print(y)`, "print ( x ) ; print ( y ) EOF"},
69 …{"\nprint(\n1\n)\n", "print ( 1 ) newline EOF"}, // final \n is at toplevel on non-blank line => t…
70 {`/ // /= //= ///=`, "/ // /= //= // /= EOF"},
72 print(x)`, "print ( x ) EOF"},
85 `EOF`},
86 // EOF should act line an implicit newline.
88 "def f ( ) : pass EOF"},
91 "def f ( ) : newline indent pass newline outdent EOF"},
95 "def f ( ) : newline indent pass newline outdent EOF"},
99 "def f ( ) : newline indent pass newline outdent EOF"},
103 "def f ( ) : newline indent pass newline outdent EOF"},
107 pass`, "pass newline pass EOF"}, // consecutive newlines are consolidated
110 `, "def f ( ) : newline indent pass newline outdent EOF"},
113 ` + "\n", "def f ( ) : newline indent pass newline outdent EOF"},
114 {"pass", "pass EOF"},
115 {"pass\n", "pass newline EOF"},
116 {"pass\n ", "pass newline EOF"},
117 {"pass\n \n", "pass newline EOF"},
118 {"if x:\n pass\n ", "if x : newline indent pass newline outdent EOF"},
120 2`, `x = 1 + 2 EOF`},
121 {`x = 'a\nb'`, `x = "a\nb" EOF`},
122 {`x = r'a\nb'`, `x = "a\\nb" EOF`},
123 {"x = 'a\\\nb'", `x = "ab" EOF`},
124 {`x = '\''`, `x = "'" EOF`},
125 {`x = "\""`, `x = "\"" EOF`},
126 {`x = r'\''`, `x = "\\'" EOF`},
127 {`x = '''\''''`, `x = "'" EOF`},
128 {`x = r'''\''''`, `x = "\\'" EOF`},
129 {`x = ''''a'b'c'''`, `x = "'a'b'c" EOF`},
130 {"x = '''a\nb'''", `x = "a\nb" EOF`},
131 {"x = '''a\rb'''", `x = "a\nb" EOF`},
132 {"x = '''a\r\nb'''", `x = "a\nb" EOF`},
133 {"x = '''a\n\rb'''", `x = "a\n\nb" EOF`},
134 {"x = r'a\\\nb'", `x = "a\\\nb" EOF`},
135 {"x = r'a\\\rb'", `x = "a\\\nb" EOF`},
136 {"x = r'a\\\r\nb'", `x = "a\\\nb" EOF`},
137 {"a\rb", `a newline b EOF`},
138 {"a\nb", `a newline b EOF`},
139 {"a\r\nb", `a newline b EOF`},
140 {"a\n\nb", `a newline b EOF`},
142 {"0", `0 EOF`},
143 {"00", `0 EOF`},
144 {"0.", `0.000000e+00 EOF`},
145 {"0.e1", `0.000000e+00 EOF`},
146 {".0", `0.000000e+00 EOF`},
147 {"0.0", `0.000000e+00 EOF`},
148 {".e1", `. e1 EOF`},
149 {"1", `1 EOF`},
150 {"1.", `1.000000e+00 EOF`},
151 {".1", `1.000000e-01 EOF`},
152 {".1e1", `1.000000e+00 EOF`},
153 {".1e+1", `1.000000e+00 EOF`},
154 {".1e-1", `1.000000e-02 EOF`},
155 {"1e1", `1.000000e+01 EOF`},
156 {"1e+1", `1.000000e+01 EOF`},
157 {"1e-1", `1.000000e-01 EOF`},
158 {"123", `123 EOF`},
159 {"123e45", `1.230000e+47 EOF`},
160 …9999999999999999999999999999999999999", `999999999999999999999999999999999999999999999999999 EOF`},
161 {"12345678901234567890", `12345678901234567890 EOF`},
163 {"0xA", `10 EOF`},
164 {"0xAAG", `170 G EOF`},
166 {"0XA", `10 EOF`},
168 {"0xA.", `10 . EOF`},
169 {"0xA.e1", `10 . e1 EOF`},
170 {"0x12345678deadbeef12345678", `5634002672576678570168178296 EOF`},
172 {"0b1010", `10 EOF`},
173 {"0B111101", `61 EOF`},
175 {"0b1010201", `10 201 EOF`},
176 {"0b1010.01", `10 1.000000e-02 EOF`},
177 {"0b0000", `0 EOF`},
179 {"0o123", `83 EOF`},
180 {"0o12834", `10 834 EOF`},
181 {"0o12934", `10 934 EOF`},
182 {"0o12934.", `10 9.340000e+02 EOF`},
183 {"0o12934.1", `10 9.341000e+02 EOF`},
184 {"0o12934e1", `10 9.340000e+03 EOF`},
185 {"0o123.", `83 . EOF`},
186 {"0o123.1", `83 1.000000e-01 EOF`},
192 {`"\037"`, `"\x1f" EOF`},
194 {`"\378"`, `"\x1f8" EOF`}, // = '\37' + '8'
197 {`"\x00\x20\x09\x41\x7e\x7f"`, `"\x00 \tA~\x7f" EOF`}, // DEL is non-printable
206 {`"\u0400"`, `"Ѐ" EOF`},
208 {`"\u04000"`, `"Ѐ0" EOF`}, // = U+0400 + '0'
210 {`"\u4E16"`, `"世" EOF`},
213 {`"\U00000400"`, `"Ѐ" EOF`},
215 {`"\U000004000"`, `"Ѐ0" EOF`}, // = U+0400 + '0'
217 {`"\U0010FFFF"`, `"\U0010ffff" EOF`},
219 {`"\U0001F63F"`, `"" EOF`},
228 {`"\""`, `"\"" EOF`},
229 {`"\'"`, `"'" EOF`},
231 {`'\''`, `"'" EOF`},
232 {`'\"'`, `"\"" EOF`},
234 {`"""\""""`, `"\"" EOF`},
235 {`"""\'"""`, `"'" EOF`},
237 {`'''\''''`, `"'" EOF`},
238 {`'''\"'''`, `"\"" EOF`},
239 {`r"\w"`, `"\\w" EOF`},
240 {`r"\""`, `"\\\"" EOF`},
241 {`r"\'"`, `"\\'" EOF`},
242 {`r'\w'`, `"\\w" EOF`},
243 {`r'\''`, `"\\'" EOF`},
244 {`r'\"'`, `"\\\"" EOF`},
250 {`b"\377\378\x80\xff\xFf"`, `b"\xff\x1f8\x80\xff\xff" EOF`}, // hex/oct escapes allow non-ASCII
254 {"012934.", `1.293400e+04 EOF`},
255 {"012934.1", `1.293410e+04 EOF`},
256 {"012934e1", `1.293400e+05 EOF`},
257 {"0123.", `1.230000e+02 EOF`},
258 {"0123.1", `1.231000e+02 EOF`},
262 {"([{<>}])", "( [ { < > } ] ) EOF"},
263 {"f();", "f ( ) ; EOF"},
265 … pass\n ", `def f ( ) : newline indent if x : newline indent pass newline outdent outdent EOF`},
266 {`while cond: pass`, "while cond : pass EOF"},
268 {"~= ~= 5", "~ = ~ = 5 EOF"},
269 {"0in", "0 in EOF"},
271 {"6in", "6 in EOF"},
272 {"6or", "6 or EOF"},
279 // Success cases all end in EOF.
307 for sc.nextToken(&val) != EOF {