work on number parsing

This commit is contained in:
William Bell
2025-08-11 19:26:19 +01:00
parent d2e742f992
commit f851b37f99
7 changed files with 208 additions and 25 deletions

View File

@@ -97,7 +97,7 @@ int yywrap(void * unused_param) {
return TOKEN_STRING;
}
((([0-9]+(\.[0-9]+)?)|(\.[0-9]+))(e((\-|\+)?([0-9]+(\.[0-9]+)?)))?) {
((([0-9]+(\.[0-9]+)?)|(\.[0-9]+))(e((\-|\+)?([0-9]+)))?) {
return TOKEN_NUMBER;
}
@@ -113,7 +113,7 @@ int yywrap(void * unused_param) {
#[^\n]* { /* skip comment */ }
. {
.|((([0-9]+(\.[0-9]+)?)|(\.[0-9]+))(e((\-|\+)?([0-9]+(\.[0-9]+)?)))?) {
return TOKEN_INVALID;
}
%%