#748: interface.ccl parser reports error for extra spaces after in function alias block ------------------------+--------------------------------------------------- Reporter: jtao | Owner: Type: defect | Status: new Priority: major | Milestone: Component: Cactus | Version: Keywords: CST parser | ------------------------+--------------------------------------------------- E.g., if there are extra spaces after "LANGUAGE C" in the function alias block, the parser will report an missing "Language specification" error instead of discarding the extra spaces.
PROVIDES FUNCTION MoLRegisterConstrainedGroup WITH \ MoL_RegisterConstrainedGroup \ LANGUAGE C
#748: interface.ccl parser reports error for extra spaces after in function alias block ---------------------+------------------------------------------------------ Reporter: jtao | Owner: Type: defect | Status: review Priority: major | Milestone: Component: Cactus | Version: Resolution: | Keywords: CST parser ---------------------+------------------------------------------------------ Changes (by eschnett):
* status: new => review
Old description:
E.g., if there are extra spaces after "LANGUAGE C" in the function alias block, the parser will report an missing "Language specification" error instead of discarding the extra spaces.
PROVIDES FUNCTION MoLRegisterConstrainedGroup WITH \ MoL_RegisterConstrainedGroup \ LANGUAGE C
New description:
E.g., if there are extra spaces after "LANGUAGE C" in the function alias block, the parser will report an missing "Language specification" error instead of discarding the extra spaces.
PROVIDES FUNCTION MoLRegisterConstrainedGroup WITH \ MoL_RegisterConstrainedGroup \ LANGUAGE C
}}}
--
Comment:
Please test this patch:
{{{ Index: interface_parser.pl =================================================================== --- interface_parser.pl (revision 4788) +++ interface_parser.pl (working copy) @@ -746,7 +746,7 @@ $funcname = $1; $provided_by = $2;
- if($provided_by =~ m/(.*)\s*LANGUAGE\s*(.+)/i) + if($provided_by =~ m/(.*)\s*LANGUAGE\s*(.+)\s*/i) { $provided_by = $1; $provided_by_language = "\U$2";
#748: interface.ccl parser reports error for extra spaces after in function alias block ---------------------+------------------------------------------------------ Reporter: jtao | Owner: Type: defect | Status: review Priority: major | Milestone: Component: Cactus | Version: Resolution: | Keywords: CST parser ---------------------+------------------------------------------------------
Comment (by jtao):
tried this and couple hacks myself, but still not working.
#748: interface.ccl parser reports error for extra spaces after in function alias block ---------------------+------------------------------------------------------ Reporter: jtao | Owner: Type: defect | Status: review Priority: major | Milestone: Component: Cactus | Version: Resolution: | Keywords: CST parser ---------------------+------------------------------------------------------
Comment (by eschnett):
Right. The pattern should end in
LANGUAGE\s+(.*\S)\s*/i
(which is still not quite right, because no space in front of LANGUAGE is required).
#748: interface.ccl parser reports error for extra spaces after in function alias block ---------------------+------------------------------------------------------ Reporter: jtao | Owner: Type: defect | Status: reopened Priority: major | Milestone: Component: Cactus | Version: Resolution: | Keywords: CST parser ---------------------+------------------------------------------------------ Changes (by knarf):
* status: review => reopened
#748: interface.ccl parser reports error for extra spaces after in function alias block ---------------------+------------------------------------------------------ Reporter: jtao | Owner: Type: defect | Status: review Priority: major | Milestone: Component: Cactus | Version: Resolution: | Keywords: CST parser ---------------------+------------------------------------------------------ Changes (by eschnett):
* status: reopened => review
Comment:
This is the patch I am suggesting:
{{{ Index: interface_parser.pl =================================================================== --- interface_parser.pl (revision 4788) +++ interface_parser.pl (working copy) @@ -746,7 +746,7 @@ $funcname = $1; $provided_by = $2;
- if($provided_by =~ m/(.*)\s*LANGUAGE\s*(.+)/i) + if($provided_by =~ m/(.*)\s* LANGUAGE\s+(.*\S)\s*/i) { $provided_by = $1; $provided_by_language = "\U$2"; }}}
#748: interface.ccl parser reports error for extra spaces after in function alias block ---------------------+------------------------------------------------------ Reporter: jtao | Owner: Type: defect | Status: review Priority: major | Milestone: Component: Cactus | Version: Resolution: | Keywords: CST parser ---------------------+------------------------------------------------------
Comment (by jtao):
It works for me. Thanks !
#748: interface.ccl parser reports error for extra spaces after in function alias block ---------------------+------------------------------------------------------ Reporter: jtao | Owner: Type: defect | Status: closed Priority: major | Milestone: Component: Cactus | Version: Resolution: fixed | Keywords: CST parser ---------------------+------------------------------------------------------ Changes (by eschnett):
* status: review => closed * resolution: => fixed
Comment:
Corrected and applied. The regexp is now
{{{ if($provided_by =~ m/^(.*)\s+LANGUAGE\s+(.*\S)\s*$/i) }}}
trac@lists.einsteintoolkit.org