[Skip Navigation] [CSUSB] / [CNS] / [Comp Sci Dept] / [R J Botting] / [Samples] / pascal.lexicon
[Index] [Contents] [Source Text] [About] [Notation] [Copyright] [Comment/Contact] [Search ]
Tue Sep 18 15:26:31 PDT 2007

Contents


    The Lexical Elements of Pascal

    Useful meta-linguistic Macros

  1. L::= (_) #(comma (_)).
  2. N::= (_) #( (_) ).
  3. O::= ( (_)|).
  4. P::= O( left L( (_) ) right).
  5. R::= (_) doubledot (_).
  6. S::= (_) #(semicolon (_)).

    Lexemes in Pascal

  7. adding_operator::= "+" | "-" | "or",
  8. apostrophe_image::= "'""'",
  9. array::="array",
  10. begin::="begin",
  11. caret::="^",
  12. case::="case",
  13. character_string::= "'" string_element #(string_element) "'",
  14. colon::=":",
  15. colon_equals::=":=",
  16. comma::=",",
  17. const::="const",
  18. digit::= ("1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0"),
  19. digit_sequence::= digit #(digit),
  20. do::="do",
  21. dot::=".",
  22. doubledot::="..",
  23. downto::="downto",
  24. else::="else",
  25. end::="end",
  26. equals::="=",
  27. for::="for",
  28. fractional_part::= digit_sequence,
  29. function::="function",
  30. goto::="goto",
  31. identifier::= letter #( letter | digit),
  32. if::="if",
  33. label::="label",
  34. left::="(",
  35. left_br::="[",
  36. letter::= ("a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"),
  37. multiplying_operator::= "*" | "/" | "div" | "mod" | "and",
  38. nil::="nil",
  39. not::="not",
  40. of::="of",
  41. of::="of",
  42. packed::="packed",
  43. packed::="packed",
  44. procedure::="procedure",
  45. program::="program",
  46. record::="record",
  47. relational_operator::= "=" | "<>" | "<" | ">" | "<=" | ">=" | "in",
  48. repeat::="repeat",
  49. right::=")",
  50. right_br::="]",
  51. scale_factor::= signed_integer,
  52. semicolon::=";",
  53. file::="file",
  54. set::="set",
  55. sign::= "+" | "-",
  56. signed_integer::= O(sign) unsigned_integer,
  57. string_character::= one_of_a_set_of_implementation_defined_characters,
  58. string_element::= apostrophe_image | string_character,
  59. then::="then",
  60. to::="to",
  61. type::="type",
  62. unsigned_integer::= digit_sequence,
  63. unsigned_real::= unsigned_integer "." fractional_part #("e" scale_factor |) | unsigned_integer "e" scale_factor,
  64. until::="until",
  65. var::="var",
  66. var::="var",
  67. while::="while",
  68. with::="with",

    Syntax

    [ pascal.syntax.html ]

End