Simple program which checks rows data type coherency, sums them and displays result in correct format.
- deducing row's type (integer, hexadecimal, decimal fraction, scientific),
- row summing and displaying results in correct format (based on type),
- can't recognize rows of hexadecimals with no letters correctly (recognized as integer rows),
- limited precision (15 decimal places),
- error detection (invalid row data),
- line and column tracking (used in error detection).
1 34 891 2
2 23 7A1 C45 91
3 34.9 1.001 0.2567
4 23.4E+20 0.1E-3 1.4E+15
5 1 2 3 4 5
To compile this program you need:
- C++ compiler
- Flex binaries
- Bison binaries (may require additional binaries)
- MinGW - Minimalist GNU for Windows
- Flex for Windows
- Bison for Windows
- Visual Studio Code with Lex Flex Yacc Bison plugin
- bison.exe -dy interpreter.y
- flex.exe interpreter.lex
- g++.exe y.tab.c lex.yy.c -o "your_exe_name.exe"