Search found 472 matches

by Sicro
Wed Nov 05, 2025 10:24 pm
Forum: Applications - Feedback and Discussion
Topic: RegEx engine module that builds NFA/DFA and uses it for matching
Replies: 14
Views: 12903

Re: RegEx engine module that builds NFA/DFA and uses it for matching


Print( 1 * 2)
Private MyVar = "12345"
Public testando= 1234567


You define what you want to ignore as tokens as well and skip these tokens when they are found until the RegEx::Match() function returns tokens that you want. In our discussion via PM, I already wrote a code with a function ...
by Sicro
Sun Oct 26, 2025 9:55 am
Forum: Coding Questions
Topic: IncludeFile with relative paths and directory traversal (for example ../) in Linux?
Replies: 2
Views: 512

Re: IncludeFile with relative paths and directory traversal (for example ../) in Linux?

  • PureBasic
  • Includes/MyInclude.pbi
  • Projects/MyProject/Main.pbi

Main.pb:

Code: Select all

IncludeFile "../../Includes/MyInclude.pbi"
by Sicro
Sat Oct 18, 2025 1:39 pm
Forum: Applications - Feedback and Discussion
Topic: RegEx engine module that builds NFA/DFA and uses it for matching
Replies: 14
Views: 12903

Re: RegEx engine module that builds NFA/DFA and uses it for matching

1.2.0 released

Download: Click

New

New public constant #ModuleVersion$ for determining the module version.


Fixed

Speed increase implemented in version 1.1.0 has been reversed because, in the case of multiple AddNfa() calls whose RegEx could match the same string, the regExId of ...
by Sicro
Fri Sep 19, 2025 5:11 pm
Forum: Coding Questions
Topic: PB 6.21 x64: Invalid variable names with umlauts are truncated after the umlaut in the debugger's error description
Replies: 5
Views: 625

Re: PB 6.21 x64: Invalid variable names with umlauts are truncated after the umlaut in the debugger's error description

Kurzer wrote: Thu Sep 18, 2025 8:47 pm E.g.: “The variable name ‘Hütte’ contains invalid characters.”
I think that would also be good and possibly easier to implement:
"Error: Invalid character at: line 1, pos 11"
or
"Error: Invalid token at: line 1, pos 10"
by Sicro
Sat Aug 16, 2025 4:23 pm
Forum: Coding Questions
Topic: Best approach to create a syntax reader for a code converter?
Replies: 15
Views: 1668

Re: Best approach to create a syntax reader for a code converter?

For my parsing tasks, I always use a lexer/parser combination. For the lexer, I use my own RegEx engine (see my post signature below, look also in the example directory on the project page), which is very flexible, does not require backtracking, and generates a very fast DFA. For the parser, I ...
by Sicro
Sun Mar 30, 2025 8:05 pm
Forum: Tricks 'n' Tips
Topic: Optical Drive Info
Replies: 2
Views: 1773

Re: Optical Drive Info

The forum moderator RSBasic has a backup archive in which many files from the forums have been stored:
https://www.rsbasic.de/backups

Your desired code is also available:
https://backups.rsbasic.de/Optical_Drive_Data_520.rar
by Sicro
Fri Mar 28, 2025 6:29 pm
Forum: The PureBasic Editor
Topic: Source language lexer
Replies: 7
Views: 3197

Re: Source language lexer

The PureBasic IDE uses Scintilla for the token highlighting in the editor, and it comes with a lexer:
https://www.scintilla.org/ScintillaDoc.html#Lexer
This code sets up the lexer:
https://github.com/fantaisie-software/purebasic/blob/devel/PureBasicIDE/ScintillaHighlighting.pb
This code is also ...
by Sicro
Sun Feb 16, 2025 3:14 pm
Forum: Applications - Feedback and Discussion
Topic: RegEx engine module that builds NFA/DFA and uses it for matching
Replies: 14
Views: 12903

Re: RegEx engine module that builds NFA/DFA and uses it for matching

Final 1.1.0 released

Download: Click

