-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Begin to implement pattern detection
- Loading branch information
Showing
4 changed files
with
127 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* See LICENSE for copyright and license details. */ | ||
|
||
#include <wchar.h> | ||
#include <ctype.h> | ||
|
||
int | ||
string_pattern_match(const wchar_t rune) | ||
{ | ||
return 1; | ||
} | ||
|
||
int | ||
number_pattern_match(const wchar_t rune) | ||
{ | ||
return isdigit(rune) || rune == '.'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* See LICENSE for copyright and license details. */ | ||
|
||
/* string pattern */ | ||
int string_pattern_match(const wchar_t rune); | ||
|
||
/* number pattern */ | ||
int number_pattern_match(const wchar_t rune); |