Skip to content

Instantly share code, notes, and snippets.

@KnightsWhoSayNi0
Last active February 24, 2023 17:49
Show Gist options
  • Save KnightsWhoSayNi0/704413e1c21acafc3ce9861047b34a2a to your computer and use it in GitHub Desktop.
Save KnightsWhoSayNi0/704413e1c21acafc3ce9861047b34a2a to your computer and use it in GitHub Desktop.
Notes

Programming Notes

2/22/23

Grammar : Syntax; formats; etc...

Parsing

  • Non-deterministic - essentially, doesn't end (the file parsing we did)
  • Deterministic - Fixed format

Binary Time

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

Time Data Structure

Example: 04:27:32 PM


0
1
0000
0100
0010
0111
0011
0010

12 Hours
PM
0
4
2
7
3
2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment