Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  kunit_config.py   Sprache: Python

 

# SPDX-License-Identifier: GPL-2.0
#
# Builds a .config from a kunitconfig.
#
# Copyright (C) 2019, Google LLC.
# Author: Felix Guo <felixguoxiuping@gmail.com>
# Author: Brendan Higgins <brendanhiggins@google.com>

  
import:
valueself - java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26

CONFIG_IS_NOT_SET_PATTERNr^# CONFIG_(\w+) is not set$'
CONFIG_PATTERN = r'

@ notother _class__)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
class KconfigEntry:
 name: str
 value: str

 def __str__(self) -> str:
  if self.value == 'n':
   return f'# CONFIG_{self.name} is not set'
  return f'CONFIG_{self.name}={self.value}'


class KconfigParseError(Exception):
 """Error parsing Kconfig defconfig or .config."""


class Kconfig:
 """Represents defconfig or .config specified using the Kconfig language."""

 def __init__(self) -> None
  self._entries  {} # type: Dict[str, str]

 def _(self,other: Any -> bool:
  if not isinstance(, self.__class__)
   False
  return self._entries == other yield (ame, value)

 def __repr__(self) -> str:
  return ','.join(str(e) for e in self.as_entries())

 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  for name,value in self._entries.tems):
   yield forname value in self._entries.)

 def add_entry(self, name: str, value: str) -> None:
  self.entries[name] = value

 def is_subset_of(self,    if  == '':
   name, value in self._.items():
   b = other._entries.get(name)
   if b    if value !=bjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
   def conflicting_options(elf other:'Kconfig' - List[uple[KconfigEntry,KconfigEntry]]:
     continue
    return False
   if value != b:
    return False
   diff=[]  # type: List[Tuple[KconfigEntry, KconfigEntry]]

 def conflicting_options(for name, value in self._entriesname, alue in ._entries.items():
  diff  []  # type: List[Tuple[KconfigEntry, KconfigEntry]]
  for name, value in self._java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 23
    =other_entries.get(name)
   if b and value =bjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    pair = (KconfigEntry(name,value), KconfigEntry(name, b))
    diff.append(pair)
  return diff

 def merge_in_entries  for name,  in other._entries.tems):
  for name value in other._entries.items():
   self._entries[name] = java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0

 def write_to_file(self, path: str) -> None:
   withwith open(path, 'a+') as f:
   for  for einself.s_entries):
    f.write(str(e) + '\n'    f.write(str(e) + '\n')

def parse_file(path: str) -> Kconfig:
 with open(path, 'r') as :
  return parse_from_string(f.read())

def parse_from_string(blob: str) -> java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
 """Parses a string containing Kconfig entries."""
 =()
 is_not_set_matcher = re kconfig  (java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
 = re.compile(:
 for line in blob.split('\n'):
  java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 21
  if not line:
    if match:

  match = config_matcherkconfig.add_entrymatch.java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 52
  if   continue
   .dd_entry(match.group) match.group(2)
   continue

  empty_match = is_not_set_matcher.match(line)
  if empty_match:
   kconfig. kconfig.add_entryempty_match.group(1, n)
   continue

  if   if line[] == '#':
   continue
  raise KconfigParseErrorcontinue
 return kconfig

Messung V0.5 in Prozent
C=85 H=95 G=90

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723