Feature: Lexer improvements #144

Closed
opened 2023-07-14 16:46:19 +01:00 by deavmi · 25 comments
Owner

What is this?

We have a Grammar and I want to ensure that the lexer builds tokens accordingly and also figure out what is missing.

This leaves us with two main (immediate goals):

  • Unit tests for the current BasicLexer
    • Adding more to try and break it and more complicated tests
    • Adding test cases to increase code coverage
  • Actually fixing the lexer
    • In cases where is is broken
      Or it does Not yet implement everything stipulated in the grammar
    • Finding what the lexer does but grammar does not yet document and updating the docs accordingly
  • Adding tab support as per #121
  • Numerical encoders 21UL etc.
    • @deavmi and @gusmeyer should discuss this
    • Entails usage of isNumericalEncoder(char character), isNumericalEncoder_Size(char character) and isNumericalEncoder_Signage(char character)
  • Implement isValidEscape_String(char)
    • Might need more \\ things etc required
    • We should make a list of supported excape sequences we want, add support for them and so on
    • String support
    • Character support (like '\n')
  • Enum for character constants frequently used
  • Dotted handling edge cases new A()\t.\tl . p.p;
  • Bug: The lexer currently allows spaces/tabs around a standalone '.' or with spaces on either side, which should no tbe the case.
  • Investigate #60
  • Support for comments #84
  • Support for 2_100
    • This should become a token [2100]
  • Float valid-splitters function
    • Determine valid splitters for float
  • Once done speak to @deavmi as you need to document the code as well as in the documentation/manual
  • Move isSplitter(char), isOperator(char) to core/lexer.d @deavmi
    • Moved
    • Old ones to use migrated ones
## What is this? We have a [Grammar](https://deavmi.assigned.network/projects/tlang/language/31-grammar/) and I want to ensure that the lexer builds tokens accordingly and also figure out what is missing. This leaves us with two main (immediate goals): - [x] Unit tests for the current `BasicLexer` * Adding more to try and break it and more complicated tests * Adding test cases to increase code coverage - [x] Actually fixing the lexer * In cases where is is **broken** Or it does **Not yet** implement everything stipulated in the grammar * Finding what the lexer does but grammar does not yet document and updating the docs accordingly - [x] Adding tab support as per #121 - [x] Numerical encoders `21UL` etc. * @deavmi and @gusmeyer should discuss this * Entails usage of `isNumericalEncoder(char character)`, `isNumericalEncoder_Size(char character)` and `isNumericalEncoder_Signage(char character)` - [x] Implement `isValidEscape_String(char)` * Might need more `\\` things etc required * We should make a list of supported excape sequences we want, add support for them and so on - [x] String support - [x] Character support (like `'\n'`) - [x] Enum for character constants frequently used - [x] Dotted handling edge cases `new A()\t.\tl . p.p; ` - [x] Bug: The lexer currently allows spaces/tabs around a standalone '.' or with spaces on either side, which should no tbe the case. - [x] Investigate #60 - [x] Support for comments #84 - [x] Support for `2_100` * This should become a token `[2100]` - [x] Float valid-splitters function * Determine valid splitters for float - [x] Once done speak to @deavmi as you need to document the code as well as in the documentation/manual - [x] Move `isSplitter(char)`, `isOperator(char)` to `core/lexer.d` @deavmi - [x] Moved - [x] Old ones to use migrated ones
gusmeyer was assigned by deavmi 2023-07-14 16:46:46 +01:00
deavmi added the
lexer
label 2023-07-14 16:46:52 +01:00
deavmi added this to the Lexer project 2023-07-14 16:46:56 +01:00
deavmi added this to the Clean ups milestone 2023-07-14 16:47:08 +01:00
deavmi added reference feature/lexer_improvements 2023-07-14 16:57:57 +01:00
deavmi modified the milestone from Clean ups to Basics 2023-07-14 16:58:55 +01:00
deavmi added the due date 2023-07-30 2023-07-14 16:59:06 +01:00
deavmi added a new dependency 2023-07-16 13:59:19 +01:00
deavmi started working 2023-07-16 14:39:49 +01:00
deavmi stopped working 2023-07-16 14:40:09 +01:00
20 seconds
gusmeyer started working 2023-07-16 14:44:07 +01:00
gusmeyer stopped working 2023-07-16 15:18:30 +01:00
34 minutes 22 seconds
gusmeyer started working 2023-07-16 15:27:24 +01:00
gusmeyer stopped working 2023-07-16 15:36:41 +01:00
9 minutes 17 seconds
gusmeyer started working 2023-07-16 16:11:35 +01:00
Author
Owner