In the next version, I will implement the feature of being able to create a minimal DFA from an existing DFA. Such a DFA contains only the number of states that are really required, which makes the DFA smaller and consumes less memory. However, the number ...
by Sicro
Sun Feb 02, 2025 5:46 pm
Forum: Bugs - Linux
Topic: CountGadgetItems(#EditorGadget) with #PB_Editor_WordWrap
Replies: 2
Views: 5318

Re: CountGadgetItems(#EditorGadget) with #PB_Editor_WordWrap

I have now tested it with the various packages for Linux.
PureBasic 6.20 Beta 4 for Linux (Ubuntu 18.04 - x64) wrote: 9
PureBasic 6.20 Beta 4 for Linux (Ubuntu 20.04 or 22.04 - x64) wrote: 9
PureBasic 6.20 Beta 4 for Linux (Ubuntu 24.04 - x64) wrote: 9
All tested with gtk3 (default) in Manjaro Xfce x64.
by Sicro
Sun Feb 02, 2025 5:35 pm
Forum: Bugs - Linux
Topic: GetGadgetItemText() doesn't work with wrapped text in EditorGadget
Replies: 3
Views: 7343

Re: GetGadgetItemText() doesn't work with wrapped text in EditorGadget

I have now tested it with the various packages for Linux.
PureBasic 6.20 Beta 4 for Linux (Ubuntu 18.04 - x64) wrote: 9
item text
PureBasic 6.20 Beta 4 for Linux (Ubuntu 20.04 or 22.04 - x64) wrote: 9
item text
PureBasic 6.20 Beta 4 for Linux (Ubuntu 24.04 - x64) wrote: 9
i
All tested with gtk3 (default) in Manjaro Xfce x64.
by Sicro
Sun Feb 02, 2025 1:52 pm
Forum: Bugs - Linux
Topic: GetGadgetItemText() doesn't work with wrapped text in EditorGadget
Replies: 3
Views: 7343

Re: GetGadgetItemText() doesn't work with wrapped text in EditorGadget


; PureBasic 6.20 Beta 4 (x64) - Linux
; gtk3: bug
; gtk2 and qt: no bug

#Window = 0
#EditorGadget = 0

If Not OpenWindow(#Window, 0, 0, 500, 500, "Test", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
Debug "Error: OpenWindow()"
End
EndIf

; Without the flag '#PB_Editor_WordWrap', it works ...
by Sicro
Sun Feb 02, 2025 1:48 pm
Forum: Bugs - Linux
Topic: CountGadgetItems(#EditorGadget) with #PB_Editor_WordWrap
Replies: 2
Views: 5318

CountGadgetItems(#EditorGadget) with #PB_Editor_WordWrap


; PureBasic 6.20 Beta 4 (x64) - Linux
; gtk3: bug
; gtk2 and qt: no bug

#Window = 0
#EditorGadget = 0

If Not OpenWindow(#Window, 0, 0, 500, 500, "Test", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
Debug "Error: OpenWindow()"
End
EndIf

; Without the flag '#PB_Editor_WordWrap', it works ...
by Sicro
Thu Jan 02, 2025 12:21 pm
Forum: The PureBasic Editor
Topic: Special Question about IDE-Tools
Replies: 4
Views: 7616

Re: Special Question about IDE-Tools


At some point freak had mentioned making IDE functions accessible
via external tools (unfortunately I can't find the post at the moment)

Here is freak's feature thread:
https://www.purebasic.fr/english/viewtopic.php?t=44895

The feature was canceled:
https://github.com/fantaisie-software ...
by Sicro
Tue Dec 31, 2024 6:45 pm
Forum: Off Topic
Topic: Happy New Year 2025!
Replies: 27
Views: 15999

Re: Happy New Year 2025!

I wish you all a good start into the new year!
by Sicro
Mon Dec 30, 2024 6:40 pm
Forum: Applications - Feedback and Discussion
Topic: RegEx engine module that builds NFA/DFA and uses it for matching
Replies: 14
Views: 12903

Re: RegEx engine module that builds NFA/DFA and uses it for matching

1.1.0-beta.2 released

Download: Click

Fixed

Due to the implementation of single-byte mode, case-sensitive mode was not processed correctly with user-defined character classes (negated or not). This was also the case when single-byte mode was not activated.
User-defined negated character ...