{"id":31267979,"url":"https://github.com/gingerBill/titania","last_synced_at":"2025-09-23T17:03:02.349Z","repository":{"id":314770308,"uuid":"1056641502","full_name":"gingerBill/titania","owner":"gingerBill","description":"Titania Programming Language","archived":false,"fork":false,"pushed_at":"2025-09-14T16:51:56.000Z","size":19,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-14T18:28:05.078Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Odin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gingerBill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-14T14:12:19.000Z","updated_at":"2025-09-14T18:10:41.000Z","dependencies_parsed_at":"2025-09-16T17:32:08.414Z","dependency_job_id":null,"html_url":"https://github.com/gingerBill/titania","commit_stats":null,"previous_names":["gingerbill/titania"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/gingerBill/titania","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gingerBill%2Ftitania","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gingerBill%2Ftitania/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gingerBill%2Ftitania/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gingerBill%2Ftitania/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gingerBill","download_url":"https://codeload.github.com/gingerBill/titania/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gingerBill%2Ftitania/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276613300,"owners_count":25673400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-23T17:02:13.902Z","updated_at":"2025-09-23T17:03:02.343Z","avatar_url":"https://github.com/gingerBill.png","language":"Odin","funding_links":[],"categories":["Odin"],"sub_categories":[],"readme":"# Titania Programming Language\n\nBased on the [Oberon-07](https://people.inf.ethz.ch/wirth/Oberon/Oberon07.Report.pdf) programming language designed by the late [Niklaus Wirth](https://en.wikipedia.org/wiki/Niklaus_Wirth).\n\nThis is designed to be a language to teach compiler development with.\n\nMeaning behind the name:\n * Titania is the wife of Oberon (Fairy King) in Shakespeare's _A Midsummer Night's Dream_\n * \u003chttps://en.wikipedia.org/wiki/Titania_(A_Midsummer_Night%27s_Dream)\u003e\n * This is just a codename, and probably not final for this teaching language\n\n## Grammar\n\n\n```\nmodule = \"module\" ident \";\" [import_list] decl_sequence\n         [\"begin\" stmt_sequence] \"end\" [\";\"].\n\nimport_list = \"import\" import_decl {\",\" import_decl} \";\".\ndecl_sequence = [\"const\" {const_decl \";\"}]\n                [\"type\"  {type_decl  \";\"}]\n                [\"var\"   {var_decl   \";\"}]\n                [{proc_decl          \";\"}].\n\nconst_decl = ident \"=\" const_expr.\ntype_decl = ident \"=\"\" struct_type.\nvar_decl = ident_list \":\" type.\n\nproc_decl = \"proc\" ident [formal_parameters] \";\" proc_body.\nproc_body = decl_sequence [\"begin\" stmt_sequence] [\"return\" expr] \"end\".\n\n\nconst_expr = expr.\nexpr = simple_expr {relation simple_expr}.\n\nsimple_expr = [\"+\" | \"-\"] unary_expr {add_operator unary_expr}.\nunary_expr = [\"+\" | \"-\"] term.\nterm = factor {mul_operator factor}.\n\nfactor = integer | real | string | nil | true | false | set |\n         \"(\" expr \")\" | \"not\" expr | designator.\n\nelement = expr [\"..\" expr].\n\nident_list = ident {\",\" ident}.\nqual_ident = [ident \".\"] ident.\n\nstruct_type = array_type | record_type | pointer_type | proc_type.\narray_type = \"[\"\" const_expr {\",\" const_expr} \"]\" type.\nrecord_type = \"record\" [\"(\" qual_ident \")\"] [field_list_sequence] \"end\".\npointer_type = \"^\" type.\nproc_type = \"proc\" formal_parameters.\nfield_list = [\"using\"] ident_list \":\" type.\nformal_parmeters = \"(\" [fp_section {\";\" fp_section}] [\";\"] \")\".\nformal_type = \"[\" \"]\" qual_ident.\n\nstmt_sequence = stmt {\";\" stmt} [\";\"].\nstmt = [assignment | proc_call | if_stmt | case_stmt | while_stmt | repeat_stmt | for_stmt ].\n\nassignment = designator \":=\" expr\n\nif_stmt = \"if\" expr \"then\" stmt_sequence\n          {\"elseif\" expr \"then\" stmt_sequence}\n          [\"else\" stmt_sequence]\n          \"end\".\n\ncase_stmt = \"case\" expr \"of\" case {\"|\" case} \"end\".\ncase = [case_label_list \":\" stmt_sequence].\ncase_list = label_range {\",\" label_range}.\nlabel_range = label [\"..\" label].\nlabel = integer | string | qual_ident.\n\nwhile_stmt = \"while\" expr \"then\" stmt_sequence\n             {\"elseif\" expr \"then\" stmt_sequence}\n             \"end\".\nrepeat_stmt = \"repeat\" stmt_sequence \"until\" expr.\nfor_stmt = \"for\" ident \":=\" expr \"to\" expr [\"by\" const_expr] \"then\" stmt_sequence \"end\".\n\n\ndesignator = qual_ident {selector}.\nselector = \".\" ident |\n           \"[\" expr_list \"]\" |\n           \"^\" |\n           \"(\" [expr_list] \")\".\nexpr_list = expr {\",\" expr}.\n\n\nadd_operator = \"+\" | \"-\" | \"xor\" | \"or\".\nmul_operator = \"*\" | \"/\" | \"%\"   | \"and\".\nrelation     = \"=\" | \"\u003c\u003e\" | \"\u003c\" | \"\u003c=\" | \"\u003e\" | \"\u003e=\" | \"in\" | \"is\".\n```\n\n### Keywords\n```\nand    else    if      nil   record  true   while\nbegin  elseif  import  not   repeat  type   xor\nby     end     in      of    return  until\ncase   false   is      or    then    using\nconst  for     module  proc  to      var\n```\n\n\n### Operators\n\n```\n+    .   (   )   =  \u003c\u003e\n-    ,   [   ]   \u003c  \u003c=\n*    ;   {   }   \u003e  \u003e=\n/    |   :=  :   ..\n%    ^\n```\n\n### Tokenizer Semicolon Insertion Rules\n\nWhen a newline is seen after the following token kind, a semicolon is inserted, otherwise no semicolon is inserted:\n\n* Identifiers\n* Integer, Real, String, Boolean literals\n* `nil`\n* `^`\n* `)`, `]`, `}`\n* `end`\n\n\n### Built-in Procedures\n\nNote: These will be added to as the compiler develops\n\n```\nabs(x)            - absolute value of\nlsh(x, y)         - logical shift left\nash(x, y)         - arithmetic shift right\nror(x, y)         - rotate right\nchr(i)            - convert int to char\nord(c)            - convert char to int\ninc(x)            - x := x + 1\ninc(x, y)         - x := x + y\ndec(x)            - x := x - 1\ndec(x, y)         - x := x - y\nincl(x, y)        - include y in set x\nexcl(x, y)        - exclude y in set x\nodd(x)            - x % 2 = 0\nfloor(x)          - round-down for real\nceil(x)           - round-up   for real\nassert(cond)      - assert when cond is false\nnew(ptr)          - allocate memory\ndelete(ptr)       - free memory\naddr(x)           - address of addressable memory\nsize_of(x)        - size of the type of 'x'\nalign_of(x)       - alignment of the type of 'x'\ncopy(dst, src, n) - non-overlapping memory copying from `src` to `dst` of `n` bytes\nprint(...)        - variadic print without newline\nprintln(...)      - variadic print with newline\nlen(x)            - length of an array 'x'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FgingerBill%2Ftitania","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FgingerBill%2Ftitania","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FgingerBill%2Ftitania/lists"}