{"id":21143897,"url":"https://github.com/alafty/fallbackdfa","last_synced_at":"2025-03-14T13:22:23.121Z","repository":{"id":250717986,"uuid":"763178903","full_name":"alafty/FallbackDFA","owner":"alafty","description":"Task 3 for the Compilers lab where the needed deliverable is a function that takes a DFA and should simulate a Fallback DFA with any given input","archived":false,"fork":false,"pushed_at":"2024-03-07T00:15:29.000Z","size":2320,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T07:11:29.658Z","etag":null,"topics":["compilers","compilers-design","dfa","fallback-dfa","regex"],"latest_commit_sha":null,"homepage":"","language":"Java","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/alafty.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}},"created_at":"2024-02-25T18:57:00.000Z","updated_at":"2024-07-29T12:34:40.000Z","dependencies_parsed_at":"2024-07-29T17:22:51.334Z","dependency_job_id":"a63ab6ed-2760-4cd6-b72d-2f209440c03d","html_url":"https://github.com/alafty/FallbackDFA","commit_stats":null,"previous_names":["alafty/fallbackdfa"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alafty%2FFallbackDFA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alafty%2FFallbackDFA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alafty%2FFallbackDFA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alafty%2FFallbackDFA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alafty","download_url":"https://codeload.github.com/alafty/FallbackDFA/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243581280,"owners_count":20314210,"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","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":["compilers","compilers-design","dfa","fallback-dfa","regex"],"created_at":"2024-11-20T08:02:55.734Z","updated_at":"2025-03-14T13:22:23.099Z","avatar_url":"https://github.com/alafty.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FallbackDFA\n\n## Description\n\nThe Fallback DFA is a modified version of a DFA that allows for lexing (tokenizing) input strings. It reads a formatted string representation of the DFA and simulates its behavior on input strings to tokenize them. The tokenization process involves recognizing patterns in the input string based on the DFA's states and transitions.\n\n### Installation\n\nClone the repository to your local machine:\n\n```bash\ngit clone https://github.com/username/FallbackDFA.git\n```\n\n### Running the Code\n\nTo use the FallbackDFA class in your Java project, simply include the `FallbackDfa.java` file in your project directory. You can then create an instance of the `FallbackDfa` class and use its `run()` method to tokenize input strings.\n\nExample usage:\n\n```java\nString fdfaRepresentation = \"state1;state2;state3#symbol1;symbol2;symbol3#state1,symbol1,state2;state2,symbol2,state3#state1#state3\";\nFallbackDfa dfa = new FallbackDfa(fdfaRepresentation);\nString input = \"input_string_to_tokenize\";\nString tokens = dfa.run(input);\nSystem.out.println(\"Tokens: \" + tokens);\n```\n\n### Input Format\n\nThe input to the FallbackDfa constructor and the `run()` method follows a specific format:\n\n```\nstate1;state2;state3#symbol1;symbol2;symbol3#state1,symbol1,state2;state2,symbol2,state3#start_state#accept_states\n```\n\n### Output Format\n\nThe `run()` method returns a formatted string representation of the list of tokens. The string representation follows the one described in the input format.\n\n## Authors\n\n- [Mohamed El-Alafty](https://github.com/alafty)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falafty%2Ffallbackdfa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falafty%2Ffallbackdfa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falafty%2Ffallbackdfa/lists"}