summaryrefslogtreecommitdiff
path: root/prism/regexp.c
AgeCommit message (Collapse)Author
2026-03-20[ruby/prism] Rename strings to stringy because of linux conflictsKevin Newton
https://github.com/ruby/prism/commit/eb1d518736
2026-03-20[ruby/prism] Make parser an opaque pointerKevin Newton
https://github.com/ruby/prism/commit/3da08fd638
2026-03-20[ruby/prism] pm_string_free -> pm_string_cleanupKevin Newton
https://github.com/ruby/prism/commit/92b48ce940
2026-03-20[ruby/prism] pm_buffer_free -> pm_buffer_cleanupKevin Newton
https://github.com/ruby/prism/commit/2b5298128e
2026-03-20[ruby/prism] Move compiler detection stuff into include/prism/compilerKevin Newton
https://github.com/ruby/prism/commit/01d575aa2f
2026-03-20[ruby/prism] More splitting of headersKevin Newton
https://github.com/ruby/prism/commit/8ad880255d
2026-03-20[ruby/prism] Move regexp to internalKevin Newton
https://github.com/ruby/prism/commit/8d1df7815e
2026-03-20[ruby/prism] Put inline in its own headerKevin Newton
https://github.com/ruby/prism/commit/cc93903d08
2026-03-20[ruby/prism] Split up public and internal strings headersKevin Newton
https://github.com/ruby/prism/commit/60e105fc0c
2026-03-20[ruby/prism] Split up diagnostic headers into public and internalKevin Newton
https://github.com/ruby/prism/commit/af683324ea
2026-03-20[ruby/prism] Move char to internal headersKevin Newton
https://github.com/ruby/prism/commit/895b395b99
2026-03-20[ruby/prism] Remove unnecessary PRISM_EXPORTED_FUNCTION from source filesKevin Newton
https://github.com/ruby/prism/commit/0862b48f0c
2026-03-20[ruby/prism] Move strncasecmp out of utils and make internal onlyKevin Newton
https://github.com/ruby/prism/commit/e4df04157a
2026-03-20[ruby/prism] Split up buffer headers between internal and externalKevin Newton
https://github.com/ruby/prism/commit/bda0f889b5
2026-03-20[ruby/prism] Move buffer out of utilsKevin Newton
https://github.com/ruby/prism/commit/429672ea58
2026-03-17[ruby/prism] Fix up rebase errorsKevin Newton
https://github.com/ruby/prism/commit/b2658d2262
2026-03-11[ruby/prism] Improve pm_regexp_classify_property perfKevin Newton
https://github.com/ruby/prism/commit/3bdd79257b
2026-03-11[ruby/prism] Fix reading past end of target namesKevin Newton
https://github.com/ruby/prism/commit/1d6a9669dc
2026-03-11[ruby/prism] Restructure regexp encoding validationKevin Newton
Move all the logic from prism.c into regexp.c. Now regexp.c does two passes. The first pass scans the raw source to track escape types, non-ASCII literals, and multibyte validity for encoding validation. The second pass scans the unescaped content for named capture extraction (needed because escape sequences like line continuations alter group names). Fixed a couple of things along the way. ascii_only was previously computed from unescaped content, but we can do that as we go to avoid scanning again. Unicode properties also now properly error for regexp with modifiers. https://github.com/ruby/prism/commit/0944c7fba2
2025-01-11[ruby/prism] Enable implicit fall-through errorsAlexander Momchilov
https://github.com/ruby/prism/commit/03797b84d3
2024-11-12[ruby/prism] Fix use of uninitialized value when parsing regexpPeter Zhu
Parsing the regexp /\A{/ causes uses an uninitialized value because it tries to parse it as a range quantifier, so it reads the character after the closing curly bracket. This is using uninitialized values because prism strings are not null terminated. This can be seen in the Valgrind output: ==834710== Conditional jump or move depends on uninitialised value(s) ==834710== at 0x5DA010: pm_regexp_parse_range_quantifier (regexp.c:163) ==834710== by 0x5DA010: pm_regexp_parse_quantifier (regexp.c:243) ==834710== by 0x5DAD69: pm_regexp_parse_expression (regexp.c:738) ==834710== by 0x5DAD69: pm_regexp_parse_pattern (regexp.c:761) ==834710== by 0x5DAD69: pm_regexp_parse (regexp.c:773) ==834710== by 0x5A2EE7: parse_regular_expression_named_captures (prism.c:20886) ==834710== by 0x5A2EE7: parse_expression_infix (prism.c:21388) ==834710== by 0x5A5FA5: parse_expression (prism.c:21804) ==834710== by 0x5A64F3: parse_statements (prism.c:13858) ==834710== by 0x5A9730: parse_program (prism.c:22011) ==834710== by 0x576F0D: parse_input_success_p (extension.c:1062) ==834710== by 0x576F0D: parse_success_p (extension.c:1084) This commit adds checks for the end of the string to pm_regexp_parse_range_quantifier. https://github.com/ruby/prism/commit/be6cbc23ef
2024-08-22[ruby/prism] Turn off extended mode when parsing extended groupKevin Newton
https://github.com/ruby/prism/commit/098b3f08bc
2024-07-01[ruby/prism] Properly support parsing regexp in extended modeKevin Newton
https://github.com/ruby/prism/commit/bedc4585ed
2024-06-05[ruby/prism] Parse all regular expressionsKevin Newton
https://github.com/ruby/prism/commit/11e0e204ce
2024-06-05[ruby/prism] Add Onigmo errors for invalid groupsKevin Newton
https://github.com/ruby/prism/commit/27e7685dd4
2024-06-05[ruby/prism] Add Onigmo error for invalid repeat and empty group nameKevin Newton
https://github.com/ruby/prism/commit/953601e3c0
2024-06-05[ruby/prism] Add Onigmo error for empty char-classKevin Newton
https://github.com/ruby/prism/commit/2e02fa3b80
2024-06-05[ruby/prism] Report onigmo errors for depthKevin Newton
https://github.com/ruby/prism/commit/e0e8bba8be
2024-06-05[ruby/prism] Change pm_regexp_parse to not return booleanKevin Newton
https://github.com/ruby/prism/commit/b03afbe857
2024-06-05[ruby/prism] Pass prism parser into regexp parserKevin Newton
https://github.com/ruby/prism/commit/c19b0fa185
2024-06-05[ruby/prism] Switch regexp parsing to use a callback from named capture groupsKevin Newton
https://github.com/ruby/prism/commit/29d80e486e
2024-02-18[ruby/prism] Account for encoding in regexp named capturesKevin Newton
https://github.com/ruby/prism/commit/17dc6b6281
2023-11-30[ruby/prism] Correctly pass around const pm_encoding_t *Kevin Newton
https://github.com/ruby/prism/commit/ce4c67fb3a
2023-11-05Do not use non-ASCII chars in sourcesNobuyoshi Nakada
No encodings are guaranteed in C compilers, and other than UTF-8 encodings may be assumed in some platforms, e.g., CP932 on Windows Japanese edition, and may result in compilation errors.
2023-11-01[ruby/prism] Last remaining missing C commentsKevin Newton
https://github.com/ruby/prism/commit/e327449db6
2023-11-01[ruby/prism] Documentation for diagnostics and regexpKevin Newton
https://github.com/ruby/prism/commit/16e0579044
2023-10-27[ruby/prism] Use MatchWriteNode on split InterpolatedRENKevin Newton
https://github.com/ruby/prism/commit/ee54244800
2023-09-27Sync to prism rename commitsKevin Newton
2023-09-27Rename YARP filepaths to prism filepathsKevin Newton