Skip to content

CS3110Project/Numerical-Literal-Checker

Repository files navigation

Numerical-Literal-Checker

Formal Languages and Automata

3110 Group Project: Python Numerical Literal Checker

This Python program implements a Non-deterministic Finite Automaton (NFA) to recognize and validate Python numerical literals, including integers (decimal, octal, hexadecimal) and floating-point numbers. It supports underscores in number literals for improved readability.

Project Team

Project Details

Purpose

The purpose of this project is to create a hands-on programming application of course concepts, specifically focusing on the recognition and validation of Python numerical literals using Non-deterministic Finite Automata (NFA). This tool will help users verify whether a given string conforms to the rules of Python's numerical literal syntax. (Referenced literals: https://docs.python.org/3/reference/lexical_analysis.html#numeric-literals).

Features

  • Recognizes Python decimal integer literals
  • Supports octal and hexadecimal integer literals
  • Validates floating-point literals
  • Allows underscores in number literals for improved readability
  • Interactive testing mode for real-time input validation
  • File-based batch testing with input and expected results comparison
  • Generates sample input files for testing purposes

How to Use

  1. Clone the repository:
    git clone https://github.com/CS3110Project/Numerical-Literal-Checker.git
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages