.NAME Characters in header file name

.DESCRIPTION
	The ', ", /* or // characters shall not occur in a header file name. 

.COMMENT V7.0

.SEVERITY Required

.COMMENT
Please refer to the MISRA C++:2008 document for further details (www.misra-cpp.com)

.COMMAND tcl

.CODE

::logiscope::include -once common utilities.tcl

proc compute {standardName tree} {
  variable CurrentParameterList
  # Check all ... nodes
  utilities::filterTree $tree [list [namespace current]::check]
}

proc check { node } {
  set curOperator [::logiscope::treeOperator $node]
  set curOperatorName [::logiscope::opName $curOperator]
  # Look for a #include
  if {[string equal $curOperatorName pp_include]} {
    # Whether the type of include is local or external, retrieve the file name
	set curFileNode [::logiscope::treeDown $node 0]
    set curFileOpe [::logiscope::treeOperator $curFileNode]
    set curFileOpeName [::logiscope::opName $curFileOpe]
	set atom [::logiscope::treeAtomValue $curFileNode]
	set curFileName [::logiscope::stringValue $atom]
	# Forbidden characters are ' " /* //
	  if {[regexp {['"]} $curFileName]||[regexp {/\*} $curFileName]||[regexp {//} $curFileName]} {
		::logiscope::addViolation $node
		return 0	
	  }
  }
return 1
}
