package tiny_languages

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Basic_parseSource

Sourcetype op =
  1. | Add
  2. | Sub
  3. | Mul
  4. | Div
  5. | Pow
  6. | Eq
  7. | Ne
  8. | Lt
  9. | Le
  10. | Gt
  11. | Ge
  12. | And
  13. | Or
Sourcetype expr =
  1. | Num of float
  2. | Str of string
  3. | Var of string
  4. | Index of string * expr list
  5. | Call of string * expr list
  6. | Fn of string * expr
  7. | Neg of expr
  8. | Not of expr
  9. | Bin of op * expr * expr
Sourcetype item =
  1. | Expr of expr
  2. | Tab of expr
  3. | Spc of expr
Sourcetype sep =
  1. | Semi
  2. | Comma
  3. | Newline
Sourcetype lvalue =
  1. | Scalar of string
  2. | Elem of string * expr list
Sourcetype datum =
  1. | D_num of float
  2. | D_str of string
Sourcetype stmt =
  1. | Print of (item * sep) list
  2. | Input of string option * lvalue list
  3. | Let of lvalue * expr
  4. | If of expr
  5. | Goto of expr
  6. | Gosub of expr
  7. | On of expr * bool * int list
  8. | Return
  9. | For of string * expr * expr * expr option
  10. | Next of string list
  11. | Dim of (string * expr list) list
  12. | Data of datum list
  13. | Read of lvalue list
  14. | Restore
  15. | Def of string * string * expr
  16. | End
  17. | Stop
  18. | Rem
  19. | List
  20. | Run
  21. | New
  22. | Bye
  23. | Fp
  24. | Int
  25. | Catalog
  26. | Load of string
  27. | Save of string
  28. | Run_file of string
Sourcetype line =
  1. | Numbered of int * stmt list option
  2. | Direct of stmt list
Sourceval capitals : string -> string
Sourceval parse_line : string -> (line, string) result
Sourceval functions : string list
Sourceval is_string : string -> bool