Is it possible to generate a context-free grammar for a programming language?



Not knowing enough on how a compiler work, is it just treating all
keyword as string of terminals? Then replace all variables based on
the declaration, through assignment or passing into a function/method/
constructor? Is there certain syntax is not as straight forward so
add-on logic is required to determine the replacement of the string
intelligently?

.



Relevant Pages

  • Re: How To Find Specific Keywords
    ... but then it excludes the specific keyword ... anywhere within the string, but it also includes other words that ... I used it with the ParseItems function, ... Dim oMatches As Object 'VBScript_RegExp_55.MatchCollection ...
    (comp.databases.ms-access)
  • Re: Using the same subroutine to read files with different structures
    ... to read each line from the external file into a temporary string, ... However, to write a really good parser relying mostly on internal read, there typically isn't enough error reporting granularity in the IOSTAT return codes to do a really proper job of it, not to mention that the IOSTAT values aren't portable. ... returns an array of keyword strings ...
    (comp.lang.fortran)
  • How To Find Specific Keywords
    ... but then it excludes the specific keyword ... anywhere within the string, but it also includes other words that ... Dim oMatches As Object 'VBScript_RegExp_55.MatchCollection ... Dim intIndex As Integer ...
    (comp.databases.ms-access)
  • Re: Using the same subroutine to read files with different structures
    ... to read each line from the external file into a temporary string, ... However, to write a really good parser relying mostly on internal read, there typically isn't enough error reporting granularity in the IOSTAT return codes to do a really proper job of it, not to mention that the IOSTAT values aren't portable. ... returns an array of keyword strings ... the inputs under differing namelists then you will find the restriction. ...
    (comp.lang.fortran)
  • Re: converting dict to object
    ... doesn't work [3 is not a string]; ... Python identifier (not a keyword). ... bitten by the keyword problem. ...
    (comp.lang.python)