Minutes

Some test notes:

1.5.5

[1.5, .]

1.5.a

[1.5, ., a]

l. 5
l. a

[]

"l .5"

"dj;"

[dj, ;]

"dj
";

[dj]



").x" ").5" ") .5"
### Minutes Some test notes: ``` 1.5.5 [1.5, .] 1.5.a [1.5, ., a] l. 5 l. a [] "l .5" "dj;" [dj, ;] "dj "; [dj] ").x" ").5" ") .5" ```
gusmeyer stopped working 2023-07-16 17:49:49 +01:00
1 hour 38 minutes
Author
Owner

Documentation

  • Document the fucntions in lexer (a lot of missing)
  • Update docs in book file(just ask me when you get to this stage and I can show you how)
## Documentation - [x] Document the fucntions in lexer (a lot of missing) - [x] Update docs in book file(just ask me when you get to this stage and I can show you how)
deavmi added a new dependency 2023-07-16 19:43:19 +01:00
Author
Owner

Updated the TODOs @gusmeyer

Added a TODO for #60 (this needs some discussing for you and me so we can leave this till later or whenever you think we should discuss it)

Updated the TODOs @gusmeyer Added a TODO for #60 (this needs some discussing for you and me so we can leave this till later or whenever you think we should discuss it)
deavmi added a new dependency 2023-07-16 19:45:58 +01:00
deavmi started working 2023-07-20 15:01:46 +01:00
deavmi stopped working 2023-07-20 15:02:32 +01:00
46 seconds
deavmi added spent time 2023-07-20 16:14:00 +01:00
2 minutes
deavmi added spent time 2023-07-22 19:35:32 +01:00
2 minutes
deavmi started working 2023-07-22 19:35:34 +01:00
Author
Owner

Updated Parser such that it now tests the call to parseComment() from within parseStatement() (and not just parse())

Updated `Parser` such that it now tests the call to `parseComment()` from within `parseStatement()` (and not **just** `parse()`) ✅
deavmi stopped working 2023-07-22 19:36:15 +01:00
41 seconds
deavmi added spent time 2023-07-22 20:05:25 +01:00
10 minutes
deavmi started working 2023-07-22 20:05:28 +01:00
Author
Owner

Updated Parser such that it now tests the call to parseComment() from within parseStatement() (and not just parse())

The comments tests (in the Parser) now use Gustav's BasicLexer, and they all pass

> Updated `Parser` such that it now tests the call to `parseComment()` from within `parseStatement()` (and not **just** `parse()`) ✅ The comments tests (in the `Parser`) now use Gustav's `BasicLexer`, and they all pass ✅
deavmi stopped working 2023-07-22 20:06:13 +01:00
45 seconds
Author
Owner

@gusmeyer We need to update the grammar docs

@gusmeyer We need to update the grammar docs ❗
deavmi started working 2023-08-10 18:56:03 +01:00
Author
Owner

Bumping due date to end of August

Bumping due date to end of August
deavmi modified the due date from 2023-07-30 to 2023-08-30 2023-08-10 18:56:27 +01:00
Author
Owner

Merging vardec_varass_dependency into here as #115 is now completed and should solve CI/CD failing...

Merging `vardec_varass_dependency` into here as #115 is now completed and should solve CI/CD failing...
Author
Owner

Merging vardec_varass_dependency into here as #115 is now completed and should solve CI/CD failing...

Merged, awaiting CI/CD...

> Merging `vardec_varass_dependency` into here as #115 is now completed and should solve CI/CD failing... Merged, awaiting CI/CD...
Author
Owner

Merging vardec_varass_dependency into here as #115 is now completed and should solve CI/CD failing...

Merged, awaiting CI/CD...

CI/CD passed

