Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Robot capture keyword started from varref #1571

Conversation

masatake
Copy link
Member

@masatake masatake commented Oct 6, 2017

Input:

*** Keywords ***

${embedded arg} Starting Single
No Operation

Output:

${embedded arg} Starting Single	input.robot	/^${embedded arg} Starting Single$/;"	k

Close #1570.
Close #1572.

If {exclusive} flag is specified and an input line matches a regex
pattern, the input line is consumed always; lregex skips the rest of
patterns for the input line. This is the original behavior of lregex
engine.

This commit extends the behavior if a pattern is specified with
matchCallbackPattern function. Even if a regex pattern (with
{exclusive}) matches an input line, and a callback false returns
false, the input line is never consumed. The callback function must
return true for consuming the input line.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0005%) to 85.972% when pulling cd8b62d on masatake:robot--capture-keyword-started-from-varref into 924c0ab on universal-ctags:master.

@k-takata
Copy link
Member

k-takata commented Oct 6, 2017

Oputput -> Output

Input:

    *** Keywords ***

    ${embedded arg} Starting Single
	No Operation

Output:

    ${embedded arg} Starting Single	input.robot	/^${embedded arg} Starting Single$/;"	k

Close universal-ctags#1570.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
@masatake masatake force-pushed the robot--capture-keyword-started-from-varref branch from cd8b62d to 0e230a1 Compare October 6, 2017 03:31
@masatake
Copy link
Member Author

masatake commented Oct 6, 2017

@k-takata, thank you. Updated.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0005%) to 85.972% when pulling 0e230a1 on masatake:robot--capture-keyword-started-from-varref into 924c0ab on universal-ctags:master.

@masatake masatake force-pushed the robot--capture-keyword-started-from-varref branch from 1019889 to 50b0604 Compare October 6, 2017 20:54
@masatake masatake force-pushed the robot--capture-keyword-started-from-varref branch from 50b0604 to 70a6c34 Compare October 6, 2017 20:55
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0005%) to 85.972% when pulling 1019889 on masatake:robot--capture-keyword-started-from-varref into 924c0ab on universal-ctags:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0005%) to 85.972% when pulling 70a6c34 on masatake:robot--capture-keyword-started-from-varref into 924c0ab on universal-ctags:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0005%) to 85.972% when pulling 70a6c34 on masatake:robot--capture-keyword-started-from-varref into 924c0ab on universal-ctags:master.

@masatake
Copy link
Member Author

masatake commented Oct 7, 2017

Regex engine on MacOSX doesn't accept the updated regex pattern. I will inspect the pattern.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0005%) to 85.972% when pulling 81a4593 on masatake:robot--capture-keyword-started-from-varref into 924c0ab on universal-ctags:master.

@masatake
Copy link
Member Author

masatake commented Oct 7, 2017

make chop LANGUAGES=Robot is passed.

@masatake
Copy link
Member Author

masatake commented Oct 7, 2017

I'm afraid that this parser enters infinite loop.
"chop" target generates input files truncating the tail of the existing input files. The chop test is passed.
I would like to try new target named ... "kick" target that generates input files truncating the head of the existing input files.

I would like to implement "kick" target before merging this.

@masatake
Copy link
Member Author

masatake commented Oct 7, 2017

I named "slap" instead of "kick".
Robot parsers passes slap target, too.

@masatake masatake merged commit b13cb55 into universal-ctags:master Oct 7, 2017
derekschrock added a commit to derekschrock/ctags that referenced this pull request Sep 5, 2018
Running unit tests tmain and units via 'make check' the empty expression
.{0} from the matching group in parsers/robot.c was causing FreeBSD libc
regcomp to produce an error: empty (sub)expression.

tmain would fail for some checks while units would fail for robots checks.

Removing the emptry expression .{0} "match anything exactly zero times"
fixes this issue and all expected tests pass for both tmain and units.

Testing the same change, removing the expression .{0} from the
matching group, on centos7 does not appear to have any regessions.

This reverts the following commit
universal-ctags@81a4593

That was created for the following issue:
universal-ctags#1571 (comment)

It's possible there's some regression for macOS however macOS on Travis
doesn't seem to have any issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants