程序包 keyval 错误:标识符未定义

程序包 keyval 错误:标识符未定义

我正在做一些项目,我想突出显示我自己的语言(在本例中为 DSL)的语法。但是我在 overleaf 上遇到了这个错误。:

程序包 keyval 错误:标识符未定义

以下是错误的代码和行号:

\lstdefinelanguage{DSL}
{
  morekeywords={propNode, attachNodeProperty, forall, get_edge,  min, COPY,
    ENTRYPOINT, Graph, node, fixedPoint, nodes, filter, neighbors, edge},
  morecomment=[l]{\#},
  identifier = [2]{},
  morestring=[b]",
  keywords = [3]{int,bool,True, False},
}



\lstset{
  language=DSL,                % choose the language of the code
  numbers=left,% where to put the line-numbers
  stepnumber=1,                   % the step between two line-numbers.        
  numbersep=5pt,                  % how far the line-numbers are from the code
  backgroundcolor=\color{white},  % choose the background color. You must add \usepackage{color}
  showspaces=false,
  rulecolor=\color{black},
  stringstyle=\color{green},
  numberstyle=\tiny\color{black},
  commentstyle=\color{gray},
  identifierstyle=\color{blue},
  keywordstyle=[3]\color{green},
  keywordstyle=\color{purple}\bfseries,% show spaces adding particular underscores
  showstringspaces=false,        % underline spaces within strings
   showtabs=false,                % show tabs within strings adding particular underscores
  tabsize=1,                      % sets default tabsize to 2 spaces
  captionpos=b,                   % sets the caption-position to bottom
  breaklines=true,                % sets automatic line breaking
  breakatwhitespace=true,         % sets if automatic breaks should only happen at whitespace
  title=\lstname                % show the filename of files included with \lstinputlisting;
}

\lstinputlisting{SSSP}

language=DSL,造成了问题。如何解决?

相关内容