> > Merging `vardec_varass_dependency` into here as #115 is now completed and should solve CI/CD failing... > > Merged, awaiting CI/CD... CI/CD passed ✅
deavmi stopped working 2023-08-10 19:01:54 +01:00
5 minutes 51 seconds
Author
Owner

Branch is synced up

Branch is synced up ✅
deavmi changed title from Lexer improvements to Feature: Lexer improvements 2023-08-17 08:06:39 +01:00
deavmi started working 2023-08-27 11:38:25 +01:00
deavmi stopped working 2023-08-27 11:50:18 +01:00
11 minutes 53 seconds
deavmi started working 2023-08-27 11:59:15 +01:00
Author
Owner

Update with the latest base code from vardec_varass_dependency (unit tests now will cause more code to be covered) 👍

Update with the latest base code from `vardec_varass_dependency` (unit tests now will cause more code to be covered) 👍
deavmi stopped working 2023-08-27 12:02:14 +01:00
3 minutes
deavmi added a new dependency 2023-11-06 09:38:59 +00:00
deavmi modified the due date from 2023-08-30 to 2023-12-06 2023-12-06 11:47:22 +00:00
deavmi modified the due date from 2023-12-06 to 2023-12-07 2023-12-06 11:47:29 +00:00
Author
Owner

Gustav is working on this now, escape sequences for characters is added but not YET pushed!

Gustav is working on this now, escape sequences for characters is added **but not YET pushed**! ❗
deavmi modified the due date from 2023-12-07 to 2023-12-31 2023-12-10 10:14:30 +00:00
deavmi started working 2023-12-23 18:41:23 +00:00
deavmi stopped working 2023-12-23 18:47:31 +00:00
6 minutes 7 seconds
deavmi started working 2023-12-23 18:51:18 +00:00
deavmi stopped working 2023-12-23 18:54:00 +00:00
2 minutes 42 seconds
deavmi added spent time 2023-12-23 20:37:18 +00:00
1 minute
deavmi started working 2023-12-23 20:37:43 +00:00
deavmi stopped working 2023-12-23 20:37:50 +00:00
7 seconds
deavmi started working 2023-12-23 20:38:15 +00:00
deavmi stopped working 2023-12-23 20:41:25 +00:00
3 minutes 10 seconds
Author
Owner

This is all done now and can be merged

This is all done now and can be merged ✅
deavmi started working 2023-12-23 22:30:39 +00:00
deavmi stopped working 2023-12-23 22:30:56 +00:00
17 seconds
deavmi added spent time 2023-12-24 12:48:41 +00:00
5 minutes
deavmi started working 2023-12-24 12:48:44 +00:00
deavmi self-assigned this 2023-12-24 12:50:27 +00:00
Author
Owner

I am working on documentation now and also moving out common methods into other modules (along with documenting them).

I am working on documentation now and also moving out common methods into other modules (along with documenting them).
deavmi stopped working 2023-12-24 13:37:52 +00:00
49 minutes 7 seconds
deavmi started working 2023-12-24 13:38:04 +00:00
Author
Owner

What is this?

We have a Grammar and I want to ensure that the lexer builds tokens accordingly and also figure out what is missing.

This leaves us with two main (immediate goals):

  • Unit tests for the current BasicLexer
    • Adding more to try and break it and more complicated tests
      • Adding test cases to increase code coverage
  • Actually fixing the lexer
    • In cases where is is broken
      Or it does Not yet implement everything stipulated in the grammar
      • Finding what the lexer does but grammar does not yet document and updating the docs accordingly
  • Adding tab support as per #121
  • Numerical encoders 21UL etc.
    • @deavmi and @gusmeyer should discuss this
      • Entails usage of isNumericalEncoder(char character), isNumericalEncoder_Size(char character) and isNumericalEncoder_Signage(char character)
  • Implement isValidEscape_String(char)
    • Might need more \\ things etc required
    • We should make a list of supported excape sequences we want, add support for them and so on
    • String support
    • Character support (like '\n')
  • Enum for character constants frequently used
  • Dotted handling edge cases new A()\t.\tl . p.p;
  • Bug: The lexer currently allows spaces/tabs around a standalone '.' or with spaces on either side, which should no tbe the case.
  • Investigate #60
  • Support for comments #84
  • Support for 2_100
    • This should become a token [2100]
  • Float valid-splitters function
    • Determine valid splitters for float
  • Once done speak to @deavmi as you need to document the code as well as in the documentation/manual
  • Move isSplitter(char), isOperator(char) to core/lexer.d @deavmi
    • Moved
    • Old ones to use migrated ones

