about summary refs log tree commit diff
path: root/users/wpcarro/scratch/simple-select/main.py
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2022-02-28T18·51-0800
committerclbot <clbot@tvl.fyi>2022-02-28T18·55+0000
commit7770ccf0e3d929f0db7b58b3e21eac75bc136537 (patch)
treec62e66d7080ae80f6876dd1d83997ed26ecb56fc /users/wpcarro/scratch/simple-select/main.py
parent72b46e8fe80d9c8c708602387b4d46cce6bb266d (diff)
feat(wpcarro/simple-select): Support basic Scanner class r/3879
...alongside a small REPL to quickly test the functionality.

Change-Id: I3c2b3f060d82cd49488e00dec9b72f7b23e2b666
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5337
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/wpcarro/scratch/simple-select/main.py')
-rw-r--r--users/wpcarro/scratch/simple-select/main.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/users/wpcarro/scratch/simple-select/main.py b/users/wpcarro/scratch/simple-select/main.py
new file mode 100644
index 000000000000..6a86324ef73f
--- /dev/null
+++ b/users/wpcarro/scratch/simple-select/main.py
@@ -0,0 +1,13 @@
+from scanner import Scanner
+
+def tokenize(x):
+  s = Scanner(x)
+  return None
+
+def main():
+  while True:
+    x = input("> ")
+    print(tokenize(x))
+
+if __name__ == "__main__":
+  main()