2/22/23
Grammar : Syntax; formats; etc...
Parsing
- Non-deterministic - essentially, doesn't end (the file parsing we did)
- Deterministic - Fixed format
0
1
0001
0010
0001
0101
0000
0000
What's crucial?
0CRLF
1CRLF
0010CRLF
...
The CRLF
is the important part; specificies the end of the line.
The spacing between each character, 0
, 1
, CR
, LF
, can be non-deterministic.
For example, there might be something we don't need in between the data.
Object: THE PATTERN
↳ Returns: boolean if the pattern is valid
Once the pattern is valid, then use an accessor to ask for the time format itself.
This accessor aquires the hours, minutes, seconds
Example: 04:27:32 PM
0
1
0000
0100
0010
0111
0011
0010
12 Hours
PM
0
4
2
7
3
2