Migrated all methods that were common char-based ones

> ## What is this? > > We have a [Grammar](https://deavmi.assigned.network/projects/tlang/language/31-grammar/) and I want to ensure that the lexer builds tokens accordingly and also figure out what is missing. > > This leaves us with two main (immediate goals): > > - [x] Unit tests for the current `BasicLexer` > * Adding more to try and break it and more complicated tests > * Adding test cases to increase code coverage > - [x] Actually fixing the lexer > * In cases where is is **broken** > Or it does **Not yet** implement everything stipulated in the grammar > * Finding what the lexer does but grammar does not yet document and updating the docs accordingly > - [x] Adding tab support as per #121 > - [x] Numerical encoders `21UL` etc. > * @deavmi and @gusmeyer should discuss this > * Entails usage of `isNumericalEncoder(char character)`, `isNumericalEncoder_Size(char character)` and `isNumericalEncoder_Signage(char character)` > - [x] Implement `isValidEscape_String(char)` > * Might need more `\\` things etc required > * We should make a list of supported excape sequences we want, add support for them and so on > - [x] String support > - [x] Character support (like `'\n'`) > - [x] Enum for character constants frequently used > - [x] Dotted handling edge cases `new A()\t.\tl . p.p; ` > - [x] Bug: The lexer currently allows spaces/tabs around a standalone '.' or with spaces on either side, which should no tbe the case. > - [x] Investigate #60 > - [x] Support for comments #84 > - [x] Support for `2_100` > * This should become a token `[2100]` > - [x] Float valid-splitters function > * Determine valid splitters for float > - [ ] Once done speak to @deavmi as you need to document the code as well as in the documentation/manual > - [x] Move `isSplitter(char)`, `isOperator(char)` to `core/lexer.d` @deavmi > - [x] Moved > - [x] Old ones to use migrated ones Migrated all methods that were common `char`-based ones
deavmi stopped working 2023-12-24 13:41:17 +00:00
3 minutes 13 seconds
deavmi started working 2023-12-24 14:29:18 +00:00
deavmi stopped working 2023-12-24 14:29:23 +00:00
5 seconds
deavmi added spent time 2023-12-24 14:29:28 +00:00
10 minutes
deavmi started working 2023-12-24 14:29:31 +00:00
Author
Owner

Looks like I have everything done regarding documentation and neatening up of source code.

Ready to merge

Looks like I have everything done regarding documentation and neatening up of source code. Ready to merge ✅
deavmi stopped working 2023-12-24 14:30:56 +00:00
1 minute 25 seconds
deavmi started working 2023-12-24 14:57:39 +00:00
deavmi stopped working 2023-12-24 14:59:10 +00:00
1 minute 31 seconds
deavmi started working 2023-12-27 06:12:34 +00:00
Author
Owner

Just looking for any undocumented methods right now

Just looking for any undocumented methods right now
Author
Owner

Just looking for any undocumented methods right now

Done

> Just looking for any undocumented methods right now Done ✅
deavmi stopped working 2023-12-27 06:16:38 +00:00
4 minutes 5 seconds
deavmi started working 2023-12-27 06:17:48 +00:00
Author
Owner

Merging...

Merging...
Author
Owner

Merged

Merged ✅
Author
Owner

CI/CD running...

CI/CD running...
Author
Owner

Unittests (local testing)

Unittests ✅ (local testing)
Author
Owner

CI/CD

CI/CD ✅
Author
Owner

Done, closing issue

Done, closing issue ✅
deavmi stopped working 2023-12-27 06:20:08 +00:00
2 minutes 20 seconds
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Total Time Spent: 4 hours 29 minutes
deavmi
2 hours 7 minutes
gusmeyer
2 hours 21 minutes
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

2023-12-31

Blocks Depends on
You do not have permission to read 2 dependencies
Reference: tlang/tlang#144
No description provided.