File: rx_goal

package info (click to toggle)
nqp 2022.12%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,436 kB
  • sloc: java: 28,030; perl: 3,394; ansic: 451; makefile: 200; javascript: 68; sh: 1
file content (17 lines) | stat: -rw-r--r-- 887 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
##   Goal tests
'(' ~ ')' \d+		(123)		y	basic goal syntax
'(' ~ ')' \d+		(123		n	missing goal
'(' ~ ')' \d+		(123abc)	n	stuff before goal
'(' ~ ')' \d+		(abc)		n	can't match internal stuff
'(' ~ ')' \d+		()		n	missing internal stuff
['('] ~ [')'] \d+		(123)		y	goal syntax with brackets
['('] ~ [')'] [\d+]		(123)		y	goal syntax with brackets
['('] ~ [')'] [\d\d+]		(123)		y	goal syntax with brackets
('(') ~ (')') (\d\d+)		(123)		y	goal syntax with parentheses
'(' ~ <[()]> \d+		(123)		y	non-literal goal
'(' ~ <[()]> \d+		(123(		y	non-literal goal
'(' ~ <[()]> \d+		(123]		n	failing non-literal goal
:dba('zz') '(' ~ ')' \d+	(123		n	:dba adverb
(a) ~ (c) (b)		abc		<mob[0]: a @ 0>	capturing and goal matching interaction (1)
(a) ~ (c) (b)		abc		<mob[1]: c @ 2>	capturing and goal matching interaction (2)
(a) ~ (c) (b)		abc		<mob[2]: b @ 1>	capturing and goal matching interaction (3)