fortplot_test_pdf_tokenizer Module

PDF stream tokenizer utilities for testing

Single Responsibility: Tokenize and parse PDF stream content Extracted from fortplot_test_pdf_utils to keep modules under 500 lines.



Functions

public function find_subsequence(arr, n, pat, start_idx) result(pos)

Arguments

Type IntentOptional Attributes Name
character(len=1), intent(in) :: arr(n)
integer(kind=int64), intent(in) :: n
character(len=*), intent(in) :: pat
integer, intent(in) :: start_idx

Return Value integer

public function pdf_stream_has_stroke_rgb(stream_text, rgb, tol) result(found)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: stream_text
real(kind=dp), intent(in) :: rgb(3)
real(kind=dp), intent(in) :: tol

Return Value logical

public function pdf_stream_count_operator(stream_text, op) result(count_op)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: stream_text
character(len=*), intent(in) :: op

Return Value integer


Subroutines

public subroutine pdf_next_token(text, pos, token, token_len, has_token)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: text
integer, intent(inout) :: pos
character(len=*), intent(out) :: token
integer, intent(out) :: token_len
logical, intent(out) :: has_token