Skip to content

Updated Parsing to Support Filename: and Longer Commit Hashes #2

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

AwaNoodle
Copy link

Updated the parsing so that it:

  • Allows for filename: support (doesn't use it, just strips it out)
  • Allows for the commitid: hashes to range between 10 and 20 characters

Move the readme into a markdown file and added in sections from the cvsclone.l header so it's a little easier to read.

Switched from txt to markdown and expanded the readme a little
Added support for filename: to be in the log.
Updated commitid: so that it can have hashes between 10 and 20 chars
@@ -450,8 +450,10 @@ void begin(char *s, size_t l)
<ATR1>-[0-9]+;\ \ BEGIN ATR0; rfile.revt->ldel = atoi(yytext+1);
<ATR0>kopt:\ [^;\n]+;\n BEGIN REV3; rfile.revt->kopt = getstr(yyleng-8, yytext+6);
<ATR0>kopt:\ [^;\n]+;\ \ rfile.revt->kopt = getstr(yyleng-9, yytext+6);
<ATR0>commitid:\ [0-9a-f]{16};\ \ rfile.revt->commitid = getstr(16, yytext+10);
<ATR0>commitid:\ [0-9a-f]{16};\n BEGIN REV3; rfile.revt->commitid = getstr(16, yytext+10);
<ATR0>commitid:\ [0-9a-f]{10,20};\ \ rfile.revt->commitid = getstr(yyleng-11, yytext+10);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if I misunderstand stuff here (I wasn't able to google up getstr easily somehow), but shouldn't it be maybe yyleng-13 to account for the 2 escaped spaces at the end too? And in the next line, shouldn't this be yyleng-12 for the newline?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getstr() is defined in the file (which I realized after my failed Googling too). I think you're right though. I'll go over what I was thinking and update.

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.

2 participants