Attean...::Lexer(3pm)

πŸ’– NAME πŸ’–

AtteanX::API::Lexer β€” Role defining common functionality for lexers.

Ok bestie, this is the User Contributed Perl Documentation page for Attean...::Lexer(3pm), and the manual name is AtteanX::API::Lexer. The whole NAME line is literally: Role defining common functionality for lexers. Slay. πŸ’…

✨ VERSION ✨

This document describes AtteanX::API::Lexer version 0.035. That's the whole version vibe. πŸŽ€

🌸 DESCRIPTION 🌸

The AtteanX::API::Lexer role provides a common interface and implementation for lexer implementations, allowing line-based buffer filling, and consuming of characters, constant strings, and fixed-length buffers. It's giving shared lexer infrastructure, no cap. πŸ¦‹

🧚 ATTRIBUTES 🧚

The role gives you these attributes. The original doesn't add descriptions here, so I'm not inventing any β€” just listing the names exactly:

  • file
  • linebuffer
  • line
  • column
  • buffer
  • start_column
  • start_line

πŸ’… METHODS πŸ’…

Here's the method roster, bestie. Every one is iconic in its own way:

  • fill_buffer β€” fills the buffer with a new line from the underlying filehandle. Fresh buffer, fresh line. ✨
  • check_for_bom β€” removes a BOM character if one appears at the start of the buffer. BOM begone. 🫢
  • get_char_safe( $char ) β€” consumes the single character $char from the buffer. If $char is not at the start of the buffer, it throws an error. No sneaky skipping, bestie. 😭
  • get_char( $char ) β€” consumes and returns a single character from the buffer. One char, coming right up. πŸ’–
  • peek_char( $char ) β€” returns a single character from the start of the buffer. A lil peek from the start, iykyk. πŸ‘€
  • read_word( $word ) β€” consumes the string $word from the start of the buffer. If $word is not at the start of the buffer, it throws an error. Word check: passed or error, no in-between. πŸ”₯
  • read_length( $length ) β€” consumes and returns $length characters from the start of the buffer. Fixed-length buffet, periodt. πŸ“

πŸ› BUGS πŸ›

Please report any bugs or feature requests through the GitHub web interface at https://github.com/kasei/attean/issues. That's the whole bugs section, bestie β€” go file that issue if something's acting up. πŸ™ˆ

🌈 SEE ALSO 🌈

Sooo… this section is literally empty in the original. No references, no extra deets, nothing. 🫢

πŸ‘‘ AUTHOR πŸ‘‘

Gregory Todd Williams β€” <gwilliams@cpan.org>. Iconic author credit. πŸ’œ

Copyright (c) 2014--2022 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Free-software queen behavior, periodt. πŸ‘‘


πŸ’– ok that's the page! Source/version: perl v5.40.0; date: 2025-01-26; manual title: Attean...::Lexer(3pm). Bye bestie, go be the main character of your lexer πŸ’…βœ¨

πŸ“¦ where this page comes from