Loading ...
Sorry, an error occurred while loading the content.

90856Re: syntax auto detect

Expand Messages
  • zhengquan
    May 23, 2008
    • 0 Attachment
      In fact I have lots of command file ending with cmd, but the contents
      in
      it are quite different. One of them looks like this, I guess I will
      have
      to write the syntax for that though I know nothing about it at the
      moment. Do you think it takes long to write syntax for that?

      Thanks.
      Zhengquan

      #----------------------------------------------------------------------
      #
      #-Setting global variable:
      #set Vdd 1.5

      #----------------------------------------------------------------------
      #
      #-Conditional setting of local variables:
      #if @Vd@ < 0.1
      #define _TRANSMOD_ * DriftDiffusion
      #define _DRIVINGFORCE_ GradQuasiFermi
      #define _B2BAVAL_ * No band-to-band and impact ionization
      #define _EQUATIONS_ Poisson Electron Hole

      #else
      #define _TRANSMOD_ Hydrodynamics( eTemperature )
      #define _DRIVINGFORCE_ CarrierTempDrive
      #define _B2BAVAL_ Band2Band(E2) Avalanche(CarrierTempDrive)
      #define _EQUATIONS_ Poisson Electron Hole eTemperature

      #endif
      #----------------------------------------------------------------------
      #

      Electrode{
      { Name="source" Voltage= 0.0 Resistor= 40 }
      { Name="drain" Voltage= 0.0 Resistor= 40 }
      { Name="gate" Voltage=-0.1 }
      { Name="substrate" Voltage= 0.0 }
      #-Conditional inclusion of code:
      #if [string compare @Body@ "Tied"] == 0
      { Name="bodytie" Voltage=0.0 eRecVelocity=0 }
      #endif
      }

      File{
      #-Predefined GENESISe paranmeters
      Grid = "@tdr@"
      Plot = "@tdrdat@"
      Current = "@plot@"
      Output = "@log@"
      Param = "@parameter@"
      }

      Physics{
      #-Using local variables:
      _TRANSMOD_
      eQCvanDort
      EffectiveIntrinsicDensity( OldSlotboom )
      Recombination( SRH(DopingDep) )
      }

      Physics(Material="Silicon"){
      Mobility(
      PhuMob
      eHighFieldsaturation( _DRIVINGFORCE_ )
      hHighFieldsaturation( GradQuasiFermi )
      Enormal
      )
      Recombination(
      SRH( DopingDep )
      _B2BAVAL_
      )
      }

      Plot{
      *--Density and Currents, etc
      eDensity hDensity
      TotalCurrent/Vector eCurrent/Vector hCurrent/Vector
      eMobility hMobility
      eVelocity hVelocity
      eQuasiFermi hQuasiFermi

      *--Temperature
      eTemperature * Temperature hTemperature

      *--Fields and charges
      ElectricField/Vector Potential SpaceCharge

      *--Doping Profiles
      Doping DonorConcentration AcceptorConcentration

      *--Generation/Recombination
      SRH Band2Band * Auger
      AvalancheGeneration eAvalancheGeneration hAvalancheGeneration

      *--Driving forces
      eGradQuasiFermi/Vector hGradQuasiFermi/Vector
      eEparallel hEparallel eENormal hENormal

      *--Band structure/Composition
      BandGap
      BandGapNarrowing
      Affinity
      ConductionBand ValenceBand

      *--Traps
      * eTrappedCharge hTrappedCharge
      * eGapStatesRecombination hGapStatesRecombination
      }

      Math {
      Extrapolate
      Avalderivatives
      RelErrControl
      Digits=5
      ErRef(electron)=1.e10
      ErRef(hole)=1.e10
      Notdamped=50
      Iterations=20
      DirectCurrent
      }

      Solve {
      NewCurrentFile="init"
      Coupled(Iterations=100){ Poisson }
      Coupled{ Poisson Electron Hole }

      Quasistationary(
      InitialStep=1e-1 Increment=1.2
      Minstep=1e-5 MaxStep=0.1
      Goal{ Name="drain" Voltage= @Vd@ }
      ){ Coupled{ _EQUATIONS_ } }

      NewCurrentFile=""

      Quasistationary(
      DoZero
      InitialStep=5e-2 Increment=1.5
      Minstep=1e-5 MaxStep=0.05
      Goal{ Name="gate" Voltage= @Vdd@ }
      ){ Coupled{ _EQUATIONS_ }
      #-Arithmatic with variables: enforcing ~0.1V steps for all values of
      Vdd
      CurrentPlot( Time=(Range=(0 1) Intervals=@<int(Vdd/0.1)>@ )
      )
      }
      }


      On May 23, 5:11 pm, Gary Johnson <garyj...@...> wrote:
      > On 2008-05-23, zhengquan <zhang.zhengq...@...> wrote:
      >
      >
      >
      > > On May 1, 1:45 am, Gary Johnson <garyj...@...> wrote:
      > > > On 2008-04-25,zhengquan<zhang.zhengq...@...> wrote:
      >
      > > > > Hello,
      > > > > I wonder if vim can auto detect filetypes.
      > > > > I want to edit some .cmd files which are actually scheme scripts.
      >
      > > > > I can not add mode lines to the files because they will cause trouble
      > > > > when read by other programs. I also do not want to use autocmd to
      > > > > autodetect .cmd extensions. I would like to know if there are some
      > > > > smarter mechanisms for auto detecting filetypes.
      >
      > > > :help new-filetype-scripts
      >
      > > > You might also open $VIMRUNTIME/filetype.vim and search for "\.cmd"
      > > > to see how vim distinguishes rexx files from dosbatch files that
      > > > share the .cmd suffix. You could create your own
      > > > ~/.vim/filetype.vim and add similar logic to detect scheme files.
      > > > See
      >
      > > > :help new-filetype
      > > Hello,
      > > I saw the detection method in filetype.vim
      > > It peeks the first line to see what it is, I wonder if there are
      > > smarter and more automatic ways to detect the syntax and tell what the
      > > filetype is.
      >
      > How much more automatic can you get? As for smarter, the only
      > information there is is the file's name and its contents. Vim will
      > sometimes examine more than the first line of a file to try to
      > determine its contents, especially if the file name has no suffix at
      > all. See $VIMRUNTIME/scripts.vim.
      >
      > Regards,
      > Gary

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Show all 15 messages in this topic