rhodes 2.3.2 → 2.4.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (623) hide show
  1. data/CHANGELOG +18 -0
  2. data/CREDITS +38 -0
  3. data/README.md +2 -2
  4. data/Rakefile +60 -2
  5. data/bin/set-rhodes-sdk.bat +1 -0
  6. data/doc/application.txt +11 -0
  7. data/doc/build.txt +156 -39
  8. data/doc/configuration.txt +1 -10
  9. data/doc/connect-to-web-services.txt +6 -6
  10. data/doc/device-caps.txt +48 -5
  11. data/doc/extensions.txt +8 -1
  12. data/doc/rhom.txt +16 -0
  13. data/doc/synchronization.txt +56 -14
  14. data/doc/ui.txt +23 -2
  15. data/installer/instant-rhodes.nsi +6 -6
  16. data/lib/extensions/barcode/ext/barcode/platform/iphone/Barcode.xcodeproj/project.pbxproj +4 -2
  17. data/lib/extensions/barcode/ext/barcode/platform/wm/Rakefile +1 -1
  18. data/lib/extensions/digest-md5/ext/Rakefile +3 -3
  19. data/lib/extensions/digest-md5/ext/build +0 -1
  20. data/lib/extensions/digest-sha1/ext/Rakefile +1 -1
  21. data/lib/extensions/digest-sha1/ext/build +0 -1
  22. data/lib/extensions/digest/ext/Rakefile +3 -3
  23. data/lib/extensions/digest/ext/build +0 -1
  24. data/lib/extensions/fcntl/ext/Rakefile +1 -1
  25. data/lib/extensions/mspec/mspec/guards/guard.rb +4 -0
  26. data/lib/extensions/mspec/mspec/helpers/environment.rb +4 -0
  27. data/lib/extensions/nfc/ext.yml +2 -0
  28. data/lib/extensions/nfc/ext/build +12 -0
  29. data/lib/extensions/nfc/ext/build.bat +8 -0
  30. data/lib/extensions/nfc/ext/nfc/platform/android/AndroidManifest.xml +25 -0
  31. data/lib/extensions/nfc/ext/nfc/platform/android/Rakefile +94 -0
  32. data/lib/extensions/nfc/ext/nfc/platform/android/ext_build.files +4 -0
  33. data/lib/extensions/nfc/ext/nfc/platform/android/jni/src/nfc.cpp +404 -0
  34. data/lib/extensions/nfc/ext/nfc/platform/android/src/com/nfc/Nfc.java +138 -0
  35. data/lib/extensions/nfc/ext/nfc/platform/android/src/com/nfc/NfcMessage.java +34 -0
  36. data/lib/extensions/nfc/ext/nfc/platform/android/src/com/nfc/NfcMessagePack.java +33 -0
  37. data/lib/extensions/nfc/ext/nfc/platform/android/src/com/nfc/NfcRecord.java +149 -0
  38. data/lib/extensions/nfc/ext/nfc/shared/ruby/nfc.i +22 -0
  39. data/lib/extensions/nfc/ext/nfc/shared/ruby/nfc_wrap.c +2034 -0
  40. data/lib/extensions/nfc/nfc.rb +120 -0
  41. data/lib/extensions/rholang/{lang_ca.rb → rholang/lang_ca.rb} +0 -0
  42. data/lib/extensions/rholang/{lang_cf.rb → rholang/lang_cf.rb} +0 -0
  43. data/lib/extensions/rholang/{lang_chef.rb → rholang/lang_chef.rb} +0 -0
  44. data/lib/extensions/rholang/{lang_cs.rb → rholang/lang_cs.rb} +0 -0
  45. data/lib/extensions/rholang/{lang_da.rb → rholang/lang_da.rb} +0 -0
  46. data/lib/extensions/rholang/{lang_de.rb → rholang/lang_de.rb} +0 -0
  47. data/lib/extensions/rholang/{lang_es.rb → rholang/lang_es.rb} +0 -0
  48. data/lib/extensions/rholang/{lang_es_ar.rb → rholang/lang_es_ar.rb} +0 -0
  49. data/lib/extensions/rholang/{lang_fi.rb → rholang/lang_fi.rb} +0 -0
  50. data/lib/extensions/rholang/{lang_fr.rb → rholang/lang_fr.rb} +0 -0
  51. data/lib/extensions/rholang/{lang_it.rb → rholang/lang_it.rb} +0 -0
  52. data/lib/extensions/rholang/{lang_ko.rb → rholang/lang_ko.rb} +0 -0
  53. data/lib/extensions/rholang/{lang_nl.rb → rholang/lang_nl.rb} +0 -0
  54. data/lib/extensions/rholang/{lang_no.rb → rholang/lang_no.rb} +0 -0
  55. data/lib/extensions/rholang/{lang_pt.rb → rholang/lang_pt.rb} +0 -0
  56. data/lib/extensions/rholang/{lang_pt_br.rb → rholang/lang_pt_br.rb} +0 -0
  57. data/lib/extensions/rholang/{lang_ru.rb → rholang/lang_ru.rb} +0 -0
  58. data/lib/extensions/rholang/{lang_se.rb → rholang/lang_se.rb} +0 -0
  59. data/lib/extensions/rholang/{lang_sr.rb → rholang/lang_sr.rb} +0 -0
  60. data/lib/extensions/rholang/{rhoerror_ru.rb → rholang/rhoerror_ru.rb} +0 -0
  61. data/lib/extensions/rholang/{rhomsg_ru.rb → rholang/rhomsg_ru.rb} +0 -0
  62. data/lib/framework/date/format.rb +2 -0
  63. data/lib/framework/dateOrig.rb +17 -8
  64. data/lib/framework/rational18.rb +532 -0
  65. data/lib/framework/res/back_btn.wp7.png +0 -0
  66. data/lib/framework/res/blue_pushpin.wp7.png +0 -0
  67. data/lib/framework/res/blue_pushpin_small.wp7.png +0 -0
  68. data/lib/framework/res/callout.wp7.png +0 -0
  69. data/lib/framework/res/callout_link.wp7.png +0 -0
  70. data/lib/framework/res/esri.wp7.png +0 -0
  71. data/lib/framework/res/forward_btn.wp7.png +0 -0
  72. data/lib/framework/res/home_btn.wp7.png +0 -0
  73. data/lib/framework/res/options_btn.wp7.png +0 -0
  74. data/lib/framework/res/refresh_btn.wp7.png +0 -0
  75. data/lib/framework/rho/render.rb +8 -1
  76. data/lib/framework/rho/rho.rb +30 -7
  77. data/lib/framework/rho/rhoapplication.rb +9 -4
  78. data/lib/framework/rho/rhofsconnector.rb +5 -1
  79. data/lib/framework/rho/rhotabbar.rb +8 -0
  80. data/lib/framework/rho/rhotoolbar.rb +1 -1
  81. data/lib/framework/rho/rhoviewhelpers.rb +18 -1
  82. data/lib/framework/rhodes.rb +1 -1
  83. data/lib/framework/rhoframework.rb +46 -1
  84. data/lib/framework/rholang/localization_simplified.rb +17 -16
  85. data/lib/framework/rhom/rhom_db_adapter.rb +2 -2
  86. data/lib/framework/rhom/rhom_object_factory.rb +115 -12
  87. data/lib/framework/rhosystem.rb +135 -0
  88. data/lib/framework/version.rb +1 -1
  89. data/lib/rhodes.rb +1 -1
  90. data/lib/test/apps/rhoconfig.txt +23 -23
  91. data/platform/android/Rhodes/AndroidManifest.full.xml +101 -0
  92. data/platform/android/Rhodes/AndroidManifest.xml +10 -15
  93. data/platform/android/Rhodes/default.properties +11 -0
  94. data/platform/android/Rhodes/gen/com/rhomobile/rhodes/R.java +59 -53
  95. data/platform/android/Rhodes/jni/include/rhodes.h +1 -0
  96. data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_RhodesApplication.h +21 -0
  97. data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_alert_PopupActivity.h +21 -0
  98. data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_file_RhoFileApi.h +10 -2
  99. data/platform/android/Rhodes/jni/src/alert.cpp +2 -1
  100. data/platform/android/Rhodes/jni/src/datetimepicker.cpp +2 -0
  101. data/platform/android/Rhodes/jni/src/fileapi.cpp +671 -84
  102. data/platform/android/Rhodes/jni/src/nativebar.cpp +18 -0
  103. data/platform/android/Rhodes/jni/src/rhodes.cpp +92 -1
  104. data/platform/android/Rhodes/res/values/styles.xml +7 -0
  105. data/platform/android/Rhodes/src/com/rhomobile/rhodes/BaseActivity.java +35 -2
  106. data/platform/android/Rhodes/src/com/rhomobile/rhodes/Capabilities.java +12 -13
  107. data/platform/android/Rhodes/src/com/rhomobile/rhodes/LocalFileProvider.java +130 -0
  108. data/platform/android/Rhodes/src/com/rhomobile/rhodes/NativeBar.java +6 -0
  109. data/platform/android/Rhodes/src/com/rhomobile/rhodes/PushReceiver.java +5 -1
  110. data/platform/android/Rhodes/src/com/rhomobile/rhodes/PushService.java +6 -2
  111. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoMenu.java +7 -36
  112. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +43 -20
  113. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +2 -0
  114. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +63 -28
  115. data/platform/android/Rhodes/src/com/rhomobile/rhodes/Utils.java +2 -2
  116. data/platform/android/Rhodes/src/com/rhomobile/rhodes/WebView.java +6 -2
  117. data/platform/android/Rhodes/src/com/rhomobile/rhodes/alert/Alert.java +19 -282
  118. data/platform/android/Rhodes/src/com/rhomobile/rhodes/alert/PopupActivity.java +354 -0
  119. data/platform/android/Rhodes/src/com/rhomobile/rhodes/datetime/DateTimePickerScreen.java +4 -0
  120. data/platform/android/Rhodes/src/com/rhomobile/rhodes/event/EventStore.java +1 -2
  121. data/platform/android/Rhodes/src/com/rhomobile/rhodes/file/RhoFileApi.java +71 -5
  122. data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocationImpl.java +107 -37
  123. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +10 -7
  124. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/TabbedMainView.java +156 -56
  125. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MapView.java +0 -1
  126. data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactAccessorNew.java +40 -32
  127. data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/SignatureView.java +1 -0
  128. data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/ExternalHttpHandler.java +14 -6
  129. data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/LocalFileHandler.java +46 -0
  130. data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/MailUriHandler.java +4 -24
  131. data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/UriHandler.java +3 -1
  132. data/platform/android/build/RhodesSRC_build.files +28 -25
  133. data/platform/android/build/android.rake +230 -54
  134. data/platform/android/build/androidcommon.rb +1 -1
  135. data/platform/android/build/librhocommon_build.files +1 -0
  136. data/platform/bb/Hsqldb/BlackBerry_App_Descriptor.xml +20 -0
  137. data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBResult.java +1 -5
  138. data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBStorage.java +6 -1
  139. data/platform/bb/Hsqldb/src/org/hsqldb/rowio/RowOutputBase.java +1 -1
  140. data/platform/bb/Hsqldb/src/org/hsqldb/rowio/RowOutputBinary.java +1 -1
  141. data/platform/bb/RubyVM/BlackBerry_App_Descriptor.xml +20 -0
  142. data/platform/bb/RubyVM/src/com/rho/IRhoRubyHelper.java +2 -0
  143. data/platform/bb/RubyVM/src/com/rho/RhoLogOutputSink.java +0 -1
  144. data/platform/bb/RubyVM/src/com/rho/RhoLogger.java +12 -10
  145. data/platform/bb/RubyVM/src/com/rho/RhoThread.java +16 -0
  146. data/platform/bb/RubyVM/src/com/rho/RhoTimer.java +89 -0
  147. data/platform/bb/RubyVM/src/com/rho/RhodesApp.java +20 -13
  148. data/platform/bb/RubyVM/src/com/rho/SplashScreen.java +1 -2
  149. data/platform/bb/RubyVM/src/com/rho/ThreadQueue.java +2 -2
  150. data/platform/bb/RubyVM/src/com/rho/TimeInterval.java +5 -0
  151. data/platform/bb/RubyVM/src/com/rho/db/DBAdapter.java +54 -48
  152. data/platform/bb/RubyVM/src/com/rho/db/IDBResult.java +0 -1
  153. data/platform/bb/RubyVM/src/com/rho/db/IDBStorage.java +1 -0
  154. data/platform/bb/RubyVM/src/com/rho/net/AsyncHttp.java +1 -1
  155. data/platform/bb/RubyVM/src/com/rho/sync/ClientRegister.java +1 -1
  156. data/platform/bb/RubyVM/src/com/rho/sync/JSONStructIterator.java +1 -1
  157. data/platform/bb/RubyVM/src/com/rho/sync/SyncEngine.java +16 -8
  158. data/platform/bb/RubyVM/src/com/rho/sync/SyncNotify.java +2 -2
  159. data/platform/bb/RubyVM/src/com/rho/sync/SyncSource.java +52 -29
  160. data/platform/bb/RubyVM/src/com/rho/sync/SyncThread.java +1 -3
  161. data/platform/bb/build/RubyVM_build.files +1 -0
  162. data/platform/bb/build/bb.rake +29 -9
  163. data/platform/bb/rhodes/BlackBerry_App_Descriptor.xml +23 -0
  164. data/platform/bb/rhodes/platform/5.0/com/rho/RhodesApplicationPlatform.java +1 -1
  165. data/platform/bb/rhodes/platform/5.0/com/rho/db/SqliteCopyResult.java +0 -4
  166. data/platform/bb/rhodes/platform/5.0/com/rho/db/SqliteResult.java +13 -20
  167. data/platform/bb/rhodes/platform/5.0/com/rho/db/SqliteStorage.java +183 -157
  168. data/platform/bb/rhodes/src/com/rho/RhoRubyHelper.java +22 -0
  169. data/platform/bb/rhodes/src/com/rho/RhodesApplicationPlatform.java +1 -1
  170. data/platform/bb/rhodes/src/com/rho/db/SqliteCopyResult.java +0 -4
  171. data/platform/bb/rhodes/src/com/rho/db/SqliteResult.java +13 -20
  172. data/platform/bb/rhodes/src/com/rho/db/SqliteStorage.java +183 -157
  173. data/platform/bb/rhodes/src/com/rho/rubyext/System.java +46 -1
  174. data/platform/bb/rhodes/src/rhomobile/RhodesApplication.java +8 -1
  175. data/platform/bb/rhodes/src/rhomobile/camera/CameraFilesListener.java +13 -3
  176. data/platform/iphone/Classes/AppManager/AppManager.h +5 -1
  177. data/platform/iphone/Classes/AppManager/AppManager.m +170 -7
  178. data/platform/iphone/Classes/DateTimePicker.m +14 -1
  179. data/platform/iphone/Classes/DateTimePickerDelegate.h +2 -0
  180. data/platform/iphone/Classes/DateTimePickerDelegate.m +36 -2
  181. data/platform/iphone/Classes/NativeBar.h +1 -0
  182. data/platform/iphone/Classes/NativeBar.m +15 -3
  183. data/platform/iphone/Classes/Phonebook/phonebook.m +8 -9
  184. data/platform/iphone/Classes/Rhodes.m +50 -6
  185. data/platform/iphone/Classes/SimpleMainView.m +7 -6
  186. data/platform/iphone/Classes/SplitView/RightViewController.h +3 -1
  187. data/platform/iphone/Classes/SplitView/RightViewController.m +14 -1
  188. data/platform/iphone/Classes/TabbedMainView.h +4 -0
  189. data/platform/iphone/Classes/TabbedMainView.m +43 -26
  190. data/platform/iphone/Info.plist +1 -1
  191. data/platform/iphone/RhoLib/RhoLib.xcodeproj/project.pbxproj +4 -0
  192. data/platform/iphone/curl/curl.xcodeproj/project.pbxproj +3 -3
  193. data/platform/iphone/rbuild/iphone.rake +168 -119
  194. data/platform/iphone/rhoextlib/rhoextlib.xcodeproj/project.pbxproj +4 -2
  195. data/platform/iphone/rhorubylib/rhorubylib.xcodeproj/project.pbxproj +3 -3
  196. data/platform/iphone/rhorunner.xcodeproj/project.pbxproj +2 -2
  197. data/platform/iphone/rhosynclib/rhosynclib.xcodeproj/project.pbxproj +3 -3
  198. data/platform/shared/SyncClient/SyncClient.cpp +20 -8
  199. data/platform/shared/SyncClient/SyncClient.h +2 -1
  200. data/platform/shared/common/RhoDefs.h +4 -0
  201. data/platform/shared/common/RhoPort.h +22 -0
  202. data/platform/shared/common/RhoStd.h +5 -0
  203. data/platform/shared/common/RhoTime.cpp +73 -0
  204. data/platform/shared/common/RhoTime.h +26 -53
  205. data/platform/shared/common/RhodesApp.cpp +29 -28
  206. data/platform/shared/common/RhodesApp.h +4 -1
  207. data/platform/shared/common/StringConverter.h +37 -10
  208. data/platform/shared/common/app_build_capabilities.h +2 -0
  209. data/platform/shared/common/rhoparams.cpp +25 -12
  210. data/platform/shared/common/rhoparams.h +10 -8
  211. data/platform/shared/db/DBAdapter.cpp +0 -22
  212. data/platform/shared/json/RJSONTokener.c +15 -23
  213. data/platform/shared/net/AsyncHttp.cpp +9 -8
  214. data/platform/shared/net/HttpServer.cpp +61 -19
  215. data/platform/shared/net/HttpServer.h +2 -0
  216. data/platform/shared/ruby/ext/datetimepicker/datetimepicker.i +3 -0
  217. data/platform/shared/ruby/ext/datetimepicker/datetimepicker_wrap.c +151 -402
  218. data/platform/shared/ruby/ext/nativebar/nativebar.i +3 -0
  219. data/platform/shared/ruby/ext/nativebar/nativebar_wrap.c +154 -403
  220. data/platform/shared/ruby/ext/rho/rhoruby.c +4 -0
  221. data/platform/shared/ruby/ext/rho/rhoruby.h +2 -0
  222. data/platform/shared/ruby/ext/system/system.i +8 -0
  223. data/platform/shared/ruby/ext/system/system_wrap.c +80 -5
  224. data/platform/shared/ruby/file.c +6 -4
  225. data/platform/shared/ruby/gc.c +1 -1
  226. data/platform/shared/ruby/linux/ruby/config.h +7 -2
  227. data/platform/shared/ruby/missing/acosh.c +3 -3
  228. data/platform/shared/ruby/wince/_time.h +1 -1
  229. data/platform/shared/ruby/wince/stdlib.c +1 -1
  230. data/platform/shared/ruby/wince/string_wce.c +2 -2
  231. data/platform/shared/ruby/wince/sys/timeb.c +1 -0
  232. data/platform/shared/ruby/wince/time_wce.c +8 -0
  233. data/platform/shared/ruby/wince/wince.c +7 -7
  234. data/platform/shared/ruby/wince/wince.h +22 -0
  235. data/platform/shared/rubyext/System.cpp +19 -1
  236. data/platform/shared/sqlite/sqlite3.c +18993 -8129
  237. data/platform/shared/sqlite/sqlite3.h +953 -358
  238. data/platform/shared/sqlite/sqlite3ext.h +42 -0
  239. data/platform/shared/sync/SyncEngine.cpp +10 -0
  240. data/platform/shared/sync/SyncSource.cpp +41 -19
  241. data/platform/shared/sync/SyncSource.h +1 -1
  242. data/platform/shared/tcmalloc/rhomem.h +7 -2
  243. data/platform/shared/tcmalloc/windows/port.h +2 -0
  244. data/platform/shared/unzip/unzip.cpp +1 -0
  245. data/platform/shared/xruby/src/com/xruby/compiler/parser/RubyParser.java +11 -1
  246. data/platform/wm/RhoLib/RhoLib.vcproj +182 -24
  247. data/platform/wm/build/wm.rake +16 -3
  248. data/platform/wm/rhodes.sln +106 -113
  249. data/platform/wm/rhodes/Alert.cpp +6 -7
  250. data/platform/wm/rhodes/AppManager.cpp +8 -17
  251. data/platform/wm/rhodes/DateTimePicker.cpp +3 -0
  252. data/platform/wm/rhodes/DateTimePicker.h +2 -0
  253. data/platform/wm/rhodes/MainWindow.cpp +36 -16
  254. data/platform/wm/rhodes/MainWindow.h +6 -3
  255. data/platform/wm/rhodes/OutlookApp.cpp +3 -3
  256. data/platform/wm/rhodes/Rhodes.cpp +46 -27
  257. data/platform/wm/rhodes/Rhodes.rc +16 -3
  258. data/platform/wm/rhodes/RingtoneManager.cpp +7 -7
  259. data/platform/wm/rhodes/RingtoneManager.h +1 -1
  260. data/platform/wm/rhodes/Utils.cpp +2 -1
  261. data/platform/wm/rhodes/bluetooth/Bluetooth.cpp +1 -13
  262. data/platform/wm/rhodes/bluetooth/Bluetooth.h +1 -2
  263. data/platform/wm/rhodes/camera/Camera.cpp +6 -12
  264. data/platform/wm/rhodes/phonebook/phonebook.cpp +11 -11
  265. data/platform/wm/rhodes/phonebook/phonebook.h +1 -1
  266. data/platform/wm/rhodes/resource.h +3 -1
  267. data/platform/wm/rhodes/rho/net/NetRequestImpl.cpp +7 -5
  268. data/platform/wm/rhodes/rho/rubyext/GeoLocationImpl.cpp +6 -6
  269. data/platform/wm/rhodes/rho/rubyext/GeoLocationImpl.h +1 -1
  270. data/platform/wm/rhodes/rho/rubyext/NativeToolbar.cpp +6 -1
  271. data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +84 -19
  272. data/platform/wm/rhodes/rho/rubyext/calendar.cpp +2 -2
  273. data/platform/wm/rhodes/rhodes.vcproj +316 -73
  274. data/platform/wm/rhodes/signature/Signature.cpp +336 -6
  275. data/platform/wm/rhodes/signature/Signature.h +55 -0
  276. data/platform/wm/rhodes/stdafx.h +7 -4
  277. data/platform/wm/rubylib/rubylib.vcproj +261 -91
  278. data/platform/wm/sqlite3/sqlite3.vcproj +223 -69
  279. data/platform/wm/syncengine/syncengine.vcproj +220 -66
  280. data/platform/wm/tcmalloc/tcmalloc.vcproj +197 -43
  281. data/platform/wp7/IronRuby/Languages/Ruby/Ruby/Builtins/ConsoleStream.cs +107 -0
  282. data/platform/wp7/IronRuby/Languages/Ruby/Ruby/Runtime/Loader.cs +1037 -0
  283. data/platform/wp7/IronRuby/Languages/Ruby/Ruby/Runtime/RubyUtils.cs +1476 -0
  284. data/platform/wp7/RhoAppRunner/Program.cs +55 -0
  285. data/platform/wp7/RhoAppRunner/Properties/AssemblyInfo.cs +36 -0
  286. data/platform/wp7/RhoAppRunner/RhoAppRunner.csproj +69 -0
  287. data/platform/wp7/RhoRubyExtGen/GenerateInitializers.cmd +7 -0
  288. data/platform/wp7/RhoRubyExtGen/Properties/AssemblyInfo.cs +36 -0
  289. data/platform/wp7/RhoRubyExtGen/RhoAsyncHttp.cs +38 -0
  290. data/platform/wp7/RhoRubyExtGen/RhoDatabase.cs +93 -0
  291. data/platform/wp7/RhoRubyExtGen/RhoJSON.cs +37 -0
  292. data/platform/wp7/RhoRubyExtGen/RhoNativeBar.cs +106 -0
  293. data/platform/wp7/RhoRubyExtGen/RhoRubyExtGen.csproj +75 -0
  294. data/platform/wp7/RhoRubyExtGen/RhoSyncEngine.cs +123 -0
  295. data/platform/wp7/RhoRubyExtGen/RhoWebView.cs +42 -0
  296. data/platform/wp7/RhoRubyLib/Initializers.Generated.cs +309 -0
  297. data/platform/wp7/RhoRubyLib/Properties/AssemblyInfo.cs +36 -0
  298. data/platform/wp7/RhoRubyLib/RhoAppAdapter.cs +96 -0
  299. data/platform/wp7/RhoRubyLib/RhoRuby.cs +296 -0
  300. data/platform/wp7/RhoRubyLib/RhoRubyLib.csproj +155 -0
  301. data/platform/wp7/RhoRubyLib/WP_PlatformAdaptationLayer.cs +107 -0
  302. data/platform/wp7/RhoRubyLib/common/IInputStream.cs +21 -0
  303. data/platform/wp7/RhoRubyLib/common/Mutex.cs +30 -0
  304. data/platform/wp7/RhoRubyLib/common/RhoConf.cs +389 -0
  305. data/platform/wp7/RhoRubyLib/common/RhoEmptyProfiler.cs +27 -0
  306. data/platform/wp7/RhoRubyLib/common/RhoFile.cs +332 -0
  307. data/platform/wp7/RhoRubyLib/common/RhoFilePath.cs +89 -0
  308. data/platform/wp7/RhoRubyLib/common/RhoParamArray.cs +33 -0
  309. data/platform/wp7/RhoRubyLib/common/RhoParams.cs +66 -0
  310. data/platform/wp7/RhoRubyLib/common/RhoProfiler.cs +145 -0
  311. data/platform/wp7/RhoRubyLib/common/RhoResourceMap.cs +68 -0
  312. data/platform/wp7/RhoRubyLib/common/RhoStd.cs +205 -0
  313. data/platform/wp7/RhoRubyLib/common/RhoThread.cs +114 -0
  314. data/platform/wp7/RhoRubyLib/common/RhodesApp.cs +504 -0
  315. data/platform/wp7/RhoRubyLib/common/ThreadQueue.cs +199 -0
  316. data/platform/wp7/RhoRubyLib/common/TimeInterval.cs +56 -0
  317. data/platform/wp7/RhoRubyLib/common/Tokenizer.cs +52 -0
  318. data/platform/wp7/RhoRubyLib/db/DBAdapter.cs +1129 -0
  319. data/platform/wp7/RhoRubyLib/db/DBAttrManager.cs +92 -0
  320. data/platform/wp7/RhoRubyLib/db/DBException.cs +35 -0
  321. data/platform/wp7/RhoRubyLib/db/IDBCallback.cs +10 -0
  322. data/platform/wp7/RhoRubyLib/db/IDBResult.cs +33 -0
  323. data/platform/wp7/RhoRubyLib/db/IDBStorage.cs +32 -0
  324. data/platform/wp7/RhoRubyLib/db/SqliteCopyResult.cs +79 -0
  325. data/platform/wp7/RhoRubyLib/db/SqliteResult.cs +267 -0
  326. data/platform/wp7/RhoRubyLib/db/SqliteStorage.cs +319 -0
  327. data/platform/wp7/RhoRubyLib/json/JSONArrayIterator.cs +63 -0
  328. data/platform/wp7/RhoRubyLib/json/JSONEntry.cs +96 -0
  329. data/platform/wp7/RhoRubyLib/json/JSONStructIterator.cs +77 -0
  330. data/platform/wp7/RhoRubyLib/json/JsonParser.cs +483 -0
  331. data/platform/wp7/RhoRubyLib/json/RJSONTokener.cs +406 -0
  332. data/platform/wp7/RhoRubyLib/logging/IRhoLogSink.cs +12 -0
  333. data/platform/wp7/RhoRubyLib/logging/RhoLogConf.cs +161 -0
  334. data/platform/wp7/RhoRubyLib/logging/RhoLogFileSink.cs +174 -0
  335. data/platform/wp7/RhoRubyLib/logging/RhoLogger.cs +320 -0
  336. data/platform/wp7/RhoRubyLib/net/AsyncHttp.cs +362 -0
  337. data/platform/wp7/RhoRubyLib/net/HttpServer.cs +466 -0
  338. data/platform/wp7/RhoRubyLib/net/NetRequest.cs +717 -0
  339. data/platform/wp7/RhoRubyLib/net/NetResponse.cs +64 -0
  340. data/platform/wp7/RhoRubyLib/net/URI.cs +187 -0
  341. data/platform/wp7/RhoRubyLib/rubyext/RhoAsyncHttp.cs +43 -0
  342. data/platform/wp7/RhoRubyLib/rubyext/RhoDatabase.cs +177 -0
  343. data/platform/wp7/RhoRubyLib/rubyext/RhoJSON.cs +39 -0
  344. data/platform/wp7/RhoRubyLib/rubyext/RhoKernelOps.cs +19 -0
  345. data/platform/wp7/RhoRubyLib/rubyext/RhoNativeBar.cs +117 -0
  346. data/platform/wp7/RhoRubyLib/rubyext/RhoSyncEngine.cs +199 -0
  347. data/platform/wp7/RhoRubyLib/rubyext/RhoWebView.cs +49 -0
  348. data/platform/wp7/RhoRubyLib/sync/ClientRegister.cs +142 -0
  349. data/platform/wp7/RhoRubyLib/sync/ISyncProtocol.cs +23 -0
  350. data/platform/wp7/RhoRubyLib/sync/ISyncStatusListener.cs +10 -0
  351. data/platform/wp7/RhoRubyLib/sync/SyncEngine.cs +1051 -0
  352. data/platform/wp7/RhoRubyLib/sync/SyncNotify.cs +651 -0
  353. data/platform/wp7/RhoRubyLib/sync/SyncProtocol_3.cs +79 -0
  354. data/platform/wp7/RhoRubyLib/sync/SyncSource.cs +1105 -0
  355. data/platform/wp7/RhoRubyLib/sync/SyncThread.cs +301 -0
  356. data/platform/wp7/WPApplication.sln +50 -0
  357. data/platform/wp7/WPApplication/App.xaml +19 -0
  358. data/platform/wp7/WPApplication/App.xaml.cs +211 -0
  359. data/platform/wp7/WPApplication/ApplicationIcon.png +0 -0
  360. data/platform/wp7/WPApplication/Background.png +0 -0
  361. data/platform/wp7/WPApplication/MainPage.xaml +44 -0
  362. data/platform/wp7/WPApplication/MainPage.xaml.cs +132 -0
  363. data/platform/wp7/WPApplication/Properties/AppManifest.xml +6 -0
  364. data/platform/wp7/WPApplication/Properties/AssemblyInfo.cs +35 -0
  365. data/platform/wp7/WPApplication/Properties/WMAppManifest.xml +32 -0
  366. data/platform/wp7/WPApplication/SplashScreenImage.jpg +0 -0
  367. data/platform/wp7/WPApplication/WPApplication.csproj +201 -0
  368. data/platform/wp7/WPApplication/WP_PlatformAdaptationLayer.cs +88 -0
  369. data/platform/wp7/WPApplication/app_manifest.txt +1 -0
  370. data/platform/wp7/WPApplication/readme.htm +40 -0
  371. data/platform/wp7/WPApplication/readme2.htm +37 -0
  372. data/platform/wp7/WPApplication/rho/apps/app/Model1/edit.bb.erb +29 -0
  373. data/platform/wp7/WPApplication/rho/apps/app/Model1/edit.erb +32 -0
  374. data/platform/wp7/WPApplication/rho/apps/app/Model1/index.bb.erb +21 -0
  375. data/platform/wp7/WPApplication/rho/apps/app/Model1/index.erb +26 -0
  376. data/platform/wp7/WPApplication/rho/apps/app/Model1/model1.rb +10 -0
  377. data/platform/wp7/WPApplication/rho/apps/app/Model1/model1_controller.rb +58 -0
  378. data/platform/wp7/WPApplication/rho/apps/app/Model1/new.bb.erb +29 -0
  379. data/platform/wp7/WPApplication/rho/apps/app/Model1/new.erb +31 -0
  380. data/platform/wp7/WPApplication/rho/apps/app/Model1/show.bb.erb +26 -0
  381. data/platform/wp7/WPApplication/rho/apps/app/Model1/show.erb +28 -0
  382. data/platform/wp7/WPApplication/rho/apps/app/Settings/controller.rb +75 -0
  383. data/platform/wp7/WPApplication/rho/apps/app/Settings/home.bb.erb +17 -0
  384. data/platform/wp7/WPApplication/rho/apps/app/Settings/home.erb +20 -0
  385. data/platform/wp7/WPApplication/rho/apps/app/Settings/index.bb.erb +32 -0
  386. data/platform/wp7/WPApplication/rho/apps/app/Settings/index.erb +30 -0
  387. data/platform/wp7/WPApplication/rho/apps/app/Settings/login.bb.erb +35 -0
  388. data/platform/wp7/WPApplication/rho/apps/app/Settings/login.erb +27 -0
  389. data/platform/wp7/WPApplication/rho/apps/app/Settings/reset.bb.erb +15 -0
  390. data/platform/wp7/WPApplication/rho/apps/app/Settings/reset.erb +17 -0
  391. data/platform/wp7/WPApplication/rho/apps/app/Settings/wait.bb.erb +3 -0
  392. data/platform/wp7/WPApplication/rho/apps/app/Settings/wait.erb +5 -0
  393. data/platform/wp7/WPApplication/rho/apps/app/application.rb +16 -0
  394. data/platform/wp7/WPApplication/rho/apps/app/helpers/application_helper.rb +126 -0
  395. data/platform/wp7/WPApplication/rho/apps/app/helpers/browser_helper.rb +18 -0
  396. data/platform/wp7/WPApplication/rho/apps/app/index.bb.erb +26 -0
  397. data/platform/wp7/WPApplication/rho/apps/app/index.erb +26 -0
  398. data/platform/wp7/WPApplication/rho/apps/app/layout.erb +45 -0
  399. data/platform/wp7/WPApplication/rho/apps/app/loading.html +11 -0
  400. data/platform/wp7/WPApplication/rho/apps/app_manifest.txt +1 -0
  401. data/platform/wp7/WPApplication/rho/apps/public/css/android.css +330 -0
  402. data/platform/wp7/WPApplication/rho/apps/public/css/blackberry.css +115 -0
  403. data/platform/wp7/WPApplication/rho/apps/public/css/iphone.css +410 -0
  404. data/platform/wp7/WPApplication/rho/apps/public/css/windows_mobile.css +222 -0
  405. data/platform/wp7/WPApplication/rho/apps/public/images/IUI_LICENSE.txt +21 -0
  406. data/platform/wp7/WPApplication/rho/apps/public/images/android/btn_check_off.png +0 -0
  407. data/platform/wp7/WPApplication/rho/apps/public/images/android/btn_check_on.png +0 -0
  408. data/platform/wp7/WPApplication/rho/apps/public/images/android/btn_radio_off.png +0 -0
  409. data/platform/wp7/WPApplication/rho/apps/public/images/android/btn_radio_on.png +0 -0
  410. data/platform/wp7/WPApplication/rho/apps/public/images/android/disclosure.png +0 -0
  411. data/platform/wp7/WPApplication/rho/apps/public/images/android/ic_menu_more.png +0 -0
  412. data/platform/wp7/WPApplication/rho/apps/public/images/backButton.png +0 -0
  413. data/platform/wp7/WPApplication/rho/apps/public/images/blueButton.png +0 -0
  414. data/platform/wp7/WPApplication/rho/apps/public/images/cancel.png +0 -0
  415. data/platform/wp7/WPApplication/rho/apps/public/images/grayButton.png +0 -0
  416. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/disclosure.png +0 -0
  417. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/disclosure_detail.png +0 -0
  418. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/backButton.png +0 -0
  419. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/blueButton.png +0 -0
  420. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/cancel.png +0 -0
  421. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/chevron.png +0 -0
  422. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/grayButton.png +0 -0
  423. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/listArrowSel.png +0 -0
  424. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/listGroup.png +0 -0
  425. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/loading.gif +0 -0
  426. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/on_off.png +0 -0
  427. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/pinstripes.png +0 -0
  428. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/selection.png +0 -0
  429. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/thumb.png +0 -0
  430. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/toggle.png +0 -0
  431. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/toggleOn.png +0 -0
  432. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/toolButton.png +0 -0
  433. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/toolbar.png +0 -0
  434. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/whiteButton.png +0 -0
  435. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/radiobutton.png +0 -0
  436. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/select.png +0 -0
  437. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/switch.png +0 -0
  438. data/platform/wp7/WPApplication/rho/apps/public/images/iui-logo-touch-icon.png +0 -0
  439. data/platform/wp7/WPApplication/rho/apps/public/images/listArrow.png +0 -0
  440. data/platform/wp7/WPApplication/rho/apps/public/images/listArrowDown.png +0 -0
  441. data/platform/wp7/WPApplication/rho/apps/public/images/listArrowSel.png +0 -0
  442. data/platform/wp7/WPApplication/rho/apps/public/images/listGroup.png +0 -0
  443. data/platform/wp7/WPApplication/rho/apps/public/images/loading.gif +0 -0
  444. data/platform/wp7/WPApplication/rho/apps/public/images/pinstripes.png +0 -0
  445. data/platform/wp7/WPApplication/rho/apps/public/images/right_button.png +0 -0
  446. data/platform/wp7/WPApplication/rho/apps/public/images/selection.png +0 -0
  447. data/platform/wp7/WPApplication/rho/apps/public/images/thumb.png +0 -0
  448. data/platform/wp7/WPApplication/rho/apps/public/images/toggle.png +0 -0
  449. data/platform/wp7/WPApplication/rho/apps/public/images/toggleOn.png +0 -0
  450. data/platform/wp7/WPApplication/rho/apps/public/images/toolButton.png +0 -0
  451. data/platform/wp7/WPApplication/rho/apps/public/images/toolButton_new.png +0 -0
  452. data/platform/wp7/WPApplication/rho/apps/public/images/toolbar.png +0 -0
  453. data/platform/wp7/WPApplication/rho/apps/public/images/whiteButton.png +0 -0
  454. data/platform/wp7/WPApplication/rho/apps/public/jqtouch/jqtouch-iphone.css +9 -0
  455. data/platform/wp7/WPApplication/rho/apps/public/jqtouch/jqtouch.css +374 -0
  456. data/platform/wp7/WPApplication/rho/apps/public/jqtouch/jqtouch.js +742 -0
  457. data/platform/wp7/WPApplication/rho/apps/public/jqtouch/jqtouch.transitions.js +60 -0
  458. data/platform/wp7/WPApplication/rho/apps/public/jqtouch/jquery.1.3.2.min.js +19 -0
  459. data/platform/wp7/WPApplication/rho/apps/public/js/application.js +1 -0
  460. data/platform/wp7/WPApplication/rho/apps/public/js/rho.js +4 -0
  461. data/platform/wp7/WPApplication/rho/apps/public/js/rhogeolocation-wm.js +59 -0
  462. data/platform/wp7/WPApplication/rho/apps/public/js/rhogeolocation.js +11 -0
  463. data/platform/wp7/WPApplication/rho/apps/rhoconfig.txt +32 -0
  464. data/platform/wp7/WPApplication/rhoconfig.txt +32 -0
  465. data/platform/wp7/WPApplication/windows_mobile.css +222 -0
  466. data/platform/wp7/build/wp.rake +261 -0
  467. data/platform/wp7/rhodes.sln +79 -0
  468. data/platform/wp7/rhodes/App.xaml +19 -0
  469. data/platform/wp7/rhodes/App.xaml.cs +144 -0
  470. data/platform/wp7/rhodes/Background.png +0 -0
  471. data/platform/wp7/rhodes/MainPage.xaml +44 -0
  472. data/platform/wp7/rhodes/MainPage.xaml.cs +98 -0
  473. data/platform/wp7/rhodes/Properties/AppManifest.xml +6 -0
  474. data/platform/wp7/rhodes/Properties/AssemblyInfo.cs +35 -0
  475. data/platform/wp7/rhodes/Properties/WMAppManifest.xml +31 -0
  476. data/platform/wp7/rhodes/Rhodes.csproj +127 -0
  477. data/platform/wp7/rhodes/SplashScreenImage.jpg +0 -0
  478. data/platform/wp7/rhodes/icon.png +0 -0
  479. data/platform/wp7/sqlite3/Properties/AssemblyInfo.cs +35 -0
  480. data/platform/wp7/sqlite3/SQLiteClient.cs +550 -0
  481. data/platform/wp7/sqlite3/SqliteWrapper/BtreeInt_h.cs +774 -0
  482. data/platform/wp7/sqlite3/SqliteWrapper/Btree_h.cs +280 -0
  483. data/platform/wp7/sqlite3/SqliteWrapper/ClassDiagram1.cd +1306 -0
  484. data/platform/wp7/sqlite3/SqliteWrapper/Delagates.cs +365 -0
  485. data/platform/wp7/sqlite3/SqliteWrapper/Hash_h.cs +133 -0
  486. data/platform/wp7/sqlite3/SqliteWrapper/VdbeInt_h.cs +620 -0
  487. data/platform/wp7/sqlite3/SqliteWrapper/Vdbe_h.cs +302 -0
  488. data/platform/wp7/sqlite3/SqliteWrapper/_Custom.cs +449 -0
  489. data/platform/wp7/sqlite3/SqliteWrapper/alter_c.cs +872 -0
  490. data/platform/wp7/sqlite3/SqliteWrapper/analyze_c.cs +757 -0
  491. data/platform/wp7/sqlite3/SqliteWrapper/attach_c.cs +628 -0
  492. data/platform/wp7/sqlite3/SqliteWrapper/auth_c.cs +268 -0
  493. data/platform/wp7/sqlite3/SqliteWrapper/backup_c.cs +737 -0
  494. data/platform/wp7/sqlite3/SqliteWrapper/bitvec_c.cs +509 -0
  495. data/platform/wp7/sqlite3/SqliteWrapper/btmutex_c.cs +379 -0
  496. data/platform/wp7/sqlite3/SqliteWrapper/btree_c.cs +9138 -0
  497. data/platform/wp7/sqlite3/SqliteWrapper/build_c.cs +4189 -0
  498. data/platform/wp7/sqlite3/SqliteWrapper/callback_c.cs +548 -0
  499. data/platform/wp7/sqlite3/SqliteWrapper/complete_c.cs +342 -0
  500. data/platform/wp7/sqlite3/SqliteWrapper/ctime_cs.cs +408 -0
  501. data/platform/wp7/sqlite3/SqliteWrapper/date_c.cs +1317 -0
  502. data/platform/wp7/sqlite3/SqliteWrapper/delete_c.cs +726 -0
  503. data/platform/wp7/sqlite3/SqliteWrapper/expr_c.cs +4406 -0
  504. data/platform/wp7/sqlite3/SqliteWrapper/fault_c.cs +115 -0
  505. data/platform/wp7/sqlite3/SqliteWrapper/fkey_c.cs +1330 -0
  506. data/platform/wp7/sqlite3/SqliteWrapper/func_c.cs +2025 -0
  507. data/platform/wp7/sqlite3/SqliteWrapper/global_c.cs +228 -0
  508. data/platform/wp7/sqlite3/SqliteWrapper/hash_c.cs +351 -0
  509. data/platform/wp7/sqlite3/SqliteWrapper/hwtime_c.cs +101 -0
  510. data/platform/wp7/sqlite3/SqliteWrapper/insert_c.cs +2122 -0
  511. data/platform/wp7/sqlite3/SqliteWrapper/journal_c.cs +247 -0
  512. data/platform/wp7/sqlite3/SqliteWrapper/keywordhash_h.cs +302 -0
  513. data/platform/wp7/sqlite3/SqliteWrapper/legacy_c.cs +223 -0
  514. data/platform/wp7/sqlite3/SqliteWrapper/loadext_c.cs +683 -0
  515. data/platform/wp7/sqlite3/SqliteWrapper/main_c.cs +2716 -0
  516. data/platform/wp7/sqlite3/SqliteWrapper/malloc_c.cs +977 -0
  517. data/platform/wp7/sqlite3/SqliteWrapper/mem_Pool.cs +394 -0
  518. data/platform/wp7/sqlite3/SqliteWrapper/memjournal_c.cs +315 -0
  519. data/platform/wp7/sqlite3/SqliteWrapper/mutex_c.cs +182 -0
  520. data/platform/wp7/sqlite3/SqliteWrapper/mutex_h.cs +91 -0
  521. data/platform/wp7/sqlite3/SqliteWrapper/mutex_noop_c.cs +202 -0
  522. data/platform/wp7/sqlite3/SqliteWrapper/mutex_w32.cs +344 -0
  523. data/platform/wp7/sqlite3/SqliteWrapper/notify_c.cs +347 -0
  524. data/platform/wp7/sqlite3/SqliteWrapper/opcodes_c.cs +171 -0
  525. data/platform/wp7/sqlite3/SqliteWrapper/opcodes_h.cs +346 -0
  526. data/platform/wp7/sqlite3/SqliteWrapper/os_c.cs +367 -0
  527. data/platform/wp7/sqlite3/SqliteWrapper/os_common_h.cs +174 -0
  528. data/platform/wp7/sqlite3/SqliteWrapper/os_h.cs +295 -0
  529. data/platform/wp7/sqlite3/SqliteWrapper/os_win_c.cs +1255 -0
  530. data/platform/wp7/sqlite3/SqliteWrapper/pager_c.cs +6078 -0
  531. data/platform/wp7/sqlite3/SqliteWrapper/pager_h.cs +188 -0
  532. data/platform/wp7/sqlite3/SqliteWrapper/parse_c.cs +4045 -0
  533. data/platform/wp7/sqlite3/SqliteWrapper/parse_h.cs +331 -0
  534. data/platform/wp7/sqlite3/SqliteWrapper/pcache1_c.cs +969 -0
  535. data/platform/wp7/sqlite3/SqliteWrapper/pcache_c.cs +712 -0
  536. data/platform/wp7/sqlite3/SqliteWrapper/pcache_h.cs +213 -0
  537. data/platform/wp7/sqlite3/SqliteWrapper/pragma_c.cs +1767 -0
  538. data/platform/wp7/sqlite3/SqliteWrapper/prepare_c.cs +1015 -0
  539. data/platform/wp7/sqlite3/SqliteWrapper/printf_c.cs +1300 -0
  540. data/platform/wp7/sqlite3/SqliteWrapper/random_c.cs +201 -0
  541. data/platform/wp7/sqlite3/SqliteWrapper/resolve_c.cs +1396 -0
  542. data/platform/wp7/sqlite3/SqliteWrapper/rowset_c.cs +519 -0
  543. data/platform/wp7/sqlite3/SqliteWrapper/select_c.cs +4878 -0
  544. data/platform/wp7/sqlite3/SqliteWrapper/sqlite3_h.cs +6253 -0
  545. data/platform/wp7/sqlite3/SqliteWrapper/sqlite3ext_h.cs +397 -0
  546. data/platform/wp7/sqlite3/SqliteWrapper/sqliteInt_h.cs +4075 -0
  547. data/platform/wp7/sqlite3/SqliteWrapper/sqliteLimit_h.cs +214 -0
  548. data/platform/wp7/sqlite3/SqliteWrapper/sqliteicu_h.cs +39 -0
  549. data/platform/wp7/sqlite3/SqliteWrapper/status_c.cs +155 -0
  550. data/platform/wp7/sqlite3/SqliteWrapper/table_c.cs +222 -0
  551. data/platform/wp7/sqlite3/SqliteWrapper/tokenize_c.cs +673 -0
  552. data/platform/wp7/sqlite3/SqliteWrapper/trigger_c.cs +1219 -0
  553. data/platform/wp7/sqlite3/SqliteWrapper/update_c.cs +766 -0
  554. data/platform/wp7/sqlite3/SqliteWrapper/utf_c.cs +612 -0
  555. data/platform/wp7/sqlite3/SqliteWrapper/util_c.cs +1476 -0
  556. data/platform/wp7/sqlite3/SqliteWrapper/vacuum_c.cs +382 -0
  557. data/platform/wp7/sqlite3/SqliteWrapper/vdbe_c.cs +6566 -0
  558. data/platform/wp7/sqlite3/SqliteWrapper/vdbeapi_c.cs +1557 -0
  559. data/platform/wp7/sqlite3/SqliteWrapper/vdbeaux_c.cs +4019 -0
  560. data/platform/wp7/sqlite3/SqliteWrapper/vdbeblob_c.cs +396 -0
  561. data/platform/wp7/sqlite3/SqliteWrapper/vdbemem_c.cs +1480 -0
  562. data/platform/wp7/sqlite3/SqliteWrapper/vdbetrace_c.cs +181 -0
  563. data/platform/wp7/sqlite3/SqliteWrapper/vtab_c.cs +957 -0
  564. data/platform/wp7/sqlite3/SqliteWrapper/walker_c.cs +174 -0
  565. data/platform/wp7/sqlite3/SqliteWrapper/where_c.cs +4651 -0
  566. data/platform/wp7/sqlite3/sqlite3.csproj +155 -0
  567. data/rakefile.rb +60 -2
  568. data/res/build-tools/7za.exe +0 -0
  569. data/res/build-tools/RhoAppRunner.exe +0 -0
  570. data/res/build-tools/xruby-0.3.3.jar +0 -0
  571. data/res/generators/rhogen.rb +9 -1
  572. data/res/generators/templates/application/app/Settings/reset.erb +1 -1
  573. data/res/generators/templates/application/app/layout.erb +17 -10
  574. data/res/generators/templates/application/build.yml +5 -3
  575. data/res/generators/templates/application/public/jqtouch/changes.txt +20 -0
  576. data/res/generators/templates/application/public/jqtouch/jqtouch.js +12 -4
  577. data/res/generators/templates/application/public/jqtouch/jquery.1.3.2.min.js +1 -1
  578. data/res/generators/templates/application/public/js/wp7.js +7 -0
  579. data/res/generators/templates/model/controller.rb +5 -6
  580. data/rhobuild.yml.example +1 -0
  581. data/rhodes.gemspec +2 -1
  582. data/spec/framework_spec/app/spec/core/dir/close_spec.rb +1 -1
  583. data/spec/framework_spec/app/spec/core/dir/shared/pwd.rb +13 -11
  584. data/spec/framework_spec/app/spec/core/env/shared/store.rb +12 -10
  585. data/spec/framework_spec/app/spec/core/env/update_spec.rb +1 -0
  586. data/spec/framework_spec/app/spec/core/file/expand_path_spec.rb +3 -2
  587. data/spec/framework_spec/app/spec/core/file/fixtures/file_types.rb +7 -1
  588. data/spec/framework_spec/app/spec/core/file/flock_spec.rb +8 -1
  589. data/spec/framework_spec/app/spec/core/file/ftype_spec.rb +5 -3
  590. data/spec/framework_spec/app/spec/core/file/lchmod_spec.rb +1 -1
  591. data/spec/framework_spec/app/spec/core/file/setgid_spec.rb +1 -1
  592. data/spec/framework_spec/app/spec/core/file/setuid_spec.rb +1 -1
  593. data/spec/framework_spec/app/spec/core/file/stat/ftype_spec.rb +6 -4
  594. data/spec/framework_spec/app/spec/core/file/truncate_spec.rb +5 -1
  595. data/spec/framework_spec/app/spec/core/float/to_s_spec.rb +1 -1
  596. data/spec/framework_spec/app/spec/core/process/gid_spec.rb +5 -3
  597. data/spec/framework_spec/app/spec/core/process/groups_spec.rb +11 -9
  598. data/spec/framework_spec/app/spec/core/process/uid_spec.rb +5 -3
  599. data/spec/framework_spec/app/spec/language/execution_spec.rb +10 -6
  600. data/spec/framework_spec/app/spec/shared/file/directory.rb +6 -1
  601. data/spec/framework_spec/app/spec/shared/file/executable.rb +7 -1
  602. data/spec/framework_spec/app/spec/shared/file/file.rb +6 -1
  603. data/spec/framework_spec/app/spec/shared/file/readable.rb +13 -4
  604. data/spec/framework_spec/app/spec/shared/file/writable.rb +6 -1
  605. data/spec/phone_spec/app/spec/rho_controller_spec.rb +11 -0
  606. data/spec/phone_spec/app/spec/rho_spec.rb +11 -0
  607. data/spec/phone_spec/app/spec/rhom_object_spec.rb +102 -6
  608. data/spec/phone_spec/app/spec/string/end_with_spec.rb +4 -1
  609. data/spec/phone_spec/app/spec/string/slice_spec.rb +5 -1
  610. data/spec/phone_spec/app/spec/string/start_with_spec.rb +4 -0
  611. data/spec/phone_spec/app/spec/syncengine_spec.rb +73 -6
  612. data/spec/phone_spec/app/spec_runner.rb +7 -3
  613. metadata +380 -41
  614. data/Manifest.txt +0 -5819
  615. data/platform/bb/Hsqldb/Hsqldb.cso +0 -5
  616. data/platform/bb/Hsqldb/Hsqldb.jdp +0 -197
  617. data/platform/bb/RhoBundle/RhoBundle.cso +0 -5
  618. data/platform/bb/RhoBundle/RhoBundle.jdp +0 -42
  619. data/platform/bb/RubyVM/RubyVM.cso +0 -5
  620. data/platform/bb/RubyVM/RubyVM.jdp +0 -467
  621. data/platform/bb/rhodes/rhodes.csl +0 -3
  622. data/platform/bb/rhodes/rhodes.cso +0 -5
  623. data/platform/bb/rhodes/rhodes.jdp +0 -104
@@ -0,0 +1,188 @@
1
+ using Pgno = System.UInt32;
2
+
3
+ namespace Community.CsharpSqlite
4
+ {
5
+ public partial class Sqlite3
6
+ {
7
+ /*
8
+ ** 2001 September 15
9
+ **
10
+ ** The author disclaims copyright to this source code. In place of
11
+ ** a legal notice, here is a blessing:
12
+ **
13
+ ** May you do good and not evil.
14
+ ** May you find forgiveness for yourself and forgive others.
15
+ ** May you share freely, never taking more than you give.
16
+ **
17
+ *************************************************************************
18
+ ** This header file defines the interface that the sqlite page cache
19
+ ** subsystem. The page cache subsystem reads and writes a file a page
20
+ ** at a time and provides a journal for rollback.
21
+ *************************************************************************
22
+ ** Included in SQLite3 port to C#-SQLite; 2008 Noah B Hart
23
+ ** C#-SQLite is an independent reimplementation of the SQLite software library
24
+ **
25
+ ** SQLITE_SOURCE_ID: 2009-12-07 16:39:13 1ed88e9d01e9eda5cbc622e7614277f29bcc551c
26
+ **
27
+ ** $Header$
28
+ *************************************************************************
29
+ */
30
+ //#if !_PAGER_H_
31
+ //#define _PAGER_H_
32
+
33
+ /*
34
+ ** Default maximum size for persistent journal files. A negative
35
+ ** value means no limit. This value may be overridden using the
36
+ ** sqlite3PagerJournalSizeLimit() API. See also "PRAGMA journal_size_limit".
37
+ */
38
+ #if !SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT
39
+ const int SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1;//#define SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT -1
40
+ #endif
41
+
42
+ /*
43
+ ** The type used to represent a page number. The first page in a file
44
+ ** is called page 1. 0 is used to represent "not a page".
45
+ */
46
+ //typedef u32 Pgno;
47
+
48
+ /*
49
+ ** Each open file is managed by a separate instance of the "Pager" structure.
50
+ */
51
+ //typedef struct Pager Pager;
52
+
53
+ /*
54
+ ** Handle type for pages.
55
+ */
56
+ //typedef struct PgHdr DbPage;
57
+
58
+ /*
59
+ ** Page number PAGER_MJ_PGNO is never used in an SQLite database (it is
60
+ ** reserved for working around a windows/posix incompatibility). It is
61
+ ** used in the journal to signify that the remainder of the journal file
62
+ ** is devoted to storing a master journal name - there are no more pages to
63
+ ** roll back. See comments for function writeMasterJournal() in pager.c
64
+ ** for details.
65
+ */
66
+ //#define PAGER_MJ_PGNO(x) ((Pgno)((PENDING_BYTE/((x)->pageSize))+1))
67
+ static Pgno PAGER_MJ_PGNO( Pager x ) { return ( (Pgno)( ( PENDING_BYTE / ( ( x ).pageSize ) ) + 1 ) ); }
68
+ /*
69
+ ** Allowed values for the flags parameter to sqlite3PagerOpen().
70
+ **
71
+ ** NOTE: These values must match the corresponding BTREE_ values in btree.h.
72
+ */
73
+ //#define PAGER_OMIT_JOURNAL 0x0001 /* Do not use a rollback journal */
74
+ //#define PAGER_NO_READLOCK 0x0002 /* Omit readlocks on readonly files */
75
+ const int PAGER_OMIT_JOURNAL = 0x0001; /* Do not use a rollback journal */
76
+ const int PAGER_NO_READLOCK = 0x0002; /* Omit readlocks on readonly files */
77
+
78
+ /*
79
+ ** Valid values for the second argument to sqlite3PagerLockingMode().
80
+ */
81
+ //#define PAGER_LOCKINGMODE_QUERY -1
82
+ //#define PAGER_LOCKINGMODE_NORMAL 0
83
+ //#define PAGER_LOCKINGMODE_EXCLUSIVE 1
84
+ static int PAGER_LOCKINGMODE_QUERY = -1;
85
+ static int PAGER_LOCKINGMODE_NORMAL = 0;
86
+ static int PAGER_LOCKINGMODE_EXCLUSIVE = 1;
87
+
88
+ /*
89
+ ** Valid values for the second argument to sqlite3PagerJournalMode().
90
+ */
91
+ //#define PAGER_JOURNALMODE_QUERY -1
92
+ //#define PAGER_JOURNALMODE_DELETE 0 /* Commit by deleting journal file */
93
+ //#define PAGER_JOURNALMODE_PERSIST 1 /* Commit by zeroing journal header */
94
+ //#define PAGER_JOURNALMODE_OFF 2 /* Journal omitted. */
95
+ //#define PAGER_JOURNALMODE_TRUNCATE 3 /* Commit by truncating journal */
96
+ //#define PAGER_JOURNALMODE_MEMORY 4 /* In-memory journal file */
97
+ const int PAGER_JOURNALMODE_QUERY = -1;
98
+ const int PAGER_JOURNALMODE_DELETE = 0; /* Commit by deleting journal file */
99
+ const int PAGER_JOURNALMODE_PERSIST = 1; /* Commit by zeroing journal header */
100
+ const int PAGER_JOURNALMODE_OFF = 2; /* Journal omitted. */
101
+ const int PAGER_JOURNALMODE_TRUNCATE = 3;/* Commit by truncating journal */
102
+ const int PAGER_JOURNALMODE_MEMORY = 4;/* In-memory journal file */
103
+
104
+ /*
105
+ ** The remainder of this file contains the declarations of the functions
106
+ ** that make up the Pager sub-system API. See source code comments for
107
+ ** a detailed description of each routine.
108
+ */
109
+ /* Open and close a Pager connection. */
110
+ //int sqlite3PagerOpen(
111
+ // sqlite3_vfs*,
112
+ // Pager **ppPager,
113
+ // const char*,
114
+ // int,
115
+ // int,
116
+ // int,
117
+ //// void(*)(DbPage*)
118
+ //);
119
+ //int sqlite3PagerClose(Pager *pPager);
120
+ //int sqlite3PagerReadFileheader(Pager*, int, unsigned char*);
121
+
122
+ /* Functions used to configure a Pager object. */
123
+ //void sqlite3PagerSetBusyhandler(Pager*, int(*)(void *), void *);
124
+ //int sqlite3PagerSetPagesize(Pager*, u16*, int);
125
+ //int sqlite3PagerMaxPageCount(Pager*, int);
126
+ //void sqlite3PagerSetCachesize(Pager*, int);
127
+ //void sqlite3PagerSetSafetyLevel(Pager*,int,int);
128
+ //int sqlite3PagerLockingMode(Pager *, int);
129
+ //int sqlite3PagerJournalMode(Pager *, int);
130
+ //i64 sqlite3PagerJournalSizeLimit(Pager *, i64);
131
+ //sqlite3_backup **sqlite3PagerBackupPtr(Pager*);
132
+
133
+ /* Functions used to obtain and release page references. */
134
+ //int sqlite3PagerAcquire(Pager *pPager, Pgno pgno, DbPage **ppPage, int clrFlag);
135
+ //#define sqlite3PagerGet(A,B,C) sqlite3PagerAcquire(A,B,C,0)
136
+ //DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno);
137
+ //void sqlite3PagerRef(DbPage*);
138
+ //void sqlite3PagerUnref(DbPage*);
139
+
140
+ /* Operations on page references. */
141
+ //int sqlite3PagerWrite(DbPage*);
142
+ //void sqlite3PagerDontWrite(DbPage*);
143
+ //int sqlite3PagerMovepage(Pager*,DbPage*,Pgno,int);
144
+ //int sqlite3PagerPageRefcount(DbPage*);
145
+ //void *sqlite3PagerGetData(DbPage *);
146
+ //void *sqlite3PagerGetExtra(DbPage *);
147
+
148
+ /* Functions used to manage pager transactions and savepoints. */
149
+ //int sqlite3PagerPagecount(Pager*, int*);
150
+ //int sqlite3PagerBegin(Pager*, int exFlag, int);
151
+ //int sqlite3PagerCommitPhaseOne(Pager*,const char *zMaster, int);
152
+ //int sqlite3PagerSync(Pager *pPager);
153
+ //int sqlite3PagerCommitPhaseTwo(Pager*);
154
+ //int sqlite3PagerRollback(Pager*);
155
+ //int sqlite3PagerOpenSavepoint(Pager *pPager, int n);
156
+ //int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint);
157
+ //int sqlite3PagerSharedLock(Pager *pPager);
158
+
159
+ /* Functions used to query pager state and configuration. */
160
+ //u8 sqlite3PagerIsreadonly(Pager*);
161
+ //int sqlite3PagerRefcount(Pager*);
162
+ //const char *sqlite3PagerFilename(Pager*);
163
+ //const sqlite3_vfs *sqlite3PagerVfs(Pager*);
164
+ //sqlite3_file *sqlite3PagerFile(Pager*);
165
+ //const char *sqlite3PagerJournalname(Pager*);
166
+ //int sqlite3PagerNosync(Pager*);
167
+ //void *sqlite3PagerTempSpace(Pager*);
168
+ //int sqlite3PagerIsMemdb(Pager*);
169
+
170
+ /* Functions used to truncate the database file. */
171
+ //void sqlite3PagerTruncateImage(Pager*,Pgno);
172
+
173
+ /* Functions to support testing and debugging. */
174
+ //#if !NDEBUG || SQLITE_TEST
175
+ // Pgno sqlite3PagerPagenumber(DbPage*);
176
+ // int sqlite3PagerIswriteable(DbPage*);
177
+ //#endif
178
+ //#if SQLITE_TEST
179
+ // int *sqlite3PagerStats(Pager*);
180
+ // void sqlite3PagerRefdump(Pager*);
181
+ // void disable_simulated_io_errors(void);
182
+ // void enable_simulated_io_errors(void);
183
+ //#else
184
+ //# define disable_simulated_io_errors()
185
+ //# define enable_simulated_io_errors()
186
+ //#endif
187
+ }
188
+ }
@@ -0,0 +1,4045 @@
1
+ using System;
2
+ using System.Diagnostics;
3
+ using System.IO;
4
+ using System.Text;
5
+
6
+ using u8 = System.Byte;
7
+
8
+
9
+ using YYCODETYPE = System.Int32;
10
+ using YYACTIONTYPE = System.Int32;
11
+
12
+ namespace Community.CsharpSqlite
13
+ {
14
+ using sqlite3ParserTOKENTYPE = Sqlite3.Token;
15
+
16
+ public partial class Sqlite3
17
+ {
18
+ /*
19
+ *************************************************************************
20
+ ** Included in SQLite3 port to C#-SQLite; 2008 Noah B Hart
21
+ ** C#-SQLite is an independent reimplementation of the SQLite software library
22
+ **
23
+ ** SQLITE_SOURCE_ID: 2010-03-09 19:31:43 4ae453ea7be69018d8c16eb8dabe05617397dc4d
24
+ **
25
+ ** $Header$
26
+ *************************************************************************
27
+ */
28
+
29
+ /* Driver template for the LEMON parser generator.
30
+ ** The author disclaims copyright to this source code.
31
+ **
32
+ ** This version of "lempar.c" is modified, slightly, for use by SQLite.
33
+ ** The only modifications are the addition of a couple of NEVER()
34
+ ** macros to disable tests that are needed in the case of a general
35
+ ** LALR(1) grammar but which are always false in the
36
+ ** specific grammar used by SQLite.
37
+ */
38
+ /* First off, code is included that follows the "include" declaration
39
+ ** in the input grammar file. */
40
+ //#include <stdio.h>
41
+ //#line 51 "parse.y"
42
+
43
+ //#include "sqliteInt.h"
44
+ /*
45
+ ** Disable all error recovery processing in the parser push-down
46
+ ** automaton.
47
+ */
48
+ //#define YYNOERRORRECOVERY 1
49
+ const int YYNOERRORRECOVERY = 1;
50
+
51
+ /*
52
+ ** Make yytestcase() the same as testcase()
53
+ */
54
+ //#define yytestcase(X) testcase(X)
55
+ static void yytestcase<T>( T X ) { testcase( X ); }
56
+
57
+ /*
58
+ ** An instance of this structure holds information about the
59
+ ** LIMIT clause of a SELECT statement.
60
+ */
61
+ public struct LimitVal
62
+ {
63
+ public Expr pLimit; /* The LIMIT expression. NULL if there is no limit */
64
+ public Expr pOffset; /* The OFFSET expression. NULL if there is none */
65
+ };
66
+
67
+ /*
68
+ ** An instance of this structure is used to store the LIKE,
69
+ ** GLOB, NOT LIKE, and NOT GLOB operators.
70
+ */
71
+ public struct LikeOp
72
+ {
73
+ public Token eOperator; /* "like" or "glob" or "regexp" */
74
+ public bool not; /* True if the NOT keyword is present */
75
+ };
76
+
77
+ /*
78
+ ** An instance of the following structure describes the event of a
79
+ ** TRIGGER. "a" is the event type, one of TK_UPDATE, TK_INSERT,
80
+ ** TK_DELETE, or TK_INSTEAD. If the event is of the form
81
+ **
82
+ ** UPDATE ON (a,b,c)
83
+ **
84
+ ** Then the "b" IdList records the list "a,b,c".
85
+ */
86
+ public struct TrigEvent { public int a; public IdList b; };
87
+ /*
88
+ ** An instance of this structure holds the ATTACH key and the key type.
89
+ */
90
+ public struct AttachKey { public int type; public Token key; };
91
+
92
+ //#line 722 "parse.y"
93
+
94
+ /* This is a utility routine used to set the ExprSpan.zStart and
95
+ ** ExprSpan.zEnd values of pOut so that the span covers the complete
96
+ ** range of text beginning with pStart and going to the end of pEnd.
97
+ */
98
+ static void spanSet( ExprSpan pOut, Token pStart, Token pEnd )
99
+ {
100
+ pOut.zStart = pStart.z;
101
+ pOut.zEnd = pEnd.z.Substring( pEnd.n );
102
+ }
103
+
104
+ /* Construct a new Expr object from a single identifier. Use the
105
+ ** new Expr to populate pOut. Set the span of pOut to be the identifier
106
+ ** that created the expression.
107
+ */
108
+ static void spanExpr( ExprSpan pOut, Parse pParse, int op, Token pValue )
109
+ {
110
+ pOut.pExpr = sqlite3PExpr( pParse, op, 0, 0, pValue );
111
+ pOut.zStart = pValue.z;
112
+ pOut.zEnd = pValue.z.Substring( pValue.n );
113
+ }
114
+ //#line 817 "parse.y"
115
+
116
+ /* This routine constructs a binary expression node out of two ExprSpan
117
+ ** objects and uses the result to populate a new ExprSpan object.
118
+ */
119
+ static void spanBinaryExpr(
120
+ ExprSpan pOut, /* Write the result here */
121
+ Parse pParse, /* The parsing context. Errors accumulate here */
122
+ int op, /* The binary operation */
123
+ ExprSpan pLeft, /* The left operand */
124
+ ExprSpan pRight /* The right operand */
125
+ )
126
+ {
127
+ pOut.pExpr = sqlite3PExpr( pParse, op, pLeft.pExpr, pRight.pExpr, 0 );
128
+ pOut.zStart = pLeft.zStart;
129
+ pOut.zEnd = pRight.zEnd;
130
+ }
131
+ //#line 869 "parse.y"
132
+
133
+ /* Construct an expression node for a unary postfix operator
134
+ */
135
+ static void spanUnaryPostfix(
136
+ ExprSpan pOut, /* Write the new expression node here */
137
+ Parse pParse, /* Parsing context to record errors */
138
+ int op, /* The operator */
139
+ ExprSpan pOperand, /* The operand */
140
+ Token pPostOp /* The operand token for setting the span */
141
+ )
142
+ {
143
+ pOut.pExpr = sqlite3PExpr( pParse, op, pOperand.pExpr, 0, 0 );
144
+ pOut.zStart = pOperand.zStart;
145
+ pOut.zEnd = pPostOp.z.Substring( pPostOp.n );
146
+ }
147
+ //#line 888 "parse.y"
148
+
149
+ /* A routine to convert a binary TK_IS or TK_ISNOT expression into a
150
+ ** unary TK_ISNULL or TK_NOTNULL expression. */
151
+ static void binaryToUnaryIfNull( Parse pParse, Expr pY, Expr pA, int op )
152
+ {
153
+ sqlite3 db = pParse.db;
154
+ if ( /*db.mallocFailed == 0 && */pY.op == TK_NULL )
155
+ {
156
+ pA.op = (u8)op;
157
+ sqlite3ExprDelete( db, ref pA.pRight );
158
+ pA.pRight = null;
159
+ }
160
+ }
161
+ //#line 916 "parse.y"
162
+
163
+ /* Construct an expression node for a unary prefix operator
164
+ */
165
+ static void spanUnaryPrefix(
166
+ ExprSpan pOut, /* Write the new expression node here */
167
+ Parse pParse, /* Parsing context to record errors */
168
+ int op, /* The operator */
169
+ ExprSpan pOperand, /* The operand */
170
+ Token pPreOp /* The operand token for setting the span */
171
+ )
172
+ {
173
+ pOut.pExpr = sqlite3PExpr( pParse, op, pOperand.pExpr, 0, 0 );
174
+ pOut.zStart = pPreOp.z;
175
+ pOut.zEnd = pOperand.zEnd;
176
+ }
177
+ //#line 141 "parse.c"
178
+ /* Next is all token values, in a form suitable for use by makeheaders.
179
+ ** This section will be null unless lemon is run with the -m switch.
180
+ */
181
+ /*
182
+ ** These constants (all generated automatically by the parser generator)
183
+ ** specify the various kinds of tokens (terminals) that the parser
184
+ ** understands.
185
+ **
186
+ ** Each symbol here is a terminal symbol in the grammar.
187
+ */
188
+ /* Make sure the INTERFACE macro is defined.
189
+ */
190
+ #if !INTERFACE
191
+ //# define INTERFACE 1
192
+ #endif
193
+ /* The next thing included is series of defines which control
194
+ ** various aspects of the generated parser.
195
+ ** YYCODETYPE is the data type used for storing terminal
196
+ ** and nonterminal numbers. "unsigned char" is
197
+ ** used if there are fewer than 250 terminals
198
+ ** and nonterminals. "int" is used otherwise.
199
+ ** YYNOCODE is a number of type YYCODETYPE which corresponds
200
+ ** to no legal terminal or nonterminal number. This
201
+ ** number is used to fill in empty slots of the hash
202
+ ** table.
203
+ ** YYFALLBACK If defined, this indicates that one or more tokens
204
+ ** have fall-back values which should be used if the
205
+ ** original value of the token will not parse.
206
+ ** YYACTIONTYPE is the data type used for storing terminal
207
+ ** and nonterminal numbers. "unsigned char" is
208
+ ** used if there are fewer than 250 rules and
209
+ ** states combined. "int" is used otherwise.
210
+ ** sqlite3ParserTOKENTYPE is the data type used for minor tokens given
211
+ ** directly to the parser from the tokenizer.
212
+ ** YYMINORTYPE is the data type used for all minor tokens.
213
+ ** This is typically a union of many types, one of
214
+ ** which is sqlite3ParserTOKENTYPE. The entry in the union
215
+ ** for base tokens is called "yy0".
216
+ ** YYSTACKDEPTH is the maximum depth of the parser's stack. If
217
+ ** zero the stack is dynamically sized using realloc()
218
+ ** sqlite3ParserARG_SDECL A static variable declaration for the %extra_argument
219
+ ** sqlite3ParserARG_PDECL A parameter declaration for the %extra_argument
220
+ ** sqlite3ParserARG_STORE Code to store %extra_argument into yypParser
221
+ ** sqlite3ParserARG_FETCH Code to extract %extra_argument from yypParser
222
+ ** YYNSTATE the combined number of states.
223
+ ** YYNRULE the number of rules in the grammar
224
+ ** YYERRORSYMBOL is the code number of the error symbol. If not
225
+ ** defined, then do no error processing.
226
+ */
227
+ //#define YYCODETYPE unsigned short char
228
+ const int YYNOCODE = 254;
229
+ //#define YYACTIONTYPE unsigned short int
230
+ const int YYWILDCARD = 67;
231
+ //#define sqlite3ParserTOKENTYPE Token
232
+ public class YYMINORTYPE
233
+ {
234
+ public int yyinit;
235
+ public sqlite3ParserTOKENTYPE yy0 = new sqlite3ParserTOKENTYPE();
236
+ public Select yy3;
237
+ public ExprList yy14;
238
+ public SrcList yy65;
239
+ public LikeOp yy96;
240
+ public Expr yy132;
241
+ public u8 yy186;
242
+ public int yy328;
243
+ public ExprSpan yy346 = new ExprSpan();
244
+ public TrigEvent yy378;
245
+ public IdList yy408;
246
+ public struct _yy429 { public int value; public int mask;}public _yy429 yy429;
247
+ public TriggerStep yy473;
248
+ public LimitVal yy476;
249
+ }
250
+
251
+ #if !YYSTACKDEPTH
252
+ const int YYSTACKDEPTH = 100;
253
+ #endif
254
+ //#define sqlite3ParserARG_SDECL Parse pParse;
255
+ //#define sqlite3ParserARG_PDECL ,Parse pParse
256
+ //#define sqlite3ParserARG_FETCH Parse pParse = yypParser.pParse
257
+ //#define sqlite3ParserARG_STORE yypParser.pParse = pParse
258
+ const int YYNSTATE = 631;
259
+ const int YYNRULE = 330;
260
+ //#define YYFALLBACK 1
261
+ const int YYFALLBACK = 1;
262
+ const int YY_NO_ACTION = ( YYNSTATE + YYNRULE + 2 );
263
+ const int YY_ACCEPT_ACTION = ( YYNSTATE + YYNRULE + 1 );
264
+ const int YY_ERROR_ACTION = ( YYNSTATE + YYNRULE );
265
+
266
+ /* The yyzerominor constant is used to initialize instances of
267
+ ** YYMINORTYPE objects to zero. */
268
+ YYMINORTYPE yyzerominor = new YYMINORTYPE();//static const YYMINORTYPE yyzerominor = { 0 };
269
+
270
+ /* Define the yytestcase() macro to be a no-op if is not already defined
271
+ ** otherwise.
272
+ **
273
+ ** Applications can choose to define yytestcase() in the %include section
274
+ ** to a macro that can assist in verifying code coverage. For production
275
+ ** code the yytestcase() macro should be turned off. But it is useful
276
+ ** for testing.
277
+ */
278
+ //#if !yytestcase
279
+ //# define yytestcase(X)
280
+ //#endif
281
+
282
+ /* Next are the tables used to determine what action to take based on the
283
+ ** current state and lookahead token. These tables are used to implement
284
+ ** functions that take a state number and lookahead value and return an
285
+ ** action integer.
286
+ **
287
+ ** Suppose the action integer is N. Then the action is determined as
288
+ ** follows
289
+ **
290
+ ** 0 <= N < YYNSTATE Shift N. That is, push the lookahead
291
+ ** token onto the stack and goto state N.
292
+ **
293
+ ** YYNSTATE <= N < YYNSTATE+YYNRULE Reduce by rule N-YYNSTATE.
294
+ **
295
+ ** N == YYNSTATE+YYNRULE A syntax error has occurred.
296
+ **
297
+ ** N == YYNSTATE+YYNRULE+1 The parser accepts its input.
298
+ **
299
+ ** N == YYNSTATE+YYNRULE+2 No such action. Denotes unused
300
+ ** slots in the yy_action[] table.
301
+ **
302
+ ** The action table is constructed as a single large table named yy_action[].
303
+ ** Given state S and lookahead X, the action is computed as
304
+ **
305
+ ** yy_action[ yy_shift_ofst[S] + X ]
306
+ **
307
+ ** If the index value yy_shift_ofst[S]+X is out of range or if the value
308
+ ** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
309
+ ** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
310
+ ** and that yy_default[S] should be used instead.
311
+ **
312
+ ** The formula above is for computing the action when the lookahead is
313
+ ** a terminal symbol. If the lookahead is a non-terminal (as occurs after
314
+ ** a reduce action) then the yy_reduce_ofst[] array is used in place of
315
+ ** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
316
+ ** YY_SHIFT_USE_DFLT.
317
+ **
318
+ ** The following are the tables generated in this section:
319
+ **
320
+ ** yy_action[] A single table containing all actions.
321
+ ** yy_lookahead[] A table containing the lookahead for each entry in
322
+ ** yy_action. Used to detect hash collisions.
323
+ ** yy_shift_ofst[] For each state, the offset into yy_action for
324
+ ** shifting terminals.
325
+ ** yy_reduce_ofst[] For each state, the offset into yy_action for
326
+ ** shifting non-terminals after a reduce.
327
+ ** yy_default[] Default action for each state.
328
+ */
329
+ //#define YY_ACTTAB_COUNT (1550)
330
+ const int YY_ACTTAB_COUNT = 1550;
331
+ static YYACTIONTYPE[] yy_action = new YYACTIONTYPE[]{
332
+ /* 0 */ 313, 49, 556, 46, 147, 172, 628, 598, 55, 55,
333
+ /* 10 */ 55, 55, 302, 53, 53, 53, 53, 52, 52, 51,
334
+ /* 20 */ 51, 51, 50, 238, 603, 66, 624, 623, 604, 598,
335
+ /* 30 */ 591, 585, 48, 53, 53, 53, 53, 52, 52, 51,
336
+ /* 40 */ 51, 51, 50, 238, 51, 51, 51, 50, 238, 56,
337
+ /* 50 */ 57, 47, 583, 582, 584, 584, 54, 54, 55, 55,
338
+ /* 60 */ 55, 55, 609, 53, 53, 53, 53, 52, 52, 51,
339
+ /* 70 */ 51, 51, 50, 238, 313, 598, 672, 330, 411, 217,
340
+ /* 80 */ 32, 53, 53, 53, 53, 52, 52, 51, 51, 51,
341
+ /* 90 */ 50, 238, 330, 414, 621, 620, 166, 598, 673, 382,
342
+ /* 100 */ 379, 378, 602, 73, 591, 585, 307, 424, 166, 58,
343
+ /* 110 */ 377, 382, 379, 378, 516, 515, 624, 623, 254, 200,
344
+ /* 120 */ 199, 198, 377, 56, 57, 47, 583, 582, 584, 584,
345
+ /* 130 */ 54, 54, 55, 55, 55, 55, 581, 53, 53, 53,
346
+ /* 140 */ 53, 52, 52, 51, 51, 51, 50, 238, 313, 270,
347
+ /* 150 */ 226, 422, 283, 133, 177, 139, 284, 385, 279, 384,
348
+ /* 160 */ 169, 197, 251, 282, 253, 226, 411, 275, 440, 167,
349
+ /* 170 */ 139, 284, 385, 279, 384, 169, 571, 236, 591, 585,
350
+ /* 180 */ 240, 414, 275, 622, 621, 620, 674, 437, 441, 442,
351
+ /* 190 */ 602, 88, 352, 266, 439, 268, 438, 56, 57, 47,
352
+ /* 200 */ 583, 582, 584, 584, 54, 54, 55, 55, 55, 55,
353
+ /* 210 */ 465, 53, 53, 53, 53, 52, 52, 51, 51, 51,
354
+ /* 220 */ 50, 238, 313, 471, 52, 52, 51, 51, 51, 50,
355
+ /* 230 */ 238, 234, 166, 491, 567, 382, 379, 378, 1, 440,
356
+ /* 240 */ 252, 176, 624, 623, 608, 67, 377, 513, 622, 443,
357
+ /* 250 */ 237, 577, 591, 585, 622, 172, 466, 598, 554, 441,
358
+ /* 260 */ 340, 409, 526, 580, 580, 349, 596, 553, 194, 482,
359
+ /* 270 */ 175, 56, 57, 47, 583, 582, 584, 584, 54, 54,
360
+ /* 280 */ 55, 55, 55, 55, 562, 53, 53, 53, 53, 52,
361
+ /* 290 */ 52, 51, 51, 51, 50, 238, 313, 594, 594, 594,
362
+ /* 300 */ 561, 578, 469, 65, 259, 351, 258, 411, 624, 623,
363
+ /* 310 */ 621, 620, 332, 576, 575, 240, 560, 568, 520, 411,
364
+ /* 320 */ 341, 237, 414, 624, 623, 598, 591, 585, 542, 519,
365
+ /* 330 */ 171, 602, 95, 68, 414, 624, 623, 624, 623, 38,
366
+ /* 340 */ 877, 506, 507, 602, 88, 56, 57, 47, 583, 582,
367
+ /* 350 */ 584, 584, 54, 54, 55, 55, 55, 55, 532, 53,
368
+ /* 360 */ 53, 53, 53, 52, 52, 51, 51, 51, 50, 238,
369
+ /* 370 */ 313, 411, 579, 398, 531, 237, 621, 620, 388, 625,
370
+ /* 380 */ 500, 206, 167, 396, 233, 312, 414, 387, 569, 492,
371
+ /* 390 */ 216, 621, 620, 566, 622, 602, 74, 533, 210, 491,
372
+ /* 400 */ 591, 585, 548, 621, 620, 621, 620, 300, 598, 466,
373
+ /* 410 */ 481, 67, 603, 35, 622, 601, 604, 547, 6, 56,
374
+ /* 420 */ 57, 47, 583, 582, 584, 584, 54, 54, 55, 55,
375
+ /* 430 */ 55, 55, 601, 53, 53, 53, 53, 52, 52, 51,
376
+ /* 440 */ 51, 51, 50, 238, 313, 411, 184, 409, 528, 580,
377
+ /* 450 */ 580, 551, 962, 186, 419, 2, 353, 259, 351, 258,
378
+ /* 460 */ 414, 409, 411, 580, 580, 44, 411, 544, 240, 602,
379
+ /* 470 */ 94, 190, 7, 62, 591, 585, 598, 414, 350, 607,
380
+ /* 480 */ 493, 414, 409, 317, 580, 580, 602, 95, 496, 565,
381
+ /* 490 */ 602, 80, 203, 56, 57, 47, 583, 582, 584, 584,
382
+ /* 500 */ 54, 54, 55, 55, 55, 55, 535, 53, 53, 53,
383
+ /* 510 */ 53, 52, 52, 51, 51, 51, 50, 238, 313, 202,
384
+ /* 520 */ 564, 293, 511, 49, 562, 46, 147, 411, 394, 183,
385
+ /* 530 */ 563, 549, 505, 549, 174, 409, 322, 580, 580, 39,
386
+ /* 540 */ 561, 37, 414, 624, 623, 192, 473, 383, 591, 585,
387
+ /* 550 */ 474, 602, 80, 601, 504, 544, 560, 364, 402, 210,
388
+ /* 560 */ 421, 952, 361, 952, 365, 201, 144, 56, 57, 47,
389
+ /* 570 */ 583, 582, 584, 584, 54, 54, 55, 55, 55, 55,
390
+ /* 580 */ 559, 53, 53, 53, 53, 52, 52, 51, 51, 51,
391
+ /* 590 */ 50, 238, 313, 601, 232, 264, 272, 321, 374, 484,
392
+ /* 600 */ 510, 146, 342, 146, 328, 425, 485, 407, 576, 575,
393
+ /* 610 */ 622, 621, 620, 49, 168, 46, 147, 353, 546, 491,
394
+ /* 620 */ 204, 240, 591, 585, 421, 951, 549, 951, 549, 168,
395
+ /* 630 */ 429, 67, 390, 343, 622, 434, 307, 423, 338, 360,
396
+ /* 640 */ 391, 56, 57, 47, 583, 582, 584, 584, 54, 54,
397
+ /* 650 */ 55, 55, 55, 55, 601, 53, 53, 53, 53, 52,
398
+ /* 660 */ 52, 51, 51, 51, 50, 238, 313, 34, 318, 425,
399
+ /* 670 */ 237, 21, 359, 273, 411, 167, 411, 276, 411, 540,
400
+ /* 680 */ 411, 422, 13, 318, 619, 618, 617, 622, 275, 414,
401
+ /* 690 */ 336, 414, 622, 414, 622, 414, 591, 585, 602, 69,
402
+ /* 700 */ 602, 97, 602, 100, 602, 98, 631, 629, 334, 475,
403
+ /* 710 */ 475, 367, 319, 148, 327, 56, 57, 47, 583, 582,
404
+ /* 720 */ 584, 584, 54, 54, 55, 55, 55, 55, 411, 53,
405
+ /* 730 */ 53, 53, 53, 52, 52, 51, 51, 51, 50, 238,
406
+ /* 740 */ 313, 411, 331, 414, 411, 49, 276, 46, 147, 569,
407
+ /* 750 */ 406, 216, 602, 106, 573, 573, 414, 354, 524, 414,
408
+ /* 760 */ 411, 622, 411, 224, 4, 602, 104, 605, 602, 108,
409
+ /* 770 */ 591, 585, 622, 20, 375, 414, 167, 414, 215, 144,
410
+ /* 780 */ 470, 239, 167, 225, 602, 109, 602, 134, 18, 56,
411
+ /* 790 */ 57, 47, 583, 582, 584, 584, 54, 54, 55, 55,
412
+ /* 800 */ 55, 55, 411, 53, 53, 53, 53, 52, 52, 51,
413
+ /* 810 */ 51, 51, 50, 238, 313, 411, 276, 414, 12, 459,
414
+ /* 820 */ 276, 171, 411, 16, 223, 189, 602, 135, 354, 170,
415
+ /* 830 */ 414, 622, 630, 2, 411, 622, 540, 414, 143, 602,
416
+ /* 840 */ 61, 359, 132, 622, 591, 585, 602, 105, 458, 414,
417
+ /* 850 */ 23, 622, 446, 326, 23, 538, 622, 325, 602, 103,
418
+ /* 860 */ 427, 530, 309, 56, 57, 47, 583, 582, 584, 584,
419
+ /* 870 */ 54, 54, 55, 55, 55, 55, 411, 53, 53, 53,
420
+ /* 880 */ 53, 52, 52, 51, 51, 51, 50, 238, 313, 411,
421
+ /* 890 */ 264, 414, 411, 276, 359, 219, 157, 214, 357, 366,
422
+ /* 900 */ 602, 96, 522, 521, 414, 622, 358, 414, 622, 622,
423
+ /* 910 */ 411, 613, 612, 602, 102, 142, 602, 77, 591, 585,
424
+ /* 920 */ 529, 540, 231, 426, 308, 414, 622, 622, 468, 521,
425
+ /* 930 */ 324, 601, 257, 263, 602, 99, 622, 56, 45, 47,
426
+ /* 940 */ 583, 582, 584, 584, 54, 54, 55, 55, 55, 55,
427
+ /* 950 */ 411, 53, 53, 53, 53, 52, 52, 51, 51, 51,
428
+ /* 960 */ 50, 238, 313, 264, 264, 414, 411, 213, 209, 544,
429
+ /* 970 */ 544, 207, 611, 28, 602, 138, 50, 238, 622, 622,
430
+ /* 980 */ 381, 414, 503, 140, 323, 222, 274, 622, 590, 589,
431
+ /* 990 */ 602, 137, 591, 585, 629, 334, 606, 30, 622, 571,
432
+ /* 1000 */ 236, 601, 601, 130, 496, 601, 453, 451, 288, 286,
433
+ /* 1010 */ 587, 586, 57, 47, 583, 582, 584, 584, 54, 54,
434
+ /* 1020 */ 55, 55, 55, 55, 411, 53, 53, 53, 53, 52,
435
+ /* 1030 */ 52, 51, 51, 51, 50, 238, 313, 588, 411, 414,
436
+ /* 1040 */ 411, 264, 410, 129, 595, 400, 27, 376, 602, 136,
437
+ /* 1050 */ 128, 165, 479, 414, 282, 414, 622, 622, 411, 622,
438
+ /* 1060 */ 622, 411, 602, 76, 602, 93, 591, 585, 188, 372,
439
+ /* 1070 */ 368, 125, 476, 414, 261, 160, 414, 171, 124, 472,
440
+ /* 1080 */ 123, 15, 602, 92, 450, 602, 75, 47, 583, 582,
441
+ /* 1090 */ 584, 584, 54, 54, 55, 55, 55, 55, 464, 53,
442
+ /* 1100 */ 53, 53, 53, 52, 52, 51, 51, 51, 50, 238,
443
+ /* 1110 */ 43, 405, 264, 3, 558, 264, 545, 415, 623, 159,
444
+ /* 1120 */ 541, 158, 539, 278, 25, 461, 121, 622, 408, 622,
445
+ /* 1130 */ 622, 622, 24, 43, 405, 622, 3, 622, 622, 120,
446
+ /* 1140 */ 415, 623, 11, 456, 411, 156, 452, 403, 509, 277,
447
+ /* 1150 */ 118, 408, 489, 113, 205, 449, 271, 567, 221, 414,
448
+ /* 1160 */ 269, 267, 155, 622, 622, 111, 411, 622, 602, 95,
449
+ /* 1170 */ 403, 622, 411, 110, 10, 622, 622, 40, 41, 534,
450
+ /* 1180 */ 567, 414, 64, 264, 42, 413, 412, 414, 601, 596,
451
+ /* 1190 */ 602, 91, 445, 436, 150, 435, 602, 90, 622, 265,
452
+ /* 1200 */ 40, 41, 337, 242, 411, 191, 333, 42, 413, 412,
453
+ /* 1210 */ 398, 420, 596, 316, 622, 399, 260, 107, 230, 414,
454
+ /* 1220 */ 594, 594, 594, 593, 592, 14, 220, 411, 602, 101,
455
+ /* 1230 */ 240, 622, 43, 405, 362, 3, 149, 315, 626, 415,
456
+ /* 1240 */ 623, 127, 414, 594, 594, 594, 593, 592, 14, 622,
457
+ /* 1250 */ 408, 602, 89, 411, 181, 33, 405, 463, 3, 411,
458
+ /* 1260 */ 264, 462, 415, 623, 616, 615, 614, 355, 414, 403,
459
+ /* 1270 */ 417, 416, 622, 408, 414, 622, 622, 602, 87, 567,
460
+ /* 1280 */ 418, 627, 622, 602, 86, 8, 241, 180, 126, 255,
461
+ /* 1290 */ 600, 178, 403, 240, 208, 455, 395, 294, 444, 40,
462
+ /* 1300 */ 41, 297, 567, 248, 622, 296, 42, 413, 412, 247,
463
+ /* 1310 */ 622, 596, 244, 622, 30, 60, 31, 243, 430, 624,
464
+ /* 1320 */ 623, 292, 40, 41, 622, 295, 145, 622, 601, 42,
465
+ /* 1330 */ 413, 412, 622, 622, 596, 393, 622, 397, 599, 59,
466
+ /* 1340 */ 235, 622, 594, 594, 594, 593, 592, 14, 218, 291,
467
+ /* 1350 */ 622, 36, 344, 305, 304, 303, 179, 301, 411, 567,
468
+ /* 1360 */ 454, 557, 173, 185, 622, 594, 594, 594, 593, 592,
469
+ /* 1370 */ 14, 411, 29, 414, 151, 289, 246, 523, 411, 196,
470
+ /* 1380 */ 195, 335, 602, 85, 411, 245, 414, 526, 392, 543,
471
+ /* 1390 */ 411, 596, 287, 414, 285, 602, 72, 537, 153, 414,
472
+ /* 1400 */ 466, 411, 602, 71, 154, 414, 411, 152, 602, 84,
473
+ /* 1410 */ 386, 536, 329, 411, 602, 83, 414, 518, 280, 411,
474
+ /* 1420 */ 513, 414, 594, 594, 594, 602, 82, 517, 414, 311,
475
+ /* 1430 */ 602, 81, 411, 514, 414, 512, 131, 602, 70, 229,
476
+ /* 1440 */ 228, 227, 494, 602, 17, 411, 488, 414, 259, 346,
477
+ /* 1450 */ 249, 389, 487, 486, 314, 164, 602, 79, 310, 240,
478
+ /* 1460 */ 414, 373, 480, 163, 262, 371, 414, 162, 369, 602,
479
+ /* 1470 */ 78, 212, 478, 26, 477, 602, 9, 161, 467, 363,
480
+ /* 1480 */ 141, 122, 339, 187, 119, 457, 348, 347, 117, 116,
481
+ /* 1490 */ 115, 112, 114, 448, 182, 22, 320, 433, 432, 431,
482
+ /* 1500 */ 19, 428, 610, 597, 574, 193, 572, 63, 298, 404,
483
+ /* 1510 */ 555, 552, 290, 281, 510, 460, 498, 499, 495, 447,
484
+ /* 1520 */ 356, 497, 256, 380, 306, 570, 5, 250, 345, 238,
485
+ /* 1530 */ 299, 550, 527, 490, 508, 525, 502, 401, 501, 963,
486
+ /* 1540 */ 211, 963, 483, 963, 963, 963, 963, 963, 963, 370,
487
+ };
488
+ static YYCODETYPE[] yy_lookahead = new YYCODETYPE[]{
489
+ /* 0 */ 19, 222, 223, 224, 225, 24, 1, 26, 77, 78,
490
+ /* 10 */ 79, 80, 15, 82, 83, 84, 85, 86, 87, 88,
491
+ /* 20 */ 89, 90, 91, 92, 113, 22, 26, 27, 117, 26,
492
+ /* 30 */ 49, 50, 81, 82, 83, 84, 85, 86, 87, 88,
493
+ /* 40 */ 89, 90, 91, 92, 88, 89, 90, 91, 92, 68,
494
+ /* 50 */ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
495
+ /* 60 */ 79, 80, 23, 82, 83, 84, 85, 86, 87, 88,
496
+ /* 70 */ 89, 90, 91, 92, 19, 94, 118, 19, 150, 22,
497
+ /* 80 */ 25, 82, 83, 84, 85, 86, 87, 88, 89, 90,
498
+ /* 90 */ 91, 92, 19, 165, 94, 95, 96, 94, 118, 99,
499
+ /* 100 */ 100, 101, 174, 175, 49, 50, 22, 23, 96, 54,
500
+ /* 110 */ 110, 99, 100, 101, 7, 8, 26, 27, 16, 105,
501
+ /* 120 */ 106, 107, 110, 68, 69, 70, 71, 72, 73, 74,
502
+ /* 130 */ 75, 76, 77, 78, 79, 80, 113, 82, 83, 84,
503
+ /* 140 */ 85, 86, 87, 88, 89, 90, 91, 92, 19, 16,
504
+ /* 150 */ 92, 67, 98, 24, 96, 97, 98, 99, 100, 101,
505
+ /* 160 */ 102, 25, 60, 109, 62, 92, 150, 109, 150, 25,
506
+ /* 170 */ 97, 98, 99, 100, 101, 102, 86, 87, 49, 50,
507
+ /* 180 */ 116, 165, 109, 165, 94, 95, 118, 97, 170, 171,
508
+ /* 190 */ 174, 175, 128, 60, 104, 62, 106, 68, 69, 70,
509
+ /* 200 */ 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
510
+ /* 210 */ 11, 82, 83, 84, 85, 86, 87, 88, 89, 90,
511
+ /* 220 */ 91, 92, 19, 21, 86, 87, 88, 89, 90, 91,
512
+ /* 230 */ 92, 215, 96, 150, 66, 99, 100, 101, 22, 150,
513
+ /* 240 */ 138, 118, 26, 27, 161, 162, 110, 103, 165, 231,
514
+ /* 250 */ 232, 23, 49, 50, 165, 24, 57, 26, 32, 170,
515
+ /* 260 */ 171, 112, 94, 114, 115, 63, 98, 41, 185, 186,
516
+ /* 270 */ 118, 68, 69, 70, 71, 72, 73, 74, 75, 76,
517
+ /* 280 */ 77, 78, 79, 80, 12, 82, 83, 84, 85, 86,
518
+ /* 290 */ 87, 88, 89, 90, 91, 92, 19, 129, 130, 131,
519
+ /* 300 */ 28, 23, 100, 25, 105, 106, 107, 150, 26, 27,
520
+ /* 310 */ 94, 95, 169, 170, 171, 116, 44, 23, 46, 150,
521
+ /* 320 */ 231, 232, 165, 26, 27, 94, 49, 50, 23, 57,
522
+ /* 330 */ 25, 174, 175, 22, 165, 26, 27, 26, 27, 136,
523
+ /* 340 */ 138, 97, 98, 174, 175, 68, 69, 70, 71, 72,
524
+ /* 350 */ 73, 74, 75, 76, 77, 78, 79, 80, 23, 82,
525
+ /* 360 */ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
526
+ /* 370 */ 19, 150, 23, 216, 23, 232, 94, 95, 221, 150,
527
+ /* 380 */ 23, 160, 25, 214, 215, 163, 165, 88, 166, 167,
528
+ /* 390 */ 168, 94, 95, 23, 165, 174, 175, 88, 160, 150,
529
+ /* 400 */ 49, 50, 120, 94, 95, 94, 95, 158, 26, 57,
530
+ /* 410 */ 161, 162, 113, 136, 165, 194, 117, 120, 22, 68,
531
+ /* 420 */ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
532
+ /* 430 */ 79, 80, 194, 82, 83, 84, 85, 86, 87, 88,
533
+ /* 440 */ 89, 90, 91, 92, 19, 150, 23, 112, 23, 114,
534
+ /* 450 */ 115, 25, 142, 143, 144, 145, 218, 105, 106, 107,
535
+ /* 460 */ 165, 112, 150, 114, 115, 22, 150, 166, 116, 174,
536
+ /* 470 */ 175, 22, 76, 235, 49, 50, 94, 165, 240, 172,
537
+ /* 480 */ 173, 165, 112, 155, 114, 115, 174, 175, 181, 11,
538
+ /* 490 */ 174, 175, 22, 68, 69, 70, 71, 72, 73, 74,
539
+ /* 500 */ 75, 76, 77, 78, 79, 80, 205, 82, 83, 84,
540
+ /* 510 */ 85, 86, 87, 88, 89, 90, 91, 92, 19, 160,
541
+ /* 520 */ 23, 226, 23, 222, 12, 224, 225, 150, 216, 23,
542
+ /* 530 */ 23, 25, 36, 25, 25, 112, 220, 114, 115, 135,
543
+ /* 540 */ 28, 137, 165, 26, 27, 119, 30, 51, 49, 50,
544
+ /* 550 */ 34, 174, 175, 194, 58, 166, 44, 229, 46, 160,
545
+ /* 560 */ 22, 23, 234, 25, 48, 206, 207, 68, 69, 70,
546
+ /* 570 */ 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
547
+ /* 580 */ 23, 82, 83, 84, 85, 86, 87, 88, 89, 90,
548
+ /* 590 */ 91, 92, 19, 194, 205, 150, 23, 220, 19, 181,
549
+ /* 600 */ 182, 95, 97, 95, 108, 67, 188, 169, 170, 171,
550
+ /* 610 */ 165, 94, 95, 222, 50, 224, 225, 218, 120, 150,
551
+ /* 620 */ 160, 116, 49, 50, 22, 23, 120, 25, 120, 50,
552
+ /* 630 */ 161, 162, 19, 128, 165, 244, 22, 23, 193, 240,
553
+ /* 640 */ 27, 68, 69, 70, 71, 72, 73, 74, 75, 76,
554
+ /* 650 */ 77, 78, 79, 80, 194, 82, 83, 84, 85, 86,
555
+ /* 660 */ 87, 88, 89, 90, 91, 92, 19, 25, 104, 67,
556
+ /* 670 */ 232, 24, 150, 23, 150, 25, 150, 150, 150, 150,
557
+ /* 680 */ 150, 67, 25, 104, 7, 8, 9, 165, 109, 165,
558
+ /* 690 */ 245, 165, 165, 165, 165, 165, 49, 50, 174, 175,
559
+ /* 700 */ 174, 175, 174, 175, 174, 175, 0, 1, 2, 105,
560
+ /* 710 */ 106, 107, 248, 249, 187, 68, 69, 70, 71, 72,
561
+ /* 720 */ 73, 74, 75, 76, 77, 78, 79, 80, 150, 82,
562
+ /* 730 */ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
563
+ /* 740 */ 19, 150, 213, 165, 150, 222, 150, 224, 225, 166,
564
+ /* 750 */ 167, 168, 174, 175, 129, 130, 165, 150, 165, 165,
565
+ /* 760 */ 150, 165, 150, 241, 35, 174, 175, 174, 174, 175,
566
+ /* 770 */ 49, 50, 165, 52, 23, 165, 25, 165, 206, 207,
567
+ /* 780 */ 23, 197, 25, 187, 174, 175, 174, 175, 204, 68,
568
+ /* 790 */ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
569
+ /* 800 */ 79, 80, 150, 82, 83, 84, 85, 86, 87, 88,
570
+ /* 810 */ 89, 90, 91, 92, 19, 150, 150, 165, 35, 23,
571
+ /* 820 */ 150, 25, 150, 22, 217, 24, 174, 175, 150, 35,
572
+ /* 830 */ 165, 165, 144, 145, 150, 165, 150, 165, 118, 174,
573
+ /* 840 */ 175, 150, 22, 165, 49, 50, 174, 175, 23, 165,
574
+ /* 850 */ 25, 165, 23, 187, 25, 27, 165, 187, 174, 175,
575
+ /* 860 */ 23, 23, 25, 68, 69, 70, 71, 72, 73, 74,
576
+ /* 870 */ 75, 76, 77, 78, 79, 80, 150, 82, 83, 84,
577
+ /* 880 */ 85, 86, 87, 88, 89, 90, 91, 92, 19, 150,
578
+ /* 890 */ 150, 165, 150, 150, 150, 217, 25, 160, 19, 213,
579
+ /* 900 */ 174, 175, 190, 191, 165, 165, 27, 165, 165, 165,
580
+ /* 910 */ 150, 150, 150, 174, 175, 39, 174, 175, 49, 50,
581
+ /* 920 */ 23, 150, 52, 250, 251, 165, 165, 165, 190, 191,
582
+ /* 930 */ 187, 194, 241, 193, 174, 175, 165, 68, 69, 70,
583
+ /* 940 */ 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
584
+ /* 950 */ 150, 82, 83, 84, 85, 86, 87, 88, 89, 90,
585
+ /* 960 */ 91, 92, 19, 150, 150, 165, 150, 160, 160, 166,
586
+ /* 970 */ 166, 160, 150, 22, 174, 175, 91, 92, 165, 165,
587
+ /* 980 */ 52, 165, 29, 150, 213, 241, 23, 165, 49, 50,
588
+ /* 990 */ 174, 175, 49, 50, 1, 2, 173, 126, 165, 86,
589
+ /* 1000 */ 87, 194, 194, 22, 181, 194, 193, 193, 205, 205,
590
+ /* 1010 */ 71, 72, 69, 70, 71, 72, 73, 74, 75, 76,
591
+ /* 1020 */ 77, 78, 79, 80, 150, 82, 83, 84, 85, 86,
592
+ /* 1030 */ 87, 88, 89, 90, 91, 92, 19, 98, 150, 165,
593
+ /* 1040 */ 150, 150, 150, 22, 150, 150, 22, 52, 174, 175,
594
+ /* 1050 */ 22, 102, 20, 165, 109, 165, 165, 165, 150, 165,
595
+ /* 1060 */ 165, 150, 174, 175, 174, 175, 49, 50, 24, 19,
596
+ /* 1070 */ 43, 104, 59, 165, 138, 104, 165, 25, 53, 53,
597
+ /* 1080 */ 22, 5, 174, 175, 193, 174, 175, 70, 71, 72,
598
+ /* 1090 */ 73, 74, 75, 76, 77, 78, 79, 80, 1, 82,
599
+ /* 1100 */ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
600
+ /* 1110 */ 19, 20, 150, 22, 150, 150, 150, 26, 27, 118,
601
+ /* 1120 */ 150, 35, 150, 150, 76, 27, 108, 165, 37, 165,
602
+ /* 1130 */ 165, 165, 76, 19, 20, 165, 22, 165, 165, 127,
603
+ /* 1140 */ 26, 27, 22, 1, 150, 16, 20, 56, 150, 150,
604
+ /* 1150 */ 119, 37, 150, 119, 160, 193, 150, 66, 193, 165,
605
+ /* 1160 */ 150, 150, 121, 165, 165, 108, 150, 165, 174, 175,
606
+ /* 1170 */ 56, 165, 150, 127, 22, 165, 165, 86, 87, 88,
607
+ /* 1180 */ 66, 165, 16, 150, 93, 94, 95, 165, 194, 98,
608
+ /* 1190 */ 174, 175, 128, 23, 15, 23, 174, 175, 165, 150,
609
+ /* 1200 */ 86, 87, 65, 140, 150, 22, 3, 93, 94, 95,
610
+ /* 1210 */ 216, 4, 98, 252, 165, 221, 150, 164, 180, 165,
611
+ /* 1220 */ 129, 130, 131, 132, 133, 134, 193, 150, 174, 175,
612
+ /* 1230 */ 116, 165, 19, 20, 150, 22, 249, 252, 149, 26,
613
+ /* 1240 */ 27, 180, 165, 129, 130, 131, 132, 133, 134, 165,
614
+ /* 1250 */ 37, 174, 175, 150, 6, 19, 20, 150, 22, 150,
615
+ /* 1260 */ 150, 150, 26, 27, 149, 149, 13, 150, 165, 56,
616
+ /* 1270 */ 149, 159, 165, 37, 165, 165, 165, 174, 175, 66,
617
+ /* 1280 */ 146, 147, 165, 174, 175, 25, 152, 151, 154, 150,
618
+ /* 1290 */ 194, 151, 56, 116, 160, 150, 123, 202, 150, 86,
619
+ /* 1300 */ 87, 199, 66, 193, 165, 200, 93, 94, 95, 150,
620
+ /* 1310 */ 165, 98, 150, 165, 126, 22, 124, 150, 150, 26,
621
+ /* 1320 */ 27, 150, 86, 87, 165, 201, 150, 165, 194, 93,
622
+ /* 1330 */ 94, 95, 165, 165, 98, 150, 165, 122, 203, 125,
623
+ /* 1340 */ 227, 165, 129, 130, 131, 132, 133, 134, 5, 150,
624
+ /* 1350 */ 165, 135, 218, 10, 11, 12, 13, 14, 150, 66,
625
+ /* 1360 */ 17, 157, 118, 157, 165, 129, 130, 131, 132, 133,
626
+ /* 1370 */ 134, 150, 104, 165, 31, 210, 33, 176, 150, 86,
627
+ /* 1380 */ 87, 247, 174, 175, 150, 42, 165, 94, 121, 211,
628
+ /* 1390 */ 150, 98, 210, 165, 210, 174, 175, 211, 55, 165,
629
+ /* 1400 */ 57, 150, 174, 175, 61, 165, 150, 64, 174, 175,
630
+ /* 1410 */ 104, 211, 47, 150, 174, 175, 165, 176, 176, 150,
631
+ /* 1420 */ 103, 165, 129, 130, 131, 174, 175, 184, 165, 179,
632
+ /* 1430 */ 174, 175, 150, 178, 165, 176, 22, 174, 175, 230,
633
+ /* 1440 */ 92, 230, 184, 174, 175, 150, 176, 165, 105, 106,
634
+ /* 1450 */ 107, 150, 176, 176, 111, 156, 174, 175, 179, 116,
635
+ /* 1460 */ 165, 18, 157, 156, 238, 157, 165, 156, 45, 174,
636
+ /* 1470 */ 175, 157, 157, 135, 239, 174, 175, 156, 189, 157,
637
+ /* 1480 */ 68, 189, 139, 219, 22, 199, 157, 18, 192, 192,
638
+ /* 1490 */ 192, 189, 192, 199, 219, 243, 157, 40, 157, 157,
639
+ /* 1500 */ 243, 38, 153, 166, 233, 196, 233, 246, 198, 228,
640
+ /* 1510 */ 177, 177, 209, 177, 182, 199, 166, 177, 166, 199,
641
+ /* 1520 */ 242, 177, 242, 178, 148, 166, 196, 209, 209, 92,
642
+ /* 1530 */ 195, 208, 174, 186, 183, 174, 183, 191, 183, 253,
643
+ /* 1540 */ 236, 253, 186, 253, 253, 253, 253, 253, 253, 237,
644
+ };
645
+
646
+ const int YY_SHIFT_USE_DFLT = -90;//#define YY_SHIFT_USE_DFLT (-90)
647
+ const int YY_SHIFT_COUNT = 418; //#define YY_SHIFT_COUNT (418)
648
+ const int YY_SHIFT_MIN = -89; //#define YY_SHIFT_MIN (-89)
649
+ const int YY_SHIFT_MAX = 1469; //#define YY_SHIFT_MAX (1469)
650
+
651
+ static short[] yy_shift_ofst = new short[]{
652
+ /* 0 */ 993, 1114, 1343, 1114, 1213, 1213, 90, 90, 0, -19,
653
+ /* 10 */ 1213, 1213, 1213, 1213, 1213, 352, 517, 721, 1091, 1213,
654
+ /* 20 */ 1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
655
+ /* 30 */ 1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
656
+ /* 40 */ 1213, 1213, 1213, 1213, 1213, 1213, 1213, 1236, 1213, 1213,
657
+ /* 50 */ 1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
658
+ /* 60 */ 1213, -49, 199, 517, 517, 913, 913, 382, 1177, 55,
659
+ /* 70 */ 647, 573, 499, 425, 351, 277, 203, 129, 795, 795,
660
+ /* 80 */ 795, 795, 795, 795, 795, 795, 795, 795, 795, 795,
661
+ /* 90 */ 795, 795, 795, 795, 795, 795, 869, 795, 943, 1017,
662
+ /* 100 */ 1017, -69, -69, -69, -69, -1, -1, 58, 138, -44,
663
+ /* 110 */ 517, 517, 517, 517, 517, 517, 517, 517, 517, 517,
664
+ /* 120 */ 517, 517, 517, 517, 517, 517, 202, 579, 517, 517,
665
+ /* 130 */ 517, 517, 517, 382, 885, 1437, -90, -90, -90, 1293,
666
+ /* 140 */ 73, 272, 272, 309, 311, 297, 282, 216, 602, 538,
667
+ /* 150 */ 517, 517, 517, 517, 517, 517, 517, 517, 517, 517,
668
+ /* 160 */ 517, 517, 517, 517, 517, 517, 517, 517, 517, 517,
669
+ /* 170 */ 517, 517, 517, 517, 517, 517, 517, 517, 517, 517,
670
+ /* 180 */ 517, 517, 505, 231, 231, 231, 706, 64, 1177, 1177,
671
+ /* 190 */ 1177, -90, -90, -90, 136, 168, 168, 12, 496, 496,
672
+ /* 200 */ 496, 506, 423, 512, 370, 349, 335, 149, 149, 149,
673
+ /* 210 */ 149, 604, 516, 149, 149, 508, 3, 299, 677, 871,
674
+ /* 220 */ 613, 613, 879, 871, 879, 144, 382, 226, 382, 226,
675
+ /* 230 */ 564, 226, 613, 226, 226, 404, 625, 625, 382, 426,
676
+ /* 240 */ -89, 801, 1463, 1244, 1244, 1457, 1457, 1244, 1462, 1412,
677
+ /* 250 */ 1188, 1469, 1469, 1469, 1469, 1244, 1188, 1462, 1412, 1412,
678
+ /* 260 */ 1244, 1443, 1338, 1423, 1244, 1244, 1443, 1244, 1443, 1244,
679
+ /* 270 */ 1443, 1414, 1306, 1306, 1306, 1365, 1348, 1348, 1414, 1306,
680
+ /* 280 */ 1317, 1306, 1365, 1306, 1306, 1267, 1268, 1267, 1268, 1267,
681
+ /* 290 */ 1268, 1244, 1244, 1216, 1214, 1215, 1192, 1173, 1188, 1177,
682
+ /* 300 */ 1260, 1253, 1253, 1248, 1248, 1248, 1248, -90, -90, -90,
683
+ /* 310 */ -90, -90, -90, 939, 102, 614, 84, 133, 14, 837,
684
+ /* 320 */ 396, 829, 825, 796, 757, 751, 650, 357, 244, 107,
685
+ /* 330 */ 54, 305, 278, 1207, 1203, 1183, 1063, 1179, 1137, 1166,
686
+ /* 340 */ 1172, 1170, 1064, 1152, 1046, 1057, 1034, 1126, 1041, 1129,
687
+ /* 350 */ 1142, 1031, 1120, 1012, 1056, 1048, 1018, 1098, 1086, 1001,
688
+ /* 360 */ 1097, 1076, 1058, 971, 936, 1026, 1052, 1025, 1013, 1027,
689
+ /* 370 */ 967, 1044, 1032, 1050, 945, 949, 1028, 995, 1024, 1021,
690
+ /* 380 */ 963, 981, 928, 953, 951, 870, 876, 897, 838, 720,
691
+ /* 390 */ 828, 794, 820, 498, 642, 783, 657, 729, 642, 557,
692
+ /* 400 */ 507, 509, 497, 470, 478, 449, 294, 228, 443, 23,
693
+ /* 410 */ 152, 123, 68, -20, -42, 57, 39, -3, 5,
694
+ };
695
+
696
+ const int YY_REDUCE_USE_DFLT = -222; //#define YY_REDUCE_USE_DFLT (-222)
697
+ const int YY_REDUCE_COUNT = 312; //#define YY_REDUCE_COUNT (312)
698
+ const int YY_REDUCE_MIN = -221; //#define YY_REDUCE_MIN (-221)
699
+ const int YY_REDUCE_MAX = 1376; //#define YY_REDUCE_MAX (1376)
700
+
701
+ static short[] yy_reduce_ofst = new short[]{
702
+ /* 0 */ 310, 994, 1134, 221, 169, 157, 89, 18, 83, 301,
703
+ /* 10 */ 377, 316, 312, 16, 295, 238, 249, 391, 1301, 1295,
704
+ /* 20 */ 1282, 1269, 1263, 1256, 1251, 1240, 1234, 1228, 1221, 1208,
705
+ /* 30 */ 1109, 1103, 1077, 1054, 1022, 1016, 911, 908, 890, 888,
706
+ /* 40 */ 874, 816, 800, 760, 742, 739, 726, 684, 672, 665,
707
+ /* 50 */ 652, 612, 610, 594, 591, 578, 530, 528, 526, 524,
708
+ /* 60 */ -72, -221, 399, 469, 445, 438, 143, 222, 359, 523,
709
+ /* 70 */ 523, 523, 523, 523, 523, 523, 523, 523, 523, 523,
710
+ /* 80 */ 523, 523, 523, 523, 523, 523, 523, 523, 523, 523,
711
+ /* 90 */ 523, 523, 523, 523, 523, 523, 523, 523, 523, 523,
712
+ /* 100 */ 523, 523, 523, 523, 523, 523, 523, 307, 523, 523,
713
+ /* 110 */ 1110, 678, 1033, 965, 962, 891, 814, 813, 744, 771,
714
+ /* 120 */ 691, 607, 522, 743, 686, 740, 328, 418, 670, 666,
715
+ /* 130 */ 596, 527, 529, 583, 523, 523, 523, 523, 523, 593,
716
+ /* 140 */ 823, 738, 712, 892, 1199, 1185, 1176, 1171, 673, 673,
717
+ /* 150 */ 1168, 1167, 1162, 1159, 1148, 1145, 1139, 1117, 1111, 1107,
718
+ /* 160 */ 1084, 1066, 1049, 1011, 1010, 1006, 1002, 999, 998, 973,
719
+ /* 170 */ 972, 970, 966, 964, 895, 894, 892, 833, 822, 762,
720
+ /* 180 */ 761, 229, 811, 804, 803, 389, 688, 808, 807, 737,
721
+ /* 190 */ 460, 464, 572, 584, 1356, 1361, 1358, 1347, 1355, 1353,
722
+ /* 200 */ 1351, 1323, 1335, 1346, 1335, 1335, 1335, 1335, 1335, 1335,
723
+ /* 210 */ 1335, 1312, 1304, 1335, 1335, 1323, 1359, 1330, 1376, 1320,
724
+ /* 220 */ 1319, 1318, 1280, 1316, 1278, 1345, 1352, 1344, 1350, 1340,
725
+ /* 230 */ 1332, 1336, 1303, 1334, 1333, 1281, 1273, 1271, 1337, 1310,
726
+ /* 240 */ 1309, 1349, 1261, 1342, 1341, 1257, 1252, 1339, 1275, 1302,
727
+ /* 250 */ 1294, 1300, 1298, 1297, 1296, 1329, 1286, 1264, 1292, 1289,
728
+ /* 260 */ 1322, 1321, 1235, 1226, 1315, 1314, 1311, 1308, 1307, 1305,
729
+ /* 270 */ 1299, 1279, 1277, 1276, 1270, 1258, 1211, 1209, 1250, 1259,
730
+ /* 280 */ 1255, 1242, 1243, 1241, 1201, 1200, 1184, 1186, 1182, 1178,
731
+ /* 290 */ 1165, 1206, 1204, 1113, 1135, 1095, 1124, 1105, 1102, 1096,
732
+ /* 300 */ 1112, 1140, 1136, 1121, 1116, 1115, 1089, 985, 961, 987,
733
+ /* 310 */ 1061, 1038, 1053,
734
+ };
735
+ static YYACTIONTYPE[] yy_default = new YYACTIONTYPE[] {
736
+ /* 0 */ 636, 872, 961, 961, 961, 872, 901, 901, 961, 760,
737
+ /* 10 */ 961, 961, 961, 961, 870, 961, 961, 935, 961, 961,
738
+ /* 20 */ 961, 961, 961, 961, 961, 961, 961, 961, 961, 961,
739
+ /* 30 */ 961, 961, 961, 961, 961, 961, 961, 961, 961, 961,
740
+ /* 40 */ 961, 961, 961, 961, 961, 961, 961, 961, 961, 961,
741
+ /* 50 */ 961, 961, 961, 961, 961, 961, 961, 961, 961, 961,
742
+ /* 60 */ 961, 844, 961, 961, 961, 901, 901, 675, 764, 795,
743
+ /* 70 */ 961, 961, 961, 961, 961, 961, 961, 961, 934, 936,
744
+ /* 80 */ 810, 809, 803, 802, 914, 775, 800, 793, 786, 797,
745
+ /* 90 */ 873, 866, 867, 865, 869, 874, 961, 796, 832, 850,
746
+ /* 100 */ 831, 849, 856, 848, 834, 843, 833, 667, 835, 836,
747
+ /* 110 */ 961, 961, 961, 961, 961, 961, 961, 961, 961, 961,
748
+ /* 120 */ 961, 961, 961, 961, 961, 961, 662, 729, 961, 961,
749
+ /* 130 */ 961, 961, 961, 961, 837, 838, 853, 852, 851, 961,
750
+ /* 140 */ 961, 961, 961, 961, 961, 961, 961, 961, 961, 961,
751
+ /* 150 */ 961, 941, 939, 961, 885, 961, 961, 961, 961, 961,
752
+ /* 160 */ 961, 961, 961, 961, 961, 961, 961, 961, 961, 961,
753
+ /* 170 */ 961, 961, 961, 961, 961, 961, 961, 961, 961, 961,
754
+ /* 180 */ 961, 642, 961, 760, 760, 760, 636, 961, 961, 961,
755
+ /* 190 */ 961, 953, 764, 754, 720, 961, 961, 961, 961, 961,
756
+ /* 200 */ 961, 961, 961, 961, 961, 961, 961, 805, 743, 924,
757
+ /* 210 */ 926, 961, 907, 741, 664, 762, 677, 752, 644, 799,
758
+ /* 220 */ 777, 777, 919, 799, 919, 701, 961, 789, 961, 789,
759
+ /* 230 */ 698, 789, 777, 789, 789, 868, 961, 961, 961, 761,
760
+ /* 240 */ 752, 961, 946, 768, 768, 938, 938, 768, 811, 733,
761
+ /* 250 */ 799, 740, 740, 740, 740, 768, 799, 811, 733, 733,
762
+ /* 260 */ 768, 659, 913, 911, 768, 768, 659, 768, 659, 768,
763
+ /* 270 */ 659, 878, 731, 731, 731, 716, 882, 882, 878, 731,
764
+ /* 280 */ 701, 731, 716, 731, 731, 781, 776, 781, 776, 781,
765
+ /* 290 */ 776, 768, 768, 961, 794, 782, 792, 790, 799, 961,
766
+ /* 300 */ 719, 652, 652, 641, 641, 641, 641, 958, 958, 953,
767
+ /* 310 */ 703, 703, 685, 961, 961, 961, 961, 961, 961, 961,
768
+ /* 320 */ 887, 961, 961, 961, 961, 961, 961, 961, 961, 961,
769
+ /* 330 */ 961, 961, 961, 961, 637, 948, 961, 961, 945, 961,
770
+ /* 340 */ 961, 961, 961, 961, 961, 961, 961, 961, 961, 961,
771
+ /* 350 */ 961, 961, 961, 961, 961, 961, 961, 961, 961, 917,
772
+ /* 360 */ 961, 961, 961, 961, 961, 961, 910, 909, 961, 961,
773
+ /* 370 */ 961, 961, 961, 961, 961, 961, 961, 961, 961, 961,
774
+ /* 380 */ 961, 961, 961, 961, 961, 961, 961, 961, 961, 961,
775
+ /* 390 */ 961, 961, 961, 961, 791, 961, 783, 961, 871, 961,
776
+ /* 400 */ 961, 961, 961, 961, 961, 961, 961, 961, 961, 746,
777
+ /* 410 */ 820, 961, 819, 823, 818, 669, 961, 650, 961, 633,
778
+ /* 420 */ 638, 957, 960, 959, 956, 955, 954, 949, 947, 944,
779
+ /* 430 */ 943, 942, 940, 937, 933, 891, 889, 896, 895, 894,
780
+ /* 440 */ 893, 892, 890, 888, 886, 806, 804, 801, 798, 932,
781
+ /* 450 */ 884, 742, 739, 738, 658, 950, 916, 925, 923, 812,
782
+ /* 460 */ 922, 921, 920, 918, 915, 902, 808, 807, 734, 876,
783
+ /* 470 */ 875, 661, 906, 905, 904, 908, 912, 903, 770, 660,
784
+ /* 480 */ 657, 666, 723, 722, 730, 728, 727, 726, 725, 724,
785
+ /* 490 */ 721, 668, 676, 687, 715, 700, 699, 881, 883, 880,
786
+ /* 500 */ 879, 708, 707, 713, 712, 711, 710, 709, 706, 705,
787
+ /* 510 */ 704, 697, 696, 702, 695, 718, 717, 714, 694, 737,
788
+ /* 520 */ 736, 735, 732, 693, 692, 691, 823, 690, 689, 829,
789
+ /* 530 */ 828, 816, 860, 757, 756, 755, 767, 766, 779, 778,
790
+ /* 540 */ 814, 813, 780, 765, 759, 758, 774, 773, 772, 771,
791
+ /* 550 */ 763, 753, 785, 788, 787, 784, 845, 862, 769, 859,
792
+ /* 560 */ 931, 930, 929, 928, 927, 864, 863, 830, 827, 680,
793
+ /* 570 */ 681, 900, 898, 899, 897, 683, 682, 679, 678, 861,
794
+ /* 580 */ 748, 747, 857, 854, 846, 841, 858, 855, 847, 842,
795
+ /* 590 */ 840, 839, 825, 824, 822, 821, 817, 826, 671, 749,
796
+ /* 600 */ 745, 744, 815, 751, 750, 688, 686, 684, 665, 663,
797
+ /* 610 */ 656, 654, 653, 655, 651, 649, 648, 647, 646, 645,
798
+ /* 620 */ 674, 673, 672, 670, 669, 643, 640, 639, 635, 634,
799
+ /* 630 */ 632,
800
+ };
801
+
802
+ /* The next table maps tokens into fallback tokens. If a construct
803
+ ** like the following:
804
+ **
805
+ ** %fallback ID X Y Z.
806
+ **
807
+ ** appears in the grammar, then ID becomes a fallback token for X, Y,
808
+ ** and Z. Whenever one of the tokens X, Y, or Z is input to the parser
809
+ ** but it does not parse, the type of the token is changed to ID and
810
+ ** the parse is retried before an error is thrown.
811
+ */
812
+ #if YYFALLBACK || TRUE
813
+ static YYCODETYPE[] yyFallback = new YYCODETYPE[]{
814
+ 0, /* $ => nothing */
815
+ 0, /* SEMI => nothing */
816
+ 26, /* EXPLAIN => ID */
817
+ 26, /* QUERY => ID */
818
+ 26, /* PLAN => ID */
819
+ 26, /* BEGIN => ID */
820
+ 0, /* TRANSACTION => nothing */
821
+ 26, /* DEFERRED => ID */
822
+ 26, /* IMMEDIATE => ID */
823
+ 26, /* EXCLUSIVE => ID */
824
+ 0, /* COMMIT => nothing */
825
+ 26, /* END => ID */
826
+ 26, /* ROLLBACK => ID */
827
+ 26, /* SAVEPOINT => ID */
828
+ 26, /* RELEASE => ID */
829
+ 0, /* TO => nothing */
830
+ 0, /* TABLE => nothing */
831
+ 0, /* CREATE => nothing */
832
+ 26, /* IF => ID */
833
+ 0, /* NOT => nothing */
834
+ 0, /* EXISTS => nothing */
835
+ 26, /* TEMP => ID */
836
+ 0, /* LP => nothing */
837
+ 0, /* RP => nothing */
838
+ 0, /* AS => nothing */
839
+ 0, /* COMMA => nothing */
840
+ 0, /* ID => nothing */
841
+ 0, /* INDEXED => nothing */
842
+ 26, /* ABORT => ID */
843
+ 26, /* ACTION => ID */
844
+ 26, /* AFTER => ID */
845
+ 26, /* ANALYZE => ID */
846
+ 26, /* ASC => ID */
847
+ 26, /* ATTACH => ID */
848
+ 26, /* BEFORE => ID */
849
+ 26, /* BY => ID */
850
+ 26, /* CASCADE => ID */
851
+ 26, /* CAST => ID */
852
+ 26, /* COLUMNKW => ID */
853
+ 26, /* CONFLICT => ID */
854
+ 26, /* DATABASE => ID */
855
+ 26, /* DESC => ID */
856
+ 26, /* DETACH => ID */
857
+ 26, /* EACH => ID */
858
+ 26, /* FAIL => ID */
859
+ 26, /* FOR => ID */
860
+ 26, /* IGNORE => ID */
861
+ 26, /* INITIALLY => ID */
862
+ 26, /* INSTEAD => ID */
863
+ 26, /* LIKE_KW => ID */
864
+ 26, /* MATCH => ID */
865
+ 26, /* NO => ID */
866
+ 26, /* KEY => ID */
867
+ 26, /* OF => ID */
868
+ 26, /* OFFSET => ID */
869
+ 26, /* PRAGMA => ID */
870
+ 26, /* RAISE => ID */
871
+ 26, /* REPLACE => ID */
872
+ 26, /* RESTRICT => ID */
873
+ 26, /* ROW => ID */
874
+ 26, /* TRIGGER => ID */
875
+ 26, /* VACUUM => ID */
876
+ 26, /* VIEW => ID */
877
+ 26, /* VIRTUAL => ID */
878
+ 26, /* REINDEX => ID */
879
+ 26, /* RENAME => ID */
880
+ 26, /* CTIME_KW => ID */
881
+ };
882
+ #endif // * YYFALLBACK */
883
+
884
+ /* The following structure represents a single element of the
885
+ ** parser's stack. Information stored includes:
886
+ **
887
+ ** + The state number for the parser at this level of the stack.
888
+ **
889
+ ** + The value of the token stored at this level of the stack.
890
+ ** (In other words, the "major" token.)
891
+ **
892
+ ** + The semantic value stored at this level of the stack. This is
893
+ ** the information used by the action routines in the grammar.
894
+ ** It is sometimes called the "minor" token.
895
+ */
896
+ public class yyStackEntry
897
+ {
898
+ public YYACTIONTYPE stateno; /* The state-number */
899
+ public YYCODETYPE major; /* The major token value. This is the code
900
+ ** number for the token at this stack level */
901
+ public YYMINORTYPE minor; /* The user-supplied minor token value. This
902
+ ** is the value of the token */
903
+ };
904
+ //typedef struct yyStackEntry yyStackEntry;
905
+
906
+ /* The state of the parser is completely contained in an instance of
907
+ ** the following structure */
908
+ public class yyParser
909
+ {
910
+ public int yyidx; /* Index of top element in stack */
911
+ #if YYTRACKMAXSTACKDEPTH
912
+ int yyidxMax; /* Maximum value of yyidx */
913
+ #endif
914
+ public int yyerrcnt; /* Shifts left before out of the error */
915
+ public Parse pParse; // sqlite3ParserARG_SDECL /* A place to hold %extra_argument */
916
+ #if YYSTACKDEPTH//<=0
917
+ public int yystksz; /* Current side of the stack */
918
+ public yyStackEntry *yystack; /* The parser's stack */
919
+ #else
920
+ public yyStackEntry[] yystack = new yyStackEntry[YYSTACKDEPTH]; /* The parser's stack */
921
+ #endif
922
+ };
923
+ //typedef struct yyParser yyParser;
924
+
925
+ #if !NDEBUG
926
+ //#include <stdio.h>
927
+ static TextWriter yyTraceFILE = null;
928
+ static string yyTracePrompt = "";
929
+ #endif // * NDEBUG */
930
+
931
+ #if !NDEBUG
932
+ /*
933
+ ** Turn parser tracing on by giving a stream to which to write the trace
934
+ ** and a prompt to preface each trace message. Tracing is turned off
935
+ ** by making either argument NULL
936
+ **
937
+ ** Inputs:
938
+ ** <ul>
939
+ ** <li> A FILE* to which trace output should be written.
940
+ ** If NULL, then tracing is turned off.
941
+ ** <li> A prefix string written at the beginning of every
942
+ ** line of trace output. If NULL, then tracing is
943
+ ** turned off.
944
+ ** </ul>
945
+ **
946
+ ** Outputs:
947
+ ** None.
948
+ */
949
+ static void sqlite3ParserTrace( TextWriter TraceFILE, string zTracePrompt )
950
+ {
951
+ yyTraceFILE = TraceFILE;
952
+ yyTracePrompt = zTracePrompt;
953
+ if ( yyTraceFILE == null ) yyTracePrompt = "";
954
+ else if ( yyTracePrompt == "" ) yyTraceFILE = null;
955
+ }
956
+ #endif // * NDEBUG */
957
+
958
+ #if !NDEBUG
959
+ /* For tracing shifts, the names of all terminals and nonterminals
960
+ ** are required. The following table supplies these names */
961
+ static string[] yyTokenName = {
962
+ "$", "SEMI", "EXPLAIN", "QUERY",
963
+ "PLAN", "BEGIN", "TRANSACTION", "DEFERRED",
964
+ "IMMEDIATE", "EXCLUSIVE", "COMMIT", "END",
965
+ "ROLLBACK", "SAVEPOINT", "RELEASE", "TO",
966
+ "TABLE", "CREATE", "IF", "NOT",
967
+ "EXISTS", "TEMP", "LP", "RP",
968
+ "AS", "COMMA", "ID", "INDEXED",
969
+ "ABORT", "ACTION", "AFTER", "ANALYZE",
970
+ "ASC", "ATTACH", "BEFORE", "BY",
971
+ "CASCADE", "CAST", "COLUMNKW", "CONFLICT",
972
+ "DATABASE", "DESC", "DETACH", "EACH",
973
+ "FAIL", "FOR", "IGNORE", "INITIALLY",
974
+ "INSTEAD", "LIKE_KW", "MATCH", "NO",
975
+ "KEY", "OF", "OFFSET", "PRAGMA",
976
+ "RAISE", "REPLACE", "RESTRICT", "ROW",
977
+ "TRIGGER", "VACUUM", "VIEW", "VIRTUAL",
978
+ "REINDEX", "RENAME", "CTIME_KW", "ANY",
979
+ "OR", "AND", "IS", "BETWEEN",
980
+ "IN", "ISNULL", "NOTNULL", "NE",
981
+ "EQ", "GT", "LE", "LT",
982
+ "GE", "ESCAPE", "BITAND", "BITOR",
983
+ "LSHIFT", "RSHIFT", "PLUS", "MINUS",
984
+ "STAR", "SLASH", "REM", "CONCAT",
985
+ "COLLATE", "BITNOT", "STRING", "JOIN_KW",
986
+ "CONSTRAINT", "DEFAULT", "NULL", "PRIMARY",
987
+ "UNIQUE", "CHECK", "REFERENCES", "AUTOINCR",
988
+ "ON", "INSERT", "DELETE", "UPDATE",
989
+ "SET", "DEFERRABLE", "FOREIGN", "DROP",
990
+ "UNION", "ALL", "EXCEPT", "INTERSECT",
991
+ "SELECT", "DISTINCT", "DOT", "FROM",
992
+ "JOIN", "USING", "ORDER", "GROUP",
993
+ "HAVING", "LIMIT", "WHERE", "INTO",
994
+ "VALUES", "INTEGER", "FLOAT", "BLOB",
995
+ "REGISTER", "VARIABLE", "CASE", "WHEN",
996
+ "THEN", "ELSE", "INDEX", "ALTER",
997
+ "ADD", "error", "input", "cmdlist",
998
+ "ecmd", "explain", "cmdx", "cmd",
999
+ "transtype", "trans_opt", "nm", "savepoint_opt",
1000
+ "create_table", "create_table_args", "createkw", "temp",
1001
+ "ifnotexists", "dbnm", "columnlist", "conslist_opt",
1002
+ "select", "column", "columnid", "type",
1003
+ "carglist", "id", "ids", "typetoken",
1004
+ "typename", "signed", "plus_num", "minus_num",
1005
+ "carg", "ccons", "term", "expr",
1006
+ "onconf", "sortorder", "autoinc", "idxlist_opt",
1007
+ "refargs", "defer_subclause", "refarg", "refact",
1008
+ "init_deferred_pred_opt", "conslist", "tcons", "idxlist",
1009
+ "defer_subclause_opt", "orconf", "resolvetype", "raisetype",
1010
+ "ifexists", "fullname", "oneselect", "multiselect_op",
1011
+ "distinct", "selcollist", "from", "where_opt",
1012
+ "groupby_opt", "having_opt", "orderby_opt", "limit_opt",
1013
+ "sclp", "as", "seltablist", "stl_prefix",
1014
+ "joinop", "indexed_opt", "on_opt", "using_opt",
1015
+ "joinop2", "inscollist", "sortlist", "sortitem",
1016
+ "nexprlist", "setlist", "insert_cmd", "inscollist_opt",
1017
+ "itemlist", "exprlist", "likeop", "escape",
1018
+ "between_op", "in_op", "case_operand", "case_exprlist",
1019
+ "case_else", "uniqueflag", "collate", "nmnum",
1020
+ "plus_opt", "number", "trigger_decl", "trigger_cmd_list",
1021
+ "trigger_time", "trigger_event", "foreach_clause", "when_clause",
1022
+ "trigger_cmd", "trnm", "tridxby", "database_kw_opt",
1023
+ "key_opt", "add_column_fullname", "kwcolumn_opt", "create_vtab",
1024
+ "vtabarglist", "vtabarg", "vtabargtoken", "lp",
1025
+ "anylist",
1026
+ };
1027
+ #endif // * NDEBUG */
1028
+
1029
+ #if !NDEBUG
1030
+ /* For tracing reduce actions, the names of all rules are required.
1031
+ */
1032
+ static string[] yyRuleName = {
1033
+ /* 0 */ "input ::= cmdlist",
1034
+ /* 1 */ "cmdlist ::= cmdlist ecmd",
1035
+ /* 2 */ "cmdlist ::= ecmd",
1036
+ /* 3 */ "ecmd ::= SEMI",
1037
+ /* 4 */ "ecmd ::= explain cmdx SEMI",
1038
+ /* 5 */ "explain ::=",
1039
+ /* 6 */ "explain ::= EXPLAIN",
1040
+ /* 7 */ "explain ::= EXPLAIN QUERY PLAN",
1041
+ /* 8 */ "cmdx ::= cmd",
1042
+ /* 9 */ "cmd ::= BEGIN transtype trans_opt",
1043
+ /* 10 */ "trans_opt ::=",
1044
+ /* 11 */ "trans_opt ::= TRANSACTION",
1045
+ /* 12 */ "trans_opt ::= TRANSACTION nm",
1046
+ /* 13 */ "transtype ::=",
1047
+ /* 14 */ "transtype ::= DEFERRED",
1048
+ /* 15 */ "transtype ::= IMMEDIATE",
1049
+ /* 16 */ "transtype ::= EXCLUSIVE",
1050
+ /* 17 */ "cmd ::= COMMIT trans_opt",
1051
+ /* 18 */ "cmd ::= END trans_opt",
1052
+ /* 19 */ "cmd ::= ROLLBACK trans_opt",
1053
+ /* 20 */ "savepoint_opt ::= SAVEPOINT",
1054
+ /* 21 */ "savepoint_opt ::=",
1055
+ /* 22 */ "cmd ::= SAVEPOINT nm",
1056
+ /* 23 */ "cmd ::= RELEASE savepoint_opt nm",
1057
+ /* 24 */ "cmd ::= ROLLBACK trans_opt TO savepoint_opt nm",
1058
+ /* 25 */ "cmd ::= create_table create_table_args",
1059
+ /* 26 */ "create_table ::= createkw temp TABLE ifnotexists nm dbnm",
1060
+ /* 27 */ "createkw ::= CREATE",
1061
+ /* 28 */ "ifnotexists ::=",
1062
+ /* 29 */ "ifnotexists ::= IF NOT EXISTS",
1063
+ /* 30 */ "temp ::= TEMP",
1064
+ /* 31 */ "temp ::=",
1065
+ /* 32 */ "create_table_args ::= LP columnlist conslist_opt RP",
1066
+ /* 33 */ "create_table_args ::= AS select",
1067
+ /* 34 */ "columnlist ::= columnlist COMMA column",
1068
+ /* 35 */ "columnlist ::= column",
1069
+ /* 36 */ "column ::= columnid type carglist",
1070
+ /* 37 */ "columnid ::= nm",
1071
+ /* 38 */ "id ::= ID",
1072
+ /* 39 */ "id ::= INDEXED",
1073
+ /* 40 */ "ids ::= ID|STRING",
1074
+ /* 41 */ "nm ::= id",
1075
+ /* 42 */ "nm ::= STRING",
1076
+ /* 43 */ "nm ::= JOIN_KW",
1077
+ /* 44 */ "type ::=",
1078
+ /* 45 */ "type ::= typetoken",
1079
+ /* 46 */ "typetoken ::= typename",
1080
+ /* 47 */ "typetoken ::= typename LP signed RP",
1081
+ /* 48 */ "typetoken ::= typename LP signed COMMA signed RP",
1082
+ /* 49 */ "typename ::= ids",
1083
+ /* 50 */ "typename ::= typename ids",
1084
+ /* 51 */ "signed ::= plus_num",
1085
+ /* 52 */ "signed ::= minus_num",
1086
+ /* 53 */ "carglist ::= carglist carg",
1087
+ /* 54 */ "carglist ::=",
1088
+ /* 55 */ "carg ::= CONSTRAINT nm ccons",
1089
+ /* 56 */ "carg ::= ccons",
1090
+ /* 57 */ "ccons ::= DEFAULT term",
1091
+ /* 58 */ "ccons ::= DEFAULT LP expr RP",
1092
+ /* 59 */ "ccons ::= DEFAULT PLUS term",
1093
+ /* 60 */ "ccons ::= DEFAULT MINUS term",
1094
+ /* 61 */ "ccons ::= DEFAULT id",
1095
+ /* 62 */ "ccons ::= NULL onconf",
1096
+ /* 63 */ "ccons ::= NOT NULL onconf",
1097
+ /* 64 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
1098
+ /* 65 */ "ccons ::= UNIQUE onconf",
1099
+ /* 66 */ "ccons ::= CHECK LP expr RP",
1100
+ /* 67 */ "ccons ::= REFERENCES nm idxlist_opt refargs",
1101
+ /* 68 */ "ccons ::= defer_subclause",
1102
+ /* 69 */ "ccons ::= COLLATE ids",
1103
+ /* 70 */ "autoinc ::=",
1104
+ /* 71 */ "autoinc ::= AUTOINCR",
1105
+ /* 72 */ "refargs ::=",
1106
+ /* 73 */ "refargs ::= refargs refarg",
1107
+ /* 74 */ "refarg ::= MATCH nm",
1108
+ /* 75 */ "refarg ::= ON INSERT refact",
1109
+ /* 76 */ "refarg ::= ON DELETE refact",
1110
+ /* 77 */ "refarg ::= ON UPDATE refact",
1111
+ /* 78 */ "refact ::= SET NULL",
1112
+ /* 79 */ "refact ::= SET DEFAULT",
1113
+ /* 80 */ "refact ::= CASCADE",
1114
+ /* 81 */ "refact ::= RESTRICT",
1115
+ /* 82 */ "refact ::= NO ACTION",
1116
+ /* 83 */ "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt",
1117
+ /* 84 */ "defer_subclause ::= DEFERRABLE init_deferred_pred_opt",
1118
+ /* 85 */ "init_deferred_pred_opt ::=",
1119
+ /* 86 */ "init_deferred_pred_opt ::= INITIALLY DEFERRED",
1120
+ /* 87 */ "init_deferred_pred_opt ::= INITIALLY IMMEDIATE",
1121
+ /* 88 */ "conslist_opt ::=",
1122
+ /* 89 */ "conslist_opt ::= COMMA conslist",
1123
+ /* 90 */ "conslist ::= conslist COMMA tcons",
1124
+ /* 91 */ "conslist ::= conslist tcons",
1125
+ /* 92 */ "conslist ::= tcons",
1126
+ /* 93 */ "tcons ::= CONSTRAINT nm",
1127
+ /* 94 */ "tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf",
1128
+ /* 95 */ "tcons ::= UNIQUE LP idxlist RP onconf",
1129
+ /* 96 */ "tcons ::= CHECK LP expr RP onconf",
1130
+ /* 97 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt",
1131
+ /* 98 */ "defer_subclause_opt ::=",
1132
+ /* 99 */ "defer_subclause_opt ::= defer_subclause",
1133
+ /* 100 */ "onconf ::=",
1134
+ /* 101 */ "onconf ::= ON CONFLICT resolvetype",
1135
+ /* 102 */ "orconf ::=",
1136
+ /* 103 */ "orconf ::= OR resolvetype",
1137
+ /* 104 */ "resolvetype ::= raisetype",
1138
+ /* 105 */ "resolvetype ::= IGNORE",
1139
+ /* 106 */ "resolvetype ::= REPLACE",
1140
+ /* 107 */ "cmd ::= DROP TABLE ifexists fullname",
1141
+ /* 108 */ "ifexists ::= IF EXISTS",
1142
+ /* 109 */ "ifexists ::=",
1143
+ /* 110 */ "cmd ::= createkw temp VIEW ifnotexists nm dbnm AS select",
1144
+ /* 111 */ "cmd ::= DROP VIEW ifexists fullname",
1145
+ /* 112 */ "cmd ::= select",
1146
+ /* 113 */ "select ::= oneselect",
1147
+ /* 114 */ "select ::= select multiselect_op oneselect",
1148
+ /* 115 */ "multiselect_op ::= UNION",
1149
+ /* 116 */ "multiselect_op ::= UNION ALL",
1150
+ /* 117 */ "multiselect_op ::= EXCEPT|INTERSECT",
1151
+ /* 118 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt",
1152
+ /* 119 */ "distinct ::= DISTINCT",
1153
+ /* 120 */ "distinct ::= ALL",
1154
+ /* 121 */ "distinct ::=",
1155
+ /* 122 */ "sclp ::= selcollist COMMA",
1156
+ /* 123 */ "sclp ::=",
1157
+ /* 124 */ "selcollist ::= sclp expr as",
1158
+ /* 125 */ "selcollist ::= sclp STAR",
1159
+ /* 126 */ "selcollist ::= sclp nm DOT STAR",
1160
+ /* 127 */ "as ::= AS nm",
1161
+ /* 128 */ "as ::= ids",
1162
+ /* 129 */ "as ::=",
1163
+ /* 130 */ "from ::=",
1164
+ /* 131 */ "from ::= FROM seltablist",
1165
+ /* 132 */ "stl_prefix ::= seltablist joinop",
1166
+ /* 133 */ "stl_prefix ::=",
1167
+ /* 134 */ "seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt",
1168
+ /* 135 */ "seltablist ::= stl_prefix LP select RP as on_opt using_opt",
1169
+ /* 136 */ "seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt",
1170
+ /* 137 */ "dbnm ::=",
1171
+ /* 138 */ "dbnm ::= DOT nm",
1172
+ /* 139 */ "fullname ::= nm dbnm",
1173
+ /* 140 */ "joinop ::= COMMA|JOIN",
1174
+ /* 141 */ "joinop ::= JOIN_KW JOIN",
1175
+ /* 142 */ "joinop ::= JOIN_KW nm JOIN",
1176
+ /* 143 */ "joinop ::= JOIN_KW nm nm JOIN",
1177
+ /* 144 */ "on_opt ::= ON expr",
1178
+ /* 145 */ "on_opt ::=",
1179
+ /* 146 */ "indexed_opt ::=",
1180
+ /* 147 */ "indexed_opt ::= INDEXED BY nm",
1181
+ /* 148 */ "indexed_opt ::= NOT INDEXED",
1182
+ /* 149 */ "using_opt ::= USING LP inscollist RP",
1183
+ /* 150 */ "using_opt ::=",
1184
+ /* 151 */ "orderby_opt ::=",
1185
+ /* 152 */ "orderby_opt ::= ORDER BY sortlist",
1186
+ /* 153 */ "sortlist ::= sortlist COMMA sortitem sortorder",
1187
+ /* 154 */ "sortlist ::= sortitem sortorder",
1188
+ /* 155 */ "sortitem ::= expr",
1189
+ /* 156 */ "sortorder ::= ASC",
1190
+ /* 157 */ "sortorder ::= DESC",
1191
+ /* 158 */ "sortorder ::=",
1192
+ /* 159 */ "groupby_opt ::=",
1193
+ /* 160 */ "groupby_opt ::= GROUP BY nexprlist",
1194
+ /* 161 */ "having_opt ::=",
1195
+ /* 162 */ "having_opt ::= HAVING expr",
1196
+ /* 163 */ "limit_opt ::=",
1197
+ /* 164 */ "limit_opt ::= LIMIT expr",
1198
+ /* 165 */ "limit_opt ::= LIMIT expr OFFSET expr",
1199
+ /* 166 */ "limit_opt ::= LIMIT expr COMMA expr",
1200
+ /* 167 */ "cmd ::= DELETE FROM fullname indexed_opt where_opt",
1201
+ /* 168 */ "where_opt ::=",
1202
+ /* 169 */ "where_opt ::= WHERE expr",
1203
+ /* 170 */ "cmd ::= UPDATE orconf fullname indexed_opt SET setlist where_opt",
1204
+ /* 171 */ "setlist ::= setlist COMMA nm EQ expr",
1205
+ /* 172 */ "setlist ::= nm EQ expr",
1206
+ /* 173 */ "cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP",
1207
+ /* 174 */ "cmd ::= insert_cmd INTO fullname inscollist_opt select",
1208
+ /* 175 */ "cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES",
1209
+ /* 176 */ "insert_cmd ::= INSERT orconf",
1210
+ /* 177 */ "insert_cmd ::= REPLACE",
1211
+ /* 178 */ "itemlist ::= itemlist COMMA expr",
1212
+ /* 179 */ "itemlist ::= expr",
1213
+ /* 180 */ "inscollist_opt ::=",
1214
+ /* 181 */ "inscollist_opt ::= LP inscollist RP",
1215
+ /* 182 */ "inscollist ::= inscollist COMMA nm",
1216
+ /* 183 */ "inscollist ::= nm",
1217
+ /* 184 */ "expr ::= term",
1218
+ /* 185 */ "expr ::= LP expr RP",
1219
+ /* 186 */ "term ::= NULL",
1220
+ /* 187 */ "expr ::= id",
1221
+ /* 188 */ "expr ::= JOIN_KW",
1222
+ /* 189 */ "expr ::= nm DOT nm",
1223
+ /* 190 */ "expr ::= nm DOT nm DOT nm",
1224
+ /* 191 */ "term ::= INTEGER|FLOAT|BLOB",
1225
+ /* 192 */ "term ::= STRING",
1226
+ /* 193 */ "expr ::= REGISTER",
1227
+ /* 194 */ "expr ::= VARIABLE",
1228
+ /* 195 */ "expr ::= expr COLLATE ids",
1229
+ /* 196 */ "expr ::= CAST LP expr AS typetoken RP",
1230
+ /* 197 */ "expr ::= ID LP distinct exprlist RP",
1231
+ /* 198 */ "expr ::= ID LP STAR RP",
1232
+ /* 199 */ "term ::= CTIME_KW",
1233
+ /* 200 */ "expr ::= expr AND expr",
1234
+ /* 201 */ "expr ::= expr OR expr",
1235
+ /* 202 */ "expr ::= expr LT|GT|GE|LE expr",
1236
+ /* 203 */ "expr ::= expr EQ|NE expr",
1237
+ /* 204 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr",
1238
+ /* 205 */ "expr ::= expr PLUS|MINUS expr",
1239
+ /* 206 */ "expr ::= expr STAR|SLASH|REM expr",
1240
+ /* 207 */ "expr ::= expr CONCAT expr",
1241
+ /* 208 */ "likeop ::= LIKE_KW",
1242
+ /* 209 */ "likeop ::= NOT LIKE_KW",
1243
+ /* 210 */ "likeop ::= MATCH",
1244
+ /* 211 */ "likeop ::= NOT MATCH",
1245
+ /* 212 */ "escape ::= ESCAPE expr",
1246
+ /* 213 */ "escape ::=",
1247
+ /* 214 */ "expr ::= expr likeop expr escape",
1248
+ /* 215 */ "expr ::= expr ISNULL|NOTNULL",
1249
+ /* 216 */ "expr ::= expr NOT NULL",
1250
+ /* 217 */ "expr ::= expr IS expr",
1251
+ /* 218 */ "expr ::= expr IS NOT expr",
1252
+ /* 219 */ "expr ::= NOT expr",
1253
+ /* 220 */ "expr ::= BITNOT expr",
1254
+ /* 221 */ "expr ::= MINUS expr",
1255
+ /* 222 */ "expr ::= PLUS expr",
1256
+ /* 223 */ "between_op ::= BETWEEN",
1257
+ /* 224 */ "between_op ::= NOT BETWEEN",
1258
+ /* 225 */ "expr ::= expr between_op expr AND expr",
1259
+ /* 226 */ "in_op ::= IN",
1260
+ /* 227 */ "in_op ::= NOT IN",
1261
+ /* 228 */ "expr ::= expr in_op LP exprlist RP",
1262
+ /* 229 */ "expr ::= LP select RP",
1263
+ /* 230 */ "expr ::= expr in_op LP select RP",
1264
+ /* 231 */ "expr ::= expr in_op nm dbnm",
1265
+ /* 232 */ "expr ::= EXISTS LP select RP",
1266
+ /* 233 */ "expr ::= CASE case_operand case_exprlist case_else END",
1267
+ /* 234 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr",
1268
+ /* 235 */ "case_exprlist ::= WHEN expr THEN expr",
1269
+ /* 236 */ "case_else ::= ELSE expr",
1270
+ /* 237 */ "case_else ::=",
1271
+ /* 238 */ "case_operand ::= expr",
1272
+ /* 239 */ "case_operand ::=",
1273
+ /* 240 */ "exprlist ::= nexprlist",
1274
+ /* 241 */ "exprlist ::=",
1275
+ /* 242 */ "nexprlist ::= nexprlist COMMA expr",
1276
+ /* 243 */ "nexprlist ::= expr",
1277
+ /* 244 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP",
1278
+ /* 245 */ "uniqueflag ::= UNIQUE",
1279
+ /* 246 */ "uniqueflag ::=",
1280
+ /* 247 */ "idxlist_opt ::=",
1281
+ /* 248 */ "idxlist_opt ::= LP idxlist RP",
1282
+ /* 249 */ "idxlist ::= idxlist COMMA nm collate sortorder",
1283
+ /* 250 */ "idxlist ::= nm collate sortorder",
1284
+ /* 251 */ "collate ::=",
1285
+ /* 252 */ "collate ::= COLLATE ids",
1286
+ /* 253 */ "cmd ::= DROP INDEX ifexists fullname",
1287
+ /* 254 */ "cmd ::= VACUUM",
1288
+ /* 255 */ "cmd ::= VACUUM nm",
1289
+ /* 256 */ "cmd ::= PRAGMA nm dbnm",
1290
+ /* 257 */ "cmd ::= PRAGMA nm dbnm EQ nmnum",
1291
+ /* 258 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP",
1292
+ /* 259 */ "cmd ::= PRAGMA nm dbnm EQ minus_num",
1293
+ /* 260 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP",
1294
+ /* 261 */ "nmnum ::= plus_num",
1295
+ /* 262 */ "nmnum ::= nm",
1296
+ /* 263 */ "nmnum ::= ON",
1297
+ /* 264 */ "nmnum ::= DELETE",
1298
+ /* 265 */ "nmnum ::= DEFAULT",
1299
+ /* 266 */ "plus_num ::= plus_opt number",
1300
+ /* 267 */ "minus_num ::= MINUS number",
1301
+ /* 268 */ "number ::= INTEGER|FLOAT",
1302
+ /* 269 */ "plus_opt ::= PLUS",
1303
+ /* 270 */ "plus_opt ::=",
1304
+ /* 271 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END",
1305
+ /* 272 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause",
1306
+ /* 273 */ "trigger_time ::= BEFORE",
1307
+ /* 274 */ "trigger_time ::= AFTER",
1308
+ /* 275 */ "trigger_time ::= INSTEAD OF",
1309
+ /* 276 */ "trigger_time ::=",
1310
+ /* 277 */ "trigger_event ::= DELETE|INSERT",
1311
+ /* 278 */ "trigger_event ::= UPDATE",
1312
+ /* 279 */ "trigger_event ::= UPDATE OF inscollist",
1313
+ /* 280 */ "foreach_clause ::=",
1314
+ /* 281 */ "foreach_clause ::= FOR EACH ROW",
1315
+ /* 282 */ "when_clause ::=",
1316
+ /* 283 */ "when_clause ::= WHEN expr",
1317
+ /* 284 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI",
1318
+ /* 285 */ "trigger_cmd_list ::= trigger_cmd SEMI",
1319
+ /* 286 */ "trnm ::= nm",
1320
+ /* 287 */ "trnm ::= nm DOT nm",
1321
+ /* 288 */ "tridxby ::=",
1322
+ /* 289 */ "tridxby ::= INDEXED BY nm",
1323
+ /* 290 */ "tridxby ::= NOT INDEXED",
1324
+ /* 291 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt",
1325
+ /* 292 */ "trigger_cmd ::= insert_cmd INTO trnm inscollist_opt VALUES LP itemlist RP",
1326
+ /* 293 */ "trigger_cmd ::= insert_cmd INTO trnm inscollist_opt select",
1327
+ /* 294 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt",
1328
+ /* 295 */ "trigger_cmd ::= select",
1329
+ /* 296 */ "expr ::= RAISE LP IGNORE RP",
1330
+ /* 297 */ "expr ::= RAISE LP raisetype COMMA nm RP",
1331
+ /* 298 */ "raisetype ::= ROLLBACK",
1332
+ /* 299 */ "raisetype ::= ABORT",
1333
+ /* 300 */ "raisetype ::= FAIL",
1334
+ /* 301 */ "cmd ::= DROP TRIGGER ifexists fullname",
1335
+ /* 302 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt",
1336
+ /* 303 */ "cmd ::= DETACH database_kw_opt expr",
1337
+ /* 304 */ "key_opt ::=",
1338
+ /* 305 */ "key_opt ::= KEY expr",
1339
+ /* 306 */ "database_kw_opt ::= DATABASE",
1340
+ /* 307 */ "database_kw_opt ::=",
1341
+ /* 308 */ "cmd ::= REINDEX",
1342
+ /* 309 */ "cmd ::= REINDEX nm dbnm",
1343
+ /* 310 */ "cmd ::= ANALYZE",
1344
+ /* 311 */ "cmd ::= ANALYZE nm dbnm",
1345
+ /* 312 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
1346
+ /* 313 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column",
1347
+ /* 314 */ "add_column_fullname ::= fullname",
1348
+ /* 315 */ "kwcolumn_opt ::=",
1349
+ /* 316 */ "kwcolumn_opt ::= COLUMNKW",
1350
+ /* 317 */ "cmd ::= create_vtab",
1351
+ /* 318 */ "cmd ::= create_vtab LP vtabarglist RP",
1352
+ /* 319 */ "create_vtab ::= createkw VIRTUAL TABLE nm dbnm USING nm",
1353
+ /* 320 */ "vtabarglist ::= vtabarg",
1354
+ /* 321 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
1355
+ /* 322 */ "vtabarg ::=",
1356
+ /* 323 */ "vtabarg ::= vtabarg vtabargtoken",
1357
+ /* 324 */ "vtabargtoken ::= ANY",
1358
+ /* 325 */ "vtabargtoken ::= lp anylist RP",
1359
+ /* 326 */ "lp ::= LP",
1360
+ /* 327 */ "anylist ::=",
1361
+ /* 328 */ "anylist ::= anylist LP anylist RP",
1362
+ /* 329 */ "anylist ::= anylist ANY",
1363
+ };
1364
+ #endif // * NDEBUG */
1365
+
1366
+
1367
+ #if YYSTACKDEPTH//<=0
1368
+ /*
1369
+ ** Try to increase the size of the parser stack.
1370
+ */
1371
+ static void yyGrowStack(yyParser p){
1372
+ int newSize;
1373
+ //yyStackEntry pNew;
1374
+
1375
+ newSize = p.yystksz*2 + 100;
1376
+ //pNew = realloc(p.yystack, newSize*sizeof(pNew[0]));
1377
+ //if( pNew !=null){
1378
+ p.yystack = Array.Resize(p.yystack,newSize); //pNew;
1379
+ p.yystksz = newSize;
1380
+ #if !NDEBUG
1381
+ if( yyTraceFILE ){
1382
+ fprintf(yyTraceFILE,"%sStack grows to %d entries!\n",
1383
+ yyTracePrompt, p.yystksz);
1384
+ }
1385
+ #endif
1386
+ //}
1387
+ }
1388
+ #endif
1389
+
1390
+ /*
1391
+ ** This function allocates a new parser.
1392
+ ** The only argument is a pointer to a function which works like
1393
+ ** malloc.
1394
+ **
1395
+ ** Inputs:
1396
+ ** A pointer to the function used to allocate memory.
1397
+ **
1398
+ ** Outputs:
1399
+ ** A pointer to a parser. This pointer is used in subsequent calls
1400
+ ** to sqlite3Parser and sqlite3ParserFree.
1401
+ */
1402
+ static yyParser sqlite3ParserAlloc()
1403
+ {//void *(*mallocProc)(size_t)){
1404
+ yyParser pParser = new yyParser();
1405
+ //pParser = (yyParser*)(*mallocProc)( (size_t)yyParser.Length );
1406
+ if ( pParser != null )
1407
+ {
1408
+ pParser.yyidx = -1;
1409
+ #if YYTRACKMAXSTACKDEPTH
1410
+ pParser.yyidxMax=0;
1411
+ #endif
1412
+
1413
+ #if YYSTACKDEPTH//<=0
1414
+ pParser.yystack = NULL;
1415
+ pParser.yystksz = 0;
1416
+ yyGrowStack(pParser);
1417
+ #endif
1418
+ }
1419
+ return pParser;
1420
+ }
1421
+
1422
+ /* The following function deletes the value associated with a
1423
+ ** symbol. The symbol can be either a terminal or nonterminal.
1424
+ ** "yymajor" is the symbol code, and "yypminor" is a pointer to
1425
+ ** the value.
1426
+ */
1427
+ static void yy_destructor(
1428
+ yyParser yypParser, /* The parser */
1429
+ YYCODETYPE yymajor, /* Type code for object to destroy */
1430
+ YYMINORTYPE yypminor /* The object to be destroyed */
1431
+ )
1432
+ {
1433
+ Parse pParse = yypParser.pParse; // sqlite3ParserARG_FETCH;
1434
+ switch ( yymajor )
1435
+ {
1436
+ /* Here is inserted the actions which take place when a
1437
+ ** terminal or non-terminal is destroyed. This can happen
1438
+ ** when the symbol is popped from the stack during a
1439
+ ** reduce or during error processing or when a parser is
1440
+ ** being destroyed before it is finished parsing.
1441
+ **
1442
+ ** Note: during a reduce, the only symbols destroyed are those
1443
+ ** which appear on the RHS of the rule, but which are not used
1444
+ ** inside the C code.
1445
+ */
1446
+ case 160: /* select */
1447
+ case 194: /* oneselect */
1448
+ {
1449
+ //#line 403 "parse.y"
1450
+ sqlite3SelectDelete( pParse.db, ref ( yypminor.yy3 ) );
1451
+ //#line 1400 "parse.c"
1452
+ }
1453
+ break;
1454
+ case 174: /* term */
1455
+ case 175: /* Expr */
1456
+ case 223: /* escape */
1457
+ {
1458
+ //#line 720 "parse.y"
1459
+ sqlite3ExprDelete( pParse.db, ref ( yypminor.yy346 ).pExpr );
1460
+ //#line 1409 "parse.c"
1461
+ }
1462
+ break;
1463
+ case 179: /* idxlist_opt */
1464
+ case 187: /* idxlist */
1465
+ case 197: /* selcollist */
1466
+ case 200: /* groupby_opt */
1467
+ case 202: /* orderby_opt */
1468
+ case 204: /* sclp */
1469
+ case 214: /* sortlist */
1470
+ case 216: /* nexprlist */
1471
+ case 217: /* setlist */
1472
+ case 220: /* itemlist */
1473
+ case 221: /* exprlist */
1474
+ case 227: /* case_exprlist */
1475
+ {
1476
+ //#line 1086 "parse.y"
1477
+ sqlite3ExprListDelete( pParse.db, ref ( yypminor.yy14 ) );
1478
+ //#line 1427 "parse.c"
1479
+ }
1480
+ break;
1481
+ case 193: /* fullname */
1482
+ case 198: /* from */
1483
+ case 206: /* seltablist */
1484
+ case 207: /* stl_prefix */
1485
+ {
1486
+ //#line 534 "parse.y"
1487
+ sqlite3SrcListDelete( pParse.db, ref ( yypminor.yy65 ) );
1488
+ //#line 1437 "parse.c"
1489
+ }
1490
+ break;
1491
+ case 199: /* where_opt */
1492
+ case 201: /* having_opt */
1493
+ case 210: /* on_opt */
1494
+ case 215: /* sortitem */
1495
+ case 226: /* case_operand */
1496
+ case 228: /* case_else */
1497
+ case 239: /* when_clause */
1498
+ case 242: /* key_opt */
1499
+ {
1500
+ //#line 644 "parse.y"
1501
+ sqlite3ExprDelete( pParse.db, ref ( yypminor.yy132 ) );
1502
+ //#line 1451 "parse.c"
1503
+ }
1504
+ break;
1505
+ case 211: /* using_opt */
1506
+ case 213: /* inscollist */
1507
+ case 219: /* inscollist_opt */
1508
+ {
1509
+ //#line 566 "parse.y"
1510
+ sqlite3IdListDelete( pParse.db, ref ( yypminor.yy408 ) );
1511
+ //#line 1460 "parse.c"
1512
+ }
1513
+ break;
1514
+ case 235: /* trigger_cmd_list */
1515
+ case 240: /* trigger_cmd */
1516
+ {
1517
+ //#line 1193 "parse.y"
1518
+ sqlite3DeleteTriggerStep( pParse.db, ref ( yypminor.yy473 ) );
1519
+ //#line 1468 "parse.c"
1520
+ }
1521
+ break;
1522
+ case 237: /* trigger_event */
1523
+ {
1524
+ //#line 1179 "parse.y"
1525
+ sqlite3IdListDelete( pParse.db, ref ( yypminor.yy378 ).b );
1526
+ //#line 1475 "parse.c"
1527
+ }
1528
+ break;
1529
+ default: break; /* If no destructor action specified: do nothing */
1530
+ }
1531
+ }
1532
+
1533
+ /*
1534
+ ** Pop the parser's stack once.
1535
+ **
1536
+ ** If there is a destructor routine associated with the token which
1537
+ ** is popped from the stack, then call it.
1538
+ **
1539
+ ** Return the major token number for the symbol popped.
1540
+ */
1541
+ static int yy_pop_parser_stack( yyParser pParser )
1542
+ {
1543
+ YYCODETYPE yymajor;
1544
+ yyStackEntry yytos = pParser.yystack[pParser.yyidx];
1545
+
1546
+ /* There is no mechanism by which the parser stack can be popped below
1547
+ ** empty in SQLite. */
1548
+ if ( NEVER( pParser.yyidx < 0 ) ) return 0;
1549
+ #if !NDEBUG
1550
+ if ( yyTraceFILE != null && pParser.yyidx >= 0 )
1551
+ {
1552
+ fprintf( yyTraceFILE, "%sPopping %s\n",
1553
+ yyTracePrompt,
1554
+ yyTokenName[yytos.major] );
1555
+ }
1556
+ #endif
1557
+ yymajor = yytos.major;
1558
+ yy_destructor( pParser, yymajor, yytos.minor );
1559
+ pParser.yyidx--;
1560
+ return yymajor;
1561
+ }
1562
+
1563
+ /*
1564
+ ** Deallocate and destroy a parser. Destructors are all called for
1565
+ ** all stack elements before shutting the parser down.
1566
+ **
1567
+ ** Inputs:
1568
+ ** <ul>
1569
+ ** <li> A pointer to the parser. This should be a pointer
1570
+ ** obtained from sqlite3ParserAlloc.
1571
+ ** <li> A pointer to a function used to reclaim memory obtained
1572
+ ** from malloc.
1573
+ ** </ul>
1574
+ */
1575
+ static void sqlite3ParserFree(
1576
+ yyParser p, /* The parser to be deleted */
1577
+ dxDel freeProc//)(void*) /* Function used to reclaim memory */
1578
+ )
1579
+ {
1580
+ yyParser pParser = p;
1581
+ /* In SQLite, we never try to destroy a parser that was not successfully
1582
+ ** created in the first place. */
1583
+ if ( NEVER( pParser == null ) ) return;
1584
+ while ( pParser.yyidx >= 0 ) yy_pop_parser_stack( pParser );
1585
+ #if YYSTACKDEPTH//<=0
1586
+ pParser.yystack = null;//free(pParser.yystack);
1587
+ #endif
1588
+ pParser = null;// freeProc(ref pParser);
1589
+ }
1590
+
1591
+ /*
1592
+ ** Return the peak depth of the stack for a parser.
1593
+ */
1594
+ #if YYTRACKMAXSTACKDEPTH
1595
+ int sqlite3ParserStackPeak(void p){
1596
+ yyParser pParser = (yyParser*)p;
1597
+ return pParser.yyidxMax;
1598
+ }
1599
+ #endif
1600
+
1601
+ /*
1602
+ ** Find the appropriate action for a parser given the terminal
1603
+ ** look-ahead token iLookAhead.
1604
+ **
1605
+ ** If the look-ahead token is YYNOCODE, then check to see if the action is
1606
+ ** independent of the look-ahead. If it is, return the action, otherwise
1607
+ ** return YY_NO_ACTION.
1608
+ */
1609
+ static int yy_find_shift_action(
1610
+ yyParser pParser, /* The parser */
1611
+ YYCODETYPE iLookAhead /* The look-ahead token */
1612
+ )
1613
+ {
1614
+ int i;
1615
+ int stateno = pParser.yystack[pParser.yyidx].stateno;
1616
+
1617
+ if ( stateno > YY_SHIFT_COUNT
1618
+ || ( i = yy_shift_ofst[stateno] ) == YY_SHIFT_USE_DFLT )
1619
+ {
1620
+ return yy_default[stateno];
1621
+ }
1622
+ Debug.Assert( iLookAhead != YYNOCODE );
1623
+ i += iLookAhead;
1624
+ if ( i < 0 || i >= YY_ACTTAB_COUNT || yy_lookahead[i] != iLookAhead )
1625
+ {
1626
+ if ( iLookAhead > 0 )
1627
+ {
1628
+ //#if YYFALLBACK
1629
+ if ( YYFALLBACK != 0 )
1630
+ {
1631
+ YYCODETYPE iFallback; /* Fallback token */
1632
+ if ( iLookAhead < yyFallback.Length //yyFallback.Length/sizeof(yyFallback[0])
1633
+ && ( iFallback = yyFallback[iLookAhead] ) != 0 )
1634
+ {
1635
+ #if !NDEBUG
1636
+ if ( yyTraceFILE != null )
1637
+ {
1638
+ fprintf( yyTraceFILE, "%sFALLBACK %s => %s\n",
1639
+ yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback] );
1640
+ }
1641
+ #endif
1642
+ return yy_find_shift_action( pParser, iFallback );
1643
+ }
1644
+ }
1645
+ //#endif
1646
+ //#if YYWILDCARD
1647
+ {
1648
+ int j = i - iLookAhead + YYWILDCARD;
1649
+ if (
1650
+ //#if YY_SHIFT_MIN+YYWILDCARD<0
1651
+ j >= 0 &&
1652
+ //#endif
1653
+ //#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
1654
+ j < YY_ACTTAB_COUNT &&
1655
+ //#endif
1656
+ yy_lookahead[j] == YYWILDCARD
1657
+ )
1658
+ {
1659
+ #if !NDEBUG
1660
+ if ( yyTraceFILE != null )
1661
+ {
1662
+ Debugger.Break(); // TODO --
1663
+ //fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
1664
+ // yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[YYWILDCARD]);
1665
+ }
1666
+ #endif // * NDEBUG */
1667
+ return yy_action[j];
1668
+ }
1669
+ }
1670
+ //#endif // * YYWILDCARD */
1671
+ }
1672
+ return yy_default[stateno];
1673
+ }
1674
+ else
1675
+ {
1676
+ return yy_action[i];
1677
+ }
1678
+ }
1679
+
1680
+ /*
1681
+ ** Find the appropriate action for a parser given the non-terminal
1682
+ ** look-ahead token iLookAhead.
1683
+ **
1684
+ ** If the look-ahead token is YYNOCODE, then check to see if the action is
1685
+ ** independent of the look-ahead. If it is, return the action, otherwise
1686
+ ** return YY_NO_ACTION.
1687
+ */
1688
+ static int yy_find_reduce_action(
1689
+ int stateno, /* Current state number */
1690
+ YYCODETYPE iLookAhead /* The look-ahead token */
1691
+ )
1692
+ {
1693
+ int i;
1694
+ #if YYERRORSYMBOL
1695
+ if( stateno>YY_REDUCE_COUNT ){
1696
+ return yy_default[stateno];
1697
+ }
1698
+ #else
1699
+ Debug.Assert( stateno <= YY_REDUCE_COUNT );
1700
+ #endif
1701
+ i = yy_reduce_ofst[stateno];
1702
+ Debug.Assert( i != YY_REDUCE_USE_DFLT );
1703
+ Debug.Assert( iLookAhead != YYNOCODE );
1704
+ i += iLookAhead;
1705
+ #if YYERRORSYMBOL
1706
+ if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
1707
+ return yy_default[stateno];
1708
+ }
1709
+ #else
1710
+ Debug.Assert( i >= 0 && i < YY_ACTTAB_COUNT );
1711
+ Debug.Assert( yy_lookahead[i] == iLookAhead );
1712
+ #endif
1713
+ return yy_action[i];
1714
+ }
1715
+
1716
+ /*
1717
+ ** The following routine is called if the stack overflows.
1718
+ */
1719
+ static void yyStackOverflow( yyParser yypParser, YYMINORTYPE yypMinor )
1720
+ {
1721
+ Parse pParse = yypParser.pParse; // sqlite3ParserARG_FETCH;
1722
+ yypParser.yyidx--;
1723
+ #if !NDEBUG
1724
+ if ( yyTraceFILE != null )
1725
+ {
1726
+ Debugger.Break(); // TODO --
1727
+ //fprintf(yyTraceFILE, "%sStack Overflow!\n", yyTracePrompt);
1728
+ }
1729
+ #endif
1730
+ while ( yypParser.yyidx >= 0 ) yy_pop_parser_stack( yypParser );
1731
+ /* Here code is inserted which will execute if the parser
1732
+ ** stack every overflows */
1733
+ //#line 38 "parse.y"
1734
+
1735
+ UNUSED_PARAMETER( yypMinor ); /* Silence some compiler warnings */
1736
+ sqlite3ErrorMsg( pParse, "parser stack overflow" );
1737
+ pParse.parseError = 1;
1738
+ //#line 1666 "parse.c"
1739
+ yypParser.pParse = pParse;// sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument var */
1740
+ }
1741
+
1742
+ /*
1743
+ ** Perform a shift action.
1744
+ */
1745
+ static void yy_shift(
1746
+ yyParser yypParser, /* The parser to be shifted */
1747
+ int yyNewState, /* The new state to shift in */
1748
+ int yyMajor, /* The major token to shift in */
1749
+ YYMINORTYPE yypMinor /* Pointer to the minor token to shift in */
1750
+ )
1751
+ {
1752
+ yyStackEntry yytos = new yyStackEntry();
1753
+ yypParser.yyidx++;
1754
+ #if YYTRACKMAXSTACKDEPTH
1755
+ if( yypParser.yyidx>yypParser.yyidxMax ){
1756
+ yypParser.yyidxMax = yypParser.yyidx;
1757
+ }
1758
+ #endif
1759
+ #if !YYSTACKDEPTH//was YYSTACKDEPTH>0
1760
+ if ( yypParser.yyidx >= YYSTACKDEPTH )
1761
+ {
1762
+ yyStackOverflow( yypParser, yypMinor );
1763
+ return;
1764
+ }
1765
+ #else
1766
+ if( yypParser.yyidx>=yypParser.yystksz ){
1767
+ yyGrowStack(yypParser);
1768
+ if( yypParser.yyidx>=yypParser.yystksz ){
1769
+ yyStackOverflow(yypParser, yypMinor);
1770
+ return;
1771
+ }
1772
+ }
1773
+ #endif
1774
+ yypParser.yystack[yypParser.yyidx] = yytos;//yytos = yypParser.yystack[yypParser.yyidx];
1775
+ yytos.stateno = (YYACTIONTYPE)yyNewState;
1776
+ yytos.major = (YYCODETYPE)yyMajor;
1777
+ yytos.minor = yypMinor;
1778
+ #if !NDEBUG
1779
+ if ( yyTraceFILE != null && yypParser.yyidx > 0 )
1780
+ {
1781
+ int i;
1782
+ fprintf( yyTraceFILE, "%sShift %d\n", yyTracePrompt, yyNewState );
1783
+ fprintf( yyTraceFILE, "%sStack:", yyTracePrompt );
1784
+ for ( i = 1; i <= yypParser.yyidx; i++ )
1785
+ fprintf( yyTraceFILE, " %s", yyTokenName[yypParser.yystack[i].major] );
1786
+ fprintf( yyTraceFILE, "\n" );
1787
+ }
1788
+ #endif
1789
+ }
1790
+ /* The following table contains information about every rule that
1791
+ ** is used during the reduce.
1792
+ */
1793
+ public struct _yyRuleInfo
1794
+ {
1795
+ public YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */
1796
+ public byte nrhs; /* Number of right-hand side symbols in the rule */
1797
+ public _yyRuleInfo( YYCODETYPE lhs, byte nrhs )
1798
+ {
1799
+ this.lhs = lhs;
1800
+ this.nrhs = nrhs;
1801
+ }
1802
+
1803
+ }
1804
+ static _yyRuleInfo[] yyRuleInfo = new _yyRuleInfo[]{
1805
+ new _yyRuleInfo( 142, 1 ),
1806
+ new _yyRuleInfo( 143, 2 ),
1807
+ new _yyRuleInfo( 143, 1 ),
1808
+ new _yyRuleInfo( 144, 1 ),
1809
+ new _yyRuleInfo( 144, 3 ),
1810
+ new _yyRuleInfo( 145, 0 ),
1811
+ new _yyRuleInfo( 145, 1 ),
1812
+ new _yyRuleInfo( 145, 3 ),
1813
+ new _yyRuleInfo( 146, 1 ),
1814
+ new _yyRuleInfo( 147, 3 ),
1815
+ new _yyRuleInfo( 149, 0 ),
1816
+ new _yyRuleInfo( 149, 1 ),
1817
+ new _yyRuleInfo( 149, 2 ),
1818
+ new _yyRuleInfo( 148, 0 ),
1819
+ new _yyRuleInfo( 148, 1 ),
1820
+ new _yyRuleInfo( 148, 1 ),
1821
+ new _yyRuleInfo( 148, 1 ),
1822
+ new _yyRuleInfo( 147, 2 ),
1823
+ new _yyRuleInfo( 147, 2 ),
1824
+ new _yyRuleInfo( 147, 2 ),
1825
+ new _yyRuleInfo( 151, 1 ),
1826
+ new _yyRuleInfo( 151, 0 ),
1827
+ new _yyRuleInfo( 147, 2 ),
1828
+ new _yyRuleInfo( 147, 3 ),
1829
+ new _yyRuleInfo( 147, 5 ),
1830
+ new _yyRuleInfo( 147, 2 ),
1831
+ new _yyRuleInfo( 152, 6 ),
1832
+ new _yyRuleInfo( 154, 1 ),
1833
+ new _yyRuleInfo( 156, 0 ),
1834
+ new _yyRuleInfo( 156, 3 ),
1835
+ new _yyRuleInfo( 155, 1 ),
1836
+ new _yyRuleInfo( 155, 0 ),
1837
+ new _yyRuleInfo( 153, 4 ),
1838
+ new _yyRuleInfo( 153, 2 ),
1839
+ new _yyRuleInfo( 158, 3 ),
1840
+ new _yyRuleInfo( 158, 1 ),
1841
+ new _yyRuleInfo( 161, 3 ),
1842
+ new _yyRuleInfo( 162, 1 ),
1843
+ new _yyRuleInfo( 165, 1 ),
1844
+ new _yyRuleInfo( 165, 1 ),
1845
+ new _yyRuleInfo( 166, 1 ),
1846
+ new _yyRuleInfo( 150, 1 ),
1847
+ new _yyRuleInfo( 150, 1 ),
1848
+ new _yyRuleInfo( 150, 1 ),
1849
+ new _yyRuleInfo( 163, 0 ),
1850
+ new _yyRuleInfo( 163, 1 ),
1851
+ new _yyRuleInfo( 167, 1 ),
1852
+ new _yyRuleInfo( 167, 4 ),
1853
+ new _yyRuleInfo( 167, 6 ),
1854
+ new _yyRuleInfo( 168, 1 ),
1855
+ new _yyRuleInfo( 168, 2 ),
1856
+ new _yyRuleInfo( 169, 1 ),
1857
+ new _yyRuleInfo( 169, 1 ),
1858
+ new _yyRuleInfo( 164, 2 ),
1859
+ new _yyRuleInfo( 164, 0 ),
1860
+ new _yyRuleInfo( 172, 3 ),
1861
+ new _yyRuleInfo( 172, 1 ),
1862
+ new _yyRuleInfo( 173, 2 ),
1863
+ new _yyRuleInfo( 173, 4 ),
1864
+ new _yyRuleInfo( 173, 3 ),
1865
+ new _yyRuleInfo( 173, 3 ),
1866
+ new _yyRuleInfo( 173, 2 ),
1867
+ new _yyRuleInfo( 173, 2 ),
1868
+ new _yyRuleInfo( 173, 3 ),
1869
+ new _yyRuleInfo( 173, 5 ),
1870
+ new _yyRuleInfo( 173, 2 ),
1871
+ new _yyRuleInfo( 173, 4 ),
1872
+ new _yyRuleInfo( 173, 4 ),
1873
+ new _yyRuleInfo( 173, 1 ),
1874
+ new _yyRuleInfo( 173, 2 ),
1875
+ new _yyRuleInfo( 178, 0 ),
1876
+ new _yyRuleInfo( 178, 1 ),
1877
+ new _yyRuleInfo( 180, 0 ),
1878
+ new _yyRuleInfo( 180, 2 ),
1879
+ new _yyRuleInfo( 182, 2 ),
1880
+ new _yyRuleInfo( 182, 3 ),
1881
+ new _yyRuleInfo( 182, 3 ),
1882
+ new _yyRuleInfo( 182, 3 ),
1883
+ new _yyRuleInfo( 183, 2 ),
1884
+ new _yyRuleInfo( 183, 2 ),
1885
+ new _yyRuleInfo( 183, 1 ),
1886
+ new _yyRuleInfo( 183, 1 ),
1887
+ new _yyRuleInfo( 183, 2 ),
1888
+ new _yyRuleInfo( 181, 3 ),
1889
+ new _yyRuleInfo( 181, 2 ),
1890
+ new _yyRuleInfo( 184, 0 ),
1891
+ new _yyRuleInfo( 184, 2 ),
1892
+ new _yyRuleInfo( 184, 2 ),
1893
+ new _yyRuleInfo( 159, 0 ),
1894
+ new _yyRuleInfo( 159, 2 ),
1895
+ new _yyRuleInfo( 185, 3 ),
1896
+ new _yyRuleInfo( 185, 2 ),
1897
+ new _yyRuleInfo( 185, 1 ),
1898
+ new _yyRuleInfo( 186, 2 ),
1899
+ new _yyRuleInfo( 186, 7 ),
1900
+ new _yyRuleInfo( 186, 5 ),
1901
+ new _yyRuleInfo( 186, 5 ),
1902
+ new _yyRuleInfo( 186, 10 ),
1903
+ new _yyRuleInfo( 188, 0 ),
1904
+ new _yyRuleInfo( 188, 1 ),
1905
+ new _yyRuleInfo( 176, 0 ),
1906
+ new _yyRuleInfo( 176, 3 ),
1907
+ new _yyRuleInfo( 189, 0 ),
1908
+ new _yyRuleInfo( 189, 2 ),
1909
+ new _yyRuleInfo( 190, 1 ),
1910
+ new _yyRuleInfo( 190, 1 ),
1911
+ new _yyRuleInfo( 190, 1 ),
1912
+ new _yyRuleInfo( 147, 4 ),
1913
+ new _yyRuleInfo( 192, 2 ),
1914
+ new _yyRuleInfo( 192, 0 ),
1915
+ new _yyRuleInfo( 147, 8 ),
1916
+ new _yyRuleInfo( 147, 4 ),
1917
+ new _yyRuleInfo( 147, 1 ),
1918
+ new _yyRuleInfo( 160, 1 ),
1919
+ new _yyRuleInfo( 160, 3 ),
1920
+ new _yyRuleInfo( 195, 1 ),
1921
+ new _yyRuleInfo( 195, 2 ),
1922
+ new _yyRuleInfo( 195, 1 ),
1923
+ new _yyRuleInfo( 194, 9 ),
1924
+ new _yyRuleInfo( 196, 1 ),
1925
+ new _yyRuleInfo( 196, 1 ),
1926
+ new _yyRuleInfo( 196, 0 ),
1927
+ new _yyRuleInfo( 204, 2 ),
1928
+ new _yyRuleInfo( 204, 0 ),
1929
+ new _yyRuleInfo( 197, 3 ),
1930
+ new _yyRuleInfo( 197, 2 ),
1931
+ new _yyRuleInfo( 197, 4 ),
1932
+ new _yyRuleInfo( 205, 2 ),
1933
+ new _yyRuleInfo( 205, 1 ),
1934
+ new _yyRuleInfo( 205, 0 ),
1935
+ new _yyRuleInfo( 198, 0 ),
1936
+ new _yyRuleInfo( 198, 2 ),
1937
+ new _yyRuleInfo( 207, 2 ),
1938
+ new _yyRuleInfo( 207, 0 ),
1939
+ new _yyRuleInfo( 206, 7 ),
1940
+ new _yyRuleInfo( 206, 7 ),
1941
+ new _yyRuleInfo( 206, 7 ),
1942
+ new _yyRuleInfo( 157, 0 ),
1943
+ new _yyRuleInfo( 157, 2 ),
1944
+ new _yyRuleInfo( 193, 2 ),
1945
+ new _yyRuleInfo( 208, 1 ),
1946
+ new _yyRuleInfo( 208, 2 ),
1947
+ new _yyRuleInfo( 208, 3 ),
1948
+ new _yyRuleInfo( 208, 4 ),
1949
+ new _yyRuleInfo( 210, 2 ),
1950
+ new _yyRuleInfo( 210, 0 ),
1951
+ new _yyRuleInfo( 209, 0 ),
1952
+ new _yyRuleInfo( 209, 3 ),
1953
+ new _yyRuleInfo( 209, 2 ),
1954
+ new _yyRuleInfo( 211, 4 ),
1955
+ new _yyRuleInfo( 211, 0 ),
1956
+ new _yyRuleInfo( 202, 0 ),
1957
+ new _yyRuleInfo( 202, 3 ),
1958
+ new _yyRuleInfo( 214, 4 ),
1959
+ new _yyRuleInfo( 214, 2 ),
1960
+ new _yyRuleInfo( 215, 1 ),
1961
+ new _yyRuleInfo( 177, 1 ),
1962
+ new _yyRuleInfo( 177, 1 ),
1963
+ new _yyRuleInfo( 177, 0 ),
1964
+ new _yyRuleInfo( 200, 0 ),
1965
+ new _yyRuleInfo( 200, 3 ),
1966
+ new _yyRuleInfo( 201, 0 ),
1967
+ new _yyRuleInfo( 201, 2 ),
1968
+ new _yyRuleInfo( 203, 0 ),
1969
+ new _yyRuleInfo( 203, 2 ),
1970
+ new _yyRuleInfo( 203, 4 ),
1971
+ new _yyRuleInfo( 203, 4 ),
1972
+ new _yyRuleInfo( 147, 5 ),
1973
+ new _yyRuleInfo( 199, 0 ),
1974
+ new _yyRuleInfo( 199, 2 ),
1975
+ new _yyRuleInfo( 147, 7 ),
1976
+ new _yyRuleInfo( 217, 5 ),
1977
+ new _yyRuleInfo( 217, 3 ),
1978
+ new _yyRuleInfo( 147, 8 ),
1979
+ new _yyRuleInfo( 147, 5 ),
1980
+ new _yyRuleInfo( 147, 6 ),
1981
+ new _yyRuleInfo( 218, 2 ),
1982
+ new _yyRuleInfo( 218, 1 ),
1983
+ new _yyRuleInfo( 220, 3 ),
1984
+ new _yyRuleInfo( 220, 1 ),
1985
+ new _yyRuleInfo( 219, 0 ),
1986
+ new _yyRuleInfo( 219, 3 ),
1987
+ new _yyRuleInfo( 213, 3 ),
1988
+ new _yyRuleInfo( 213, 1 ),
1989
+ new _yyRuleInfo( 175, 1 ),
1990
+ new _yyRuleInfo( 175, 3 ),
1991
+ new _yyRuleInfo( 174, 1 ),
1992
+ new _yyRuleInfo( 175, 1 ),
1993
+ new _yyRuleInfo( 175, 1 ),
1994
+ new _yyRuleInfo( 175, 3 ),
1995
+ new _yyRuleInfo( 175, 5 ),
1996
+ new _yyRuleInfo( 174, 1 ),
1997
+ new _yyRuleInfo( 174, 1 ),
1998
+ new _yyRuleInfo( 175, 1 ),
1999
+ new _yyRuleInfo( 175, 1 ),
2000
+ new _yyRuleInfo( 175, 3 ),
2001
+ new _yyRuleInfo( 175, 6 ),
2002
+ new _yyRuleInfo( 175, 5 ),
2003
+ new _yyRuleInfo( 175, 4 ),
2004
+ new _yyRuleInfo( 174, 1 ),
2005
+ new _yyRuleInfo( 175, 3 ),
2006
+ new _yyRuleInfo( 175, 3 ),
2007
+ new _yyRuleInfo( 175, 3 ),
2008
+ new _yyRuleInfo( 175, 3 ),
2009
+ new _yyRuleInfo( 175, 3 ),
2010
+ new _yyRuleInfo( 175, 3 ),
2011
+ new _yyRuleInfo( 175, 3 ),
2012
+ new _yyRuleInfo( 175, 3 ),
2013
+ new _yyRuleInfo( 222, 1 ),
2014
+ new _yyRuleInfo( 222, 2 ),
2015
+ new _yyRuleInfo( 222, 1 ),
2016
+ new _yyRuleInfo( 222, 2 ),
2017
+ new _yyRuleInfo( 223, 2 ),
2018
+ new _yyRuleInfo( 223, 0 ),
2019
+ new _yyRuleInfo( 175, 4 ),
2020
+ new _yyRuleInfo( 175, 2 ),
2021
+ new _yyRuleInfo( 175, 3 ),
2022
+ new _yyRuleInfo( 175, 3 ),
2023
+ new _yyRuleInfo( 175, 4 ),
2024
+ new _yyRuleInfo( 175, 2 ),
2025
+ new _yyRuleInfo( 175, 2 ),
2026
+ new _yyRuleInfo( 175, 2 ),
2027
+ new _yyRuleInfo( 175, 2 ),
2028
+ new _yyRuleInfo( 224, 1 ),
2029
+ new _yyRuleInfo( 224, 2 ),
2030
+ new _yyRuleInfo( 175, 5 ),
2031
+ new _yyRuleInfo( 225, 1 ),
2032
+ new _yyRuleInfo( 225, 2 ),
2033
+ new _yyRuleInfo( 175, 5 ),
2034
+ new _yyRuleInfo( 175, 3 ),
2035
+ new _yyRuleInfo( 175, 5 ),
2036
+ new _yyRuleInfo( 175, 4 ),
2037
+ new _yyRuleInfo( 175, 4 ),
2038
+ new _yyRuleInfo( 175, 5 ),
2039
+ new _yyRuleInfo( 227, 5 ),
2040
+ new _yyRuleInfo( 227, 4 ),
2041
+ new _yyRuleInfo( 228, 2 ),
2042
+ new _yyRuleInfo( 228, 0 ),
2043
+ new _yyRuleInfo( 226, 1 ),
2044
+ new _yyRuleInfo( 226, 0 ),
2045
+ new _yyRuleInfo( 221, 1 ),
2046
+ new _yyRuleInfo( 221, 0 ),
2047
+ new _yyRuleInfo( 216, 3 ),
2048
+ new _yyRuleInfo( 216, 1 ),
2049
+ new _yyRuleInfo( 147, 11 ),
2050
+ new _yyRuleInfo( 229, 1 ),
2051
+ new _yyRuleInfo( 229, 0 ),
2052
+ new _yyRuleInfo( 179, 0 ),
2053
+ new _yyRuleInfo( 179, 3 ),
2054
+ new _yyRuleInfo( 187, 5 ),
2055
+ new _yyRuleInfo( 187, 3 ),
2056
+ new _yyRuleInfo( 230, 0 ),
2057
+ new _yyRuleInfo( 230, 2 ),
2058
+ new _yyRuleInfo( 147, 4 ),
2059
+ new _yyRuleInfo( 147, 1 ),
2060
+ new _yyRuleInfo( 147, 2 ),
2061
+ new _yyRuleInfo( 147, 3 ),
2062
+ new _yyRuleInfo( 147, 5 ),
2063
+ new _yyRuleInfo( 147, 6 ),
2064
+ new _yyRuleInfo( 147, 5 ),
2065
+ new _yyRuleInfo( 147, 6 ),
2066
+ new _yyRuleInfo( 231, 1 ),
2067
+ new _yyRuleInfo( 231, 1 ),
2068
+ new _yyRuleInfo( 231, 1 ),
2069
+ new _yyRuleInfo( 231, 1 ),
2070
+ new _yyRuleInfo( 231, 1 ),
2071
+ new _yyRuleInfo( 170, 2 ),
2072
+ new _yyRuleInfo( 171, 2 ),
2073
+ new _yyRuleInfo( 233, 1 ),
2074
+ new _yyRuleInfo( 232, 1 ),
2075
+ new _yyRuleInfo( 232, 0 ),
2076
+ new _yyRuleInfo( 147, 5 ),
2077
+ new _yyRuleInfo( 234, 11 ),
2078
+ new _yyRuleInfo( 236, 1 ),
2079
+ new _yyRuleInfo( 236, 1 ),
2080
+ new _yyRuleInfo( 236, 2 ),
2081
+ new _yyRuleInfo( 236, 0 ),
2082
+ new _yyRuleInfo( 237, 1 ),
2083
+ new _yyRuleInfo( 237, 1 ),
2084
+ new _yyRuleInfo( 237, 3 ),
2085
+ new _yyRuleInfo( 238, 0 ),
2086
+ new _yyRuleInfo( 238, 3 ),
2087
+ new _yyRuleInfo( 239, 0 ),
2088
+ new _yyRuleInfo( 239, 2 ),
2089
+ new _yyRuleInfo( 235, 3 ),
2090
+ new _yyRuleInfo( 235, 2 ),
2091
+ new _yyRuleInfo( 241, 1 ),
2092
+ new _yyRuleInfo( 241, 3 ),
2093
+ new _yyRuleInfo( 242, 0 ),
2094
+ new _yyRuleInfo( 242, 3 ),
2095
+ new _yyRuleInfo( 242, 2 ),
2096
+ new _yyRuleInfo( 240, 7 ),
2097
+ new _yyRuleInfo( 240, 8 ),
2098
+ new _yyRuleInfo( 240, 5 ),
2099
+ new _yyRuleInfo( 240, 5 ),
2100
+ new _yyRuleInfo( 240, 1 ),
2101
+ new _yyRuleInfo( 175, 4 ),
2102
+ new _yyRuleInfo( 175, 6 ),
2103
+ new _yyRuleInfo( 191, 1 ),
2104
+ new _yyRuleInfo( 191, 1 ),
2105
+ new _yyRuleInfo( 191, 1 ),
2106
+ new _yyRuleInfo( 147, 4 ),
2107
+ new _yyRuleInfo( 147, 6 ),
2108
+ new _yyRuleInfo( 147, 3 ),
2109
+ new _yyRuleInfo( 244, 0 ),
2110
+ new _yyRuleInfo( 244, 2 ),
2111
+ new _yyRuleInfo( 243, 1 ),
2112
+ new _yyRuleInfo( 243, 0 ),
2113
+ new _yyRuleInfo( 147, 1 ),
2114
+ new _yyRuleInfo( 147, 3 ),
2115
+ new _yyRuleInfo( 147, 1 ),
2116
+ new _yyRuleInfo( 147, 3 ),
2117
+ new _yyRuleInfo( 147, 6 ),
2118
+ new _yyRuleInfo( 147, 6 ),
2119
+ new _yyRuleInfo( 245, 1 ),
2120
+ new _yyRuleInfo( 246, 0 ),
2121
+ new _yyRuleInfo( 246, 1 ),
2122
+ new _yyRuleInfo( 147, 1 ),
2123
+ new _yyRuleInfo( 147, 4 ),
2124
+ new _yyRuleInfo( 247, 7 ),
2125
+ new _yyRuleInfo( 248, 1 ),
2126
+ new _yyRuleInfo( 248, 3 ),
2127
+ new _yyRuleInfo( 249, 0 ),
2128
+ new _yyRuleInfo( 249, 2 ),
2129
+ new _yyRuleInfo( 250, 1 ),
2130
+ new _yyRuleInfo( 250, 3 ),
2131
+ new _yyRuleInfo( 251, 1 ),
2132
+ new _yyRuleInfo( 252, 0 ),
2133
+ new _yyRuleInfo( 252, 4 ),
2134
+ new _yyRuleInfo( 252, 2 ),
2135
+ };
2136
+
2137
+ //static void yy_accept(yyParser*); /* Forward Declaration */
2138
+
2139
+ /*
2140
+ ** Perform a reduce action and the shift that must immediately
2141
+ ** follow the reduce.
2142
+ */
2143
+ static void yy_reduce(
2144
+ yyParser yypParser, /* The parser */
2145
+ int yyruleno /* Number of the rule by which to reduce */
2146
+ )
2147
+ {
2148
+ int yygoto; /* The next state */
2149
+ int yyact; /* The next action */
2150
+ YYMINORTYPE yygotominor; /* The LHS of the rule reduced */
2151
+ yymsp yymsp; // yyStackEntry[] yymsp = new yyStackEntry[0]; /* The top of the parser's stack */
2152
+ int yysize; /* Amount to pop the stack */
2153
+ Parse pParse = yypParser.pParse; //sqlite3ParserARG_FETCH;
2154
+
2155
+ yymsp = new yymsp( ref yypParser, yypParser.yyidx ); // yymsp[0] = yypParser.yystack[yypParser.yyidx];
2156
+ #if !NDEBUG
2157
+ if ( yyTraceFILE != null && yyruleno >= 0
2158
+ && yyruleno < yyRuleName.Length )
2159
+ { //(int)(yyRuleName.Length/sizeof(yyRuleName[0])) ){
2160
+ fprintf( yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
2161
+ yyRuleName[yyruleno] );
2162
+ }
2163
+ #endif // * NDEBUG */
2164
+
2165
+ /* Silence complaints from purify about yygotominor being uninitialized
2166
+ ** in some cases when it is copied into the stack after the following
2167
+ ** switch. yygotominor is uninitialized when a rule reduces that does
2168
+ ** not set the value of its left-hand side nonterminal. Leaving the
2169
+ ** value of the nonterminal uninitialized is utterly harmless as long
2170
+ ** as the value is never used. So really the only thing this code
2171
+ ** accomplishes is to quieten purify.
2172
+ **
2173
+ ** 2007-01-16: The wireshark project (www.wireshark.org) reports that
2174
+ ** without this code, their parser segfaults. I'm not sure what there
2175
+ ** parser is doing to make this happen. This is the second bug report
2176
+ ** from wireshark this week. Clearly they are stressing Lemon in ways
2177
+ ** that it has not been previously stressed... (SQLite ticket #2172)
2178
+ */
2179
+ yygotominor = new YYMINORTYPE(); //memset(yygotominor, 0, yygotominor).Length;
2180
+ switch ( yyruleno )
2181
+ {
2182
+ /* Beginning here are the reduction cases. A typical example
2183
+ ** follows:
2184
+ ** case 0:
2185
+ ** //#line <lineno> <grammarfile>
2186
+ ** { ... } // User supplied code
2187
+ ** //#line <lineno> <thisfile>
2188
+ ** break;
2189
+ */
2190
+ case 5: /* explain ::= */
2191
+ //#line 107 "parse.y"
2192
+ { sqlite3BeginParse( pParse, 0 ); }
2193
+ //#line 2110 "parse.c"
2194
+ break;
2195
+ case 6: /* explain ::= EXPLAIN */
2196
+ //#line 109 "parse.y"
2197
+ { sqlite3BeginParse( pParse, 1 ); }
2198
+ //#line 2115 "parse.c"
2199
+ break;
2200
+ case 7: /* explain ::= EXPLAIN QUERY PLAN */
2201
+ //#line 110 "parse.y"
2202
+ { sqlite3BeginParse( pParse, 2 ); }
2203
+ //#line 2120 "parse.c"
2204
+ break;
2205
+ case 8: /* cmdx ::= cmd */
2206
+ //#line 112 "parse.y"
2207
+ { sqlite3FinishCoding( pParse ); }
2208
+ //#line 2125 "parse.c"
2209
+ break;
2210
+ case 9: /* cmd ::= BEGIN transtype trans_opt */
2211
+ //#line 117 "parse.y"
2212
+ { sqlite3BeginTransaction( pParse, yymsp[-1].minor.yy328 ); }
2213
+ //#line 2130 "parse.c"
2214
+ break;
2215
+ case 13: /* transtype ::= */
2216
+ //#line 122 "parse.y"
2217
+ { yygotominor.yy328 = TK_DEFERRED; }
2218
+ //#line 2135 "parse.c"
2219
+ break;
2220
+ case 14: /* transtype ::= DEFERRED */
2221
+ case 15: /* transtype ::= IMMEDIATE */ //yytestcase(yyruleno==15);
2222
+ case 16: /* transtype ::= EXCLUSIVE */ //yytestcase(yyruleno==16);
2223
+ case 115: /* multiselect_op ::= UNION */ //yytestcase(yyruleno==114);
2224
+ case 117: /* multiselect_op ::= EXCEPT|INTERSECT */ //yytestcase(yyruleno==116);
2225
+ //#line 123 "parse.y"
2226
+ { yygotominor.yy328 = yymsp[0].major; }
2227
+ //#line 2144 "parse.c"
2228
+ break;
2229
+ case 17: /* cmd ::= COMMIT trans_opt */
2230
+ case 18: /* cmd ::= END trans_opt */ //yytestcase(yyruleno==18);
2231
+ //#line 126 "parse.y"
2232
+ { sqlite3CommitTransaction( pParse ); }
2233
+ //#line 2150 "parse.c"
2234
+ break;
2235
+ case 19: /* cmd ::= ROLLBACK trans_opt */
2236
+ //#line 128 "parse.y"
2237
+ { sqlite3RollbackTransaction( pParse ); }
2238
+ //#line 2155 "parse.c"
2239
+ break;
2240
+ case 22: /* cmd ::= SAVEPOINT nm */
2241
+ //#line 132 "parse.y"
2242
+ {
2243
+ sqlite3Savepoint( pParse, SAVEPOINT_BEGIN, yymsp[0].minor.yy0 );
2244
+ }
2245
+ //#line 2162 "parse.c"
2246
+ break;
2247
+ case 23: /* cmd ::= RELEASE savepoint_opt nm */
2248
+ //#line 135 "parse.y"
2249
+ {
2250
+ sqlite3Savepoint( pParse, SAVEPOINT_RELEASE, yymsp[0].minor.yy0 );
2251
+ }
2252
+ //#line 2169 "parse.c"
2253
+ break;
2254
+ case 24: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
2255
+ //#line 138 "parse.y"
2256
+ {
2257
+ sqlite3Savepoint( pParse, SAVEPOINT_ROLLBACK, yymsp[0].minor.yy0 );
2258
+ }
2259
+ //#line 2176 "parse.c"
2260
+ break;
2261
+ case 26: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */
2262
+ //#line 145 "parse.y"
2263
+ {
2264
+ sqlite3StartTable( pParse, yymsp[-1].minor.yy0, yymsp[0].minor.yy0, yymsp[-4].minor.yy328, 0, 0, yymsp[-2].minor.yy328 );
2265
+ }
2266
+ //#line 2183 "parse.c"
2267
+ break;
2268
+ case 27: /* createkw ::= CREATE */
2269
+ //#line 148 "parse.y"
2270
+ {
2271
+ pParse.db.lookaside.bEnabled = 0;
2272
+ yygotominor.yy0 = yymsp[0].minor.yy0;
2273
+ }
2274
+ //#line 2191 "parse.c"
2275
+ break;
2276
+ case 28: /* ifnotexists ::= */
2277
+ case 31: /* temp ::= */ //yytestcase(yyruleno == 31);
2278
+ case 70: /* autoinc ::= */ //yytestcase(yyruleno == 70);
2279
+ case 83: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ //yytestcase(yyruleno == 83);
2280
+ case 85: /* init_deferred_pred_opt ::= */ //yytestcase(yyruleno == 85);
2281
+ case 87: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */ //yytestcase(yyruleno == 87);
2282
+ case 98: /* defer_subclause_opt ::= */ //yytestcase(yyruleno == 98);
2283
+ case 109: /* ifexists ::= */ //yytestcase(yyruleno == 109);
2284
+ case 120: /* distinct ::= ALL */ //yytestcase(yyruleno == 120);
2285
+ case 121: /* distinct ::= */ //yytestcase(yyruleno == 121);
2286
+ case 223: /* between_op ::= BETWEEN */ //yytestcase(yyruleno == 223);
2287
+ case 226: /* in_op ::= IN */ //yytestcase(yyruleno == 226);
2288
+ //#line 153 "parse.y"
2289
+ { yygotominor.yy328 = 0; }
2290
+ //#line 2207 "parse.c"
2291
+ break;
2292
+ case 29: /* ifnotexists ::= IF NOT EXISTS */
2293
+ case 30: /* temp ::= TEMP */ //yytestcase(yyruleno == 30);
2294
+ case 71: /* autoinc ::= AUTOINCR */ //yytestcase(yyruleno == 71);
2295
+ case 86: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ //yytestcase(yyruleno == 86);
2296
+ case 108: /* ifexists ::= IF EXISTS */ //yytestcase(yyruleno == 108);
2297
+ case 119: /* distinct ::= DISTINCT */ //yytestcase(yyruleno == 119);
2298
+ case 224: /* between_op ::= NOT BETWEEN */ //yytestcase(yyruleno == 224);
2299
+ case 227: /* in_op ::= NOT IN */ //yytestcase(yyruleno == 227);
2300
+ //#line 154 "parse.y"
2301
+ { yygotominor.yy328 = 1; }
2302
+ //#line 2219 "parse.c"
2303
+ break;
2304
+ case 32: /* create_table_args ::= LP columnlist conslist_opt RP */
2305
+ //#line 160 "parse.y"
2306
+ {
2307
+ sqlite3EndTable( pParse, yymsp[-1].minor.yy0, yymsp[0].minor.yy0, 0 );
2308
+ }
2309
+ //#line 2226 "parse.c"
2310
+ break;
2311
+ case 33: /* create_table_args ::= AS select */
2312
+ //#line 163 "parse.y"
2313
+ {
2314
+ sqlite3EndTable( pParse, 0, 0, yymsp[0].minor.yy3 );
2315
+ sqlite3SelectDelete( pParse.db, ref yymsp[0].minor.yy3 );
2316
+ }
2317
+ //#line 2234 "parse.c"
2318
+ break;
2319
+ case 36: /* column ::= columnid type carglist */
2320
+ //#line 175 "parse.y"
2321
+ {
2322
+ //yygotominor.yy0.z = yymsp[-2].minor.yy0.z;
2323
+ //yygotominor.yy0.n = (int)( pParse->sLastToken.z - yymsp[-2].minor.yy0.z ) + pParse->sLastToken.n;
2324
+ yygotominor.yy0.n = (int)( yymsp[-2].minor.yy0.z.Length - pParse.sLastToken.z.Length ) + pParse.sLastToken.n;
2325
+ yygotominor.yy0.z = yymsp[-2].minor.yy0.z.Substring( 0, yygotominor.yy0.n );
2326
+ }
2327
+ //#line 2242 "parse.c"
2328
+ break;
2329
+ case 37: /* columnid ::= nm */
2330
+ //#line 179 "parse.y"
2331
+ {
2332
+ sqlite3AddColumn( pParse, yymsp[0].minor.yy0 );
2333
+ yygotominor.yy0 = yymsp[0].minor.yy0;
2334
+ }
2335
+ //#line 2250 "parse.c"
2336
+ break;
2337
+ case 38: /* id ::= ID */
2338
+ case 39: /* id ::= INDEXED */ //yytestcase(yyruleno==39);
2339
+ case 40: /* ids ::= ID|STRING */ //yytestcase(yyruleno==40);
2340
+ case 41: /* nm ::= id */ //yytestcase(yyruleno==41);
2341
+ case 42: /* nm ::= STRING */ //yytestcase(yyruleno==42);
2342
+ case 43: /* nm ::= JOIN_KW */ //yytestcase(yyruleno==43);
2343
+ case 46: /* typetoken ::= typename */ //yytestcase(yyruleno==46);
2344
+ case 49: /* typename ::= ids */ //yytestcase(yyruleno==49);
2345
+ case 127: /* as ::= AS nm */ ////yytestcase(yyruleno == 127);
2346
+ case 128: /* as ::= ids */ ////yytestcase(yyruleno == 128);
2347
+ case 138: /* dbnm ::= DOT nm */ ////yytestcase(yyruleno == 138);
2348
+ case 147: /* indexed_opt ::= INDEXED BY nm */ ////yytestcase(yyruleno == 147);
2349
+ case 252: /* collate ::= COLLATE ids */ ////yytestcase(yyruleno == 252);
2350
+ case 261: /* nmnum ::= plus_num */ ////yytestcase(yyruleno == 261);
2351
+ case 262: /* nmnum ::= nm */ ////yytestcase(yyruleno == 262);
2352
+ case 263: /* nmnum ::= ON */ ////yytestcase(yyruleno == 263);
2353
+ case 264: /* nmnum ::= DELETE */ ////yytestcase(yyruleno == 264);
2354
+ case 265: /* nmnum ::= DEFAULT */ ////yytestcase(yyruleno == 265);
2355
+ case 266: /* plus_num ::= plus_opt number */ ////yytestcase(yyruleno == 266);
2356
+ case 267: /* minus_num ::= MINUS number */ ////yytestcase(yyruleno == 267);
2357
+ case 268: /* number ::= INTEGER|FLOAT */ ////yytestcase(yyruleno == 268);
2358
+ case 286: /* trnm ::= nm */ ////yytestcase(yyruleno == 286);
2359
+ //#line 189 "parse.y"
2360
+ { yygotominor.yy0 = yymsp[0].minor.yy0; }
2361
+ //#line 2276 "parse.c"
2362
+ break;
2363
+ case 45: /* type ::= typetoken */
2364
+ //#line 251 "parse.y"
2365
+ { sqlite3AddColumnType( pParse, yymsp[0].minor.yy0 ); }
2366
+ //#line 2281 "parse.c"
2367
+ break;
2368
+ case 47: /* typetoken ::= typename LP signed RP */
2369
+ //#line 253 "parse.y"
2370
+ {
2371
+ //yygotominor.yy0.z = yymsp[-3].minor.yy0.z;
2372
+ //yygotominor.yy0.n = (int)( &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z );
2373
+ yygotominor.yy0.n = yymsp[-3].minor.yy0.z.Length - yymsp[0].minor.yy0.z.Length + yymsp[0].minor.yy0.n;
2374
+ yygotominor.yy0.z = yymsp[-3].minor.yy0.z.Substring( 0, yygotominor.yy0.n );
2375
+ }
2376
+ //#line 2289 "parse.c"
2377
+ break;
2378
+ case 48: /* typetoken ::= typename LP signed COMMA signed RP */
2379
+ //#line 257 "parse.y"
2380
+ {
2381
+ //yygotominor.yy0.z = yymsp[-5].minor.yy0.z;
2382
+ //yygotominor.yy0.n = (int)( &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z );
2383
+ yygotominor.yy0.n = yymsp[-5].minor.yy0.z.Length - yymsp[0].minor.yy0.z.Length + 1;
2384
+ yygotominor.yy0.z = yymsp[-5].minor.yy0.z.Substring( 0, yygotominor.yy0.n );
2385
+ }
2386
+ //#line 2297 "parse.c"
2387
+ break;
2388
+ case 50: /* typename ::= typename ids */
2389
+ //#line 263 "parse.y"
2390
+ {
2391
+ //yygotominor.yy0.z=yymsp[-1].minor.yy0.z; yygotominor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);
2392
+ yygotominor.yy0.z = yymsp[-1].minor.yy0.z;
2393
+ yygotominor.yy0.n = yymsp[0].minor.yy0.n + (int)( yymsp[-1].minor.yy0.z.Length - yymsp[0].minor.yy0.z.Length );
2394
+ }
2395
+ //#line 2202 "parse.c"
2396
+ break;
2397
+ case 57: /* ccons ::= DEFAULT term */
2398
+ case 59: /* ccons ::= DEFAULT PLUS term */ //yytestcase(yyruleno==59);
2399
+ //#line 274 "parse.y"
2400
+ { sqlite3AddDefaultValue( pParse, yymsp[0].minor.yy346 ); }
2401
+ //#line 2308 "parse.c"
2402
+ break;
2403
+ case 58: /* ccons ::= DEFAULT LP expr RP */
2404
+ //#line 275 "parse.y"
2405
+ { sqlite3AddDefaultValue( pParse, yymsp[-1].minor.yy346 ); }
2406
+ //#line 2313 "parse.c"
2407
+ break;
2408
+ case 60: /* ccons ::= DEFAULT MINUS term */
2409
+ //#line 277 "parse.y"
2410
+ {
2411
+ ExprSpan v = new ExprSpan();
2412
+ v.pExpr = sqlite3PExpr( pParse, TK_UMINUS, yymsp[0].minor.yy346.pExpr, 0, 0 );
2413
+ v.zStart = yymsp[-1].minor.yy0.z;
2414
+ v.zEnd = yymsp[0].minor.yy346.zEnd;
2415
+ sqlite3AddDefaultValue( pParse, v );
2416
+ }
2417
+ //#line 2324 "parse.c"
2418
+ break;
2419
+ case 61: /* ccons ::= DEFAULT id */
2420
+ //#line 284 "parse.y"
2421
+ {
2422
+ ExprSpan v = new ExprSpan();
2423
+ spanExpr( v, pParse, TK_STRING, yymsp[0].minor.yy0 );
2424
+ sqlite3AddDefaultValue( pParse, v );
2425
+ }
2426
+ //#line 2333"parse.c"
2427
+ break;
2428
+ case 63: /* ccons ::= NOT NULL onconf */
2429
+ //#line 294 "parse.y"
2430
+ { sqlite3AddNotNull( pParse, yymsp[0].minor.yy328 ); }
2431
+ //#line 2338 "parse.c"
2432
+ break;
2433
+ case 64: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
2434
+ //#line 296 "parse.y"
2435
+ { sqlite3AddPrimaryKey( pParse, 0, yymsp[-1].minor.yy328, yymsp[0].minor.yy328, yymsp[-2].minor.yy328 ); }
2436
+ //#line 2343 "parse.c"
2437
+ break;
2438
+ case 65: /* ccons ::= UNIQUE onconf */
2439
+ //#line 297 "parse.y"
2440
+ { sqlite3CreateIndex( pParse, 0, 0, 0, 0, yymsp[0].minor.yy328, 0, 0, 0, 0 ); }
2441
+ //#line 2348 "parse.c"
2442
+ break;
2443
+ case 66: /* ccons ::= CHECK LP expr RP */
2444
+ //#line 298 "parse.y"
2445
+ { sqlite3AddCheckConstraint( pParse, yymsp[-1].minor.yy346.pExpr ); }
2446
+ //#line 2353 "parse.c"
2447
+ break;
2448
+ case 67: /* ccons ::= REFERENCES nm idxlist_opt refargs */
2449
+ //#line 300 "parse.y"
2450
+ { sqlite3CreateForeignKey( pParse, 0, yymsp[-2].minor.yy0, yymsp[-1].minor.yy14, yymsp[0].minor.yy328 ); }
2451
+ //#line 2358 "parse.c"
2452
+ break;
2453
+ case 68: /* ccons ::= defer_subclause */
2454
+ //#line 301 "parse.y"
2455
+ { sqlite3DeferForeignKey( pParse, yymsp[0].minor.yy328 ); }
2456
+ //#line 2363 "parse.c"
2457
+ break;
2458
+ case 69: /* ccons ::= COLLATE ids */
2459
+ //#line 302 "parse.y"
2460
+ { sqlite3AddCollateType( pParse, yymsp[0].minor.yy0 ); }
2461
+ //#line 2368 "parse.c"
2462
+ break;
2463
+ case 72: /* refargs ::= */
2464
+ //#line 315 "parse.y"
2465
+ { yygotominor.yy328 = OE_None * 0x0101; /* EV: R-19803-45884 */}
2466
+ //#line 2373 "parse.c"
2467
+ break;
2468
+ case 73: /* refargs ::= refargs refarg */
2469
+ //#line 316 "parse.y"
2470
+ { yygotominor.yy328 = ( yymsp[-1].minor.yy328 & ~yymsp[0].minor.yy429.mask ) | yymsp[0].minor.yy429.value; }
2471
+ //#line 2378 "parse.c"
2472
+ break;
2473
+ case 74: /* refarg ::= MATCH nm */
2474
+ case 75: /* refarg ::= ON INSERT refact */ //yytestcase(yyruleno == 75);
2475
+ //#line 318 "parse.y"
2476
+ { yygotominor.yy429.value = 0; yygotominor.yy429.mask = 0x000000; }
2477
+ //#line 2384 "parse.c"
2478
+ break;
2479
+ case 76: /* refarg ::= ON DELETE refact */
2480
+ //#line 320 "parse.y"
2481
+ { yygotominor.yy429.value = yymsp[0].minor.yy328; yygotominor.yy429.mask = 0x0000ff; }
2482
+ //#line 2389 "parse.c"
2483
+ break;
2484
+ case 77: /* refarg ::= ON UPDATE refact */
2485
+ //#line 321 "parse.y"
2486
+ { yygotominor.yy429.value = yymsp[0].minor.yy328 << 8; yygotominor.yy429.mask = 0x00ff00; }
2487
+ //#line 2394 "parse.c"
2488
+ break;
2489
+ case 78: /* refact ::= SET NULL */
2490
+ //#line 323 "parse.y"
2491
+ { yygotominor.yy328 = OE_SetNull; /* EV: R-33326-45252 */}
2492
+ //#line 2399 "parse.c"
2493
+ break;
2494
+ case 79: /* refact ::= SET DEFAULT */
2495
+ //#line 324 "parse.y"
2496
+ { yygotominor.yy328 = OE_SetDflt; /* EV: R-33326-45252 */}
2497
+ //#line 2404 "parse.c"
2498
+ break;
2499
+ case 80: /* refact ::= CASCADE */
2500
+ //#line 325 "parse.y"
2501
+ { yygotominor.yy328 = OE_Cascade; /* EV: R-33326-45252 */}
2502
+ //#line 2409 "parse.c"
2503
+ break;
2504
+ case 81: /* refact ::= RESTRICT */
2505
+ //#line 326 "parse.y"
2506
+ { yygotominor.yy328 = OE_Restrict; /* EV: R-33326-45252 */}
2507
+ //#line 2414 "parse.c"
2508
+ break;
2509
+ case 82: /* refact ::= NO ACTION */
2510
+ //#line 327 "parse.y"
2511
+ { yygotominor.yy328 = OE_None; /* EV: R-33326-45252 */}
2512
+ //#line 2419 "parse.c"
2513
+ break;
2514
+ case 84: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
2515
+ case 99: /* defer_subclause_opt ::= defer_subclause */ //yytestcase(yyruleno==99);
2516
+ case 101: /* onconf ::= ON CONFLICT resolvetype */ //yytestcase(yyruleno==101);
2517
+ case 104: /* resolvetype ::= raisetype */ //yytestcase(yyruleno==104);
2518
+ //#line 330 "parse.y"
2519
+ { yygotominor.yy328 = yymsp[0].minor.yy328; }
2520
+ //#line 2427 "parse.c"
2521
+ break;
2522
+ case 88: /* conslist_opt ::= */
2523
+ //#line 339 "parse.y"
2524
+ { yygotominor.yy0.n = 0; yygotominor.yy0.z = null; }
2525
+ //#line 2432 "parse.c"
2526
+ break;
2527
+ case 89: /* conslist_opt ::= COMMA conslist */
2528
+ //#line 340 "parse.y"
2529
+ { yygotominor.yy0 = yymsp[-1].minor.yy0; }
2530
+ //#line 2437 "parse.c"
2531
+ break;
2532
+ case 94: /* tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf */
2533
+ //#line 346 "parse.y"
2534
+ { sqlite3AddPrimaryKey( pParse, yymsp[-3].minor.yy14, yymsp[0].minor.yy328, yymsp[-2].minor.yy328, 0 ); }
2535
+ //#line 2442 "parse.c"
2536
+ break;
2537
+ case 95: /* tcons ::= UNIQUE LP idxlist RP onconf */
2538
+ //#line 348 "parse.y"
2539
+ { sqlite3CreateIndex( pParse, 0, 0, 0, yymsp[-2].minor.yy14, yymsp[0].minor.yy328, 0, 0, 0, 0 ); }
2540
+ //#line 2447 "parse.c"
2541
+ break;
2542
+ case 96: /* tcons ::= CHECK LP expr RP onconf */
2543
+ //#line 350 "parse.y"
2544
+ { sqlite3AddCheckConstraint( pParse, yymsp[-2].minor.yy346.pExpr ); }
2545
+ //#line 2452 "parse.c"
2546
+ break;
2547
+ case 97: /* tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt */
2548
+ //#line 352 "parse.y"
2549
+ {
2550
+ sqlite3CreateForeignKey( pParse, yymsp[-6].minor.yy14, yymsp[-3].minor.yy0, yymsp[-2].minor.yy14, yymsp[-1].minor.yy328 );
2551
+ sqlite3DeferForeignKey( pParse, yymsp[0].minor.yy328 );
2552
+ }
2553
+ //#line 2460 "parse.c"
2554
+ break;
2555
+ case 100: /* onconf ::= */
2556
+ //#line 366 "parse.y"
2557
+ { yygotominor.yy328 = OE_Default; }
2558
+ //#line 2465 "parse.c"
2559
+ break;
2560
+ case 102: /* orconf ::= */
2561
+ //#line 368 "parse.y"
2562
+ { yygotominor.yy186 = OE_Default; }
2563
+ //#line 2470 "parse.c"
2564
+ break;
2565
+ case 103: /* orconf ::= OR resolvetype */
2566
+ //#line 369 "parse.y"
2567
+ { yygotominor.yy186 = (u8)yymsp[0].minor.yy328; }
2568
+ //#line 2475 "parse.c"
2569
+ break;
2570
+ case 105: /* resolvetype ::= IGNORE */
2571
+ //#line 371 "parse.y"
2572
+ { yygotominor.yy328 = OE_Ignore; }
2573
+ //#line 2480 "parse.c"
2574
+ break;
2575
+ case 106: /* resolvetype ::= REPLACE */
2576
+ //#line 372 "parse.y"
2577
+ { yygotominor.yy328 = OE_Replace; }
2578
+ //#line 2485 "parse.c"
2579
+ break;
2580
+ case 107: /* cmd ::= DROP TABLE ifexists fullname */
2581
+ //#line 376 "parse.y"
2582
+ {
2583
+ sqlite3DropTable( pParse, yymsp[0].minor.yy65, 0, yymsp[-1].minor.yy328 );
2584
+ }
2585
+ //#line 2492 "parse.c"
2586
+ break;
2587
+ case 110: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm AS select */
2588
+ //#line 386 "parse.y"
2589
+ {
2590
+ sqlite3CreateView( pParse, yymsp[-7].minor.yy0, yymsp[-3].minor.yy0, yymsp[-2].minor.yy0, yymsp[0].minor.yy3, yymsp[-6].minor.yy328, yymsp[-4].minor.yy328 );
2591
+ }
2592
+ //#line 2499 "parse.c"
2593
+ break;
2594
+ case 111: /* cmd ::= DROP VIEW ifexists fullname */
2595
+ //#line 389 "parse.y"
2596
+ {
2597
+ sqlite3DropTable( pParse, yymsp[0].minor.yy65, 1, yymsp[-1].minor.yy328 );
2598
+ }
2599
+ //#line 2506 "parse.c"
2600
+ break;
2601
+ case 112: /* cmd ::= select */
2602
+ //#line 396 "parse.y"
2603
+ {
2604
+ SelectDest dest = new SelectDest( SRT_Output, '\0', 0, 0, 0 );
2605
+ sqlite3Select( pParse, yymsp[0].minor.yy3, ref dest );
2606
+ sqlite3SelectDelete( pParse.db, ref yymsp[0].minor.yy3 );
2607
+ }
2608
+ //#line 2515 "parse.c"
2609
+ break;
2610
+ case 113: /* select ::= oneselect */
2611
+ //#line 407 "parse.y"
2612
+ { yygotominor.yy3 = yymsp[0].minor.yy3; }
2613
+ //#line 2520 "parse.c"
2614
+ break;
2615
+ case 114: /* select ::= select multiselect_op oneselect */
2616
+ //#line 409 "parse.y"
2617
+ {
2618
+ if ( yymsp[0].minor.yy3 != null )
2619
+ {
2620
+ yymsp[0].minor.yy3.op = (u8)yymsp[-1].minor.yy328;
2621
+ yymsp[0].minor.yy3.pPrior = yymsp[-2].minor.yy3;
2622
+ }
2623
+ else
2624
+ {
2625
+ sqlite3SelectDelete( pParse.db, ref yymsp[-2].minor.yy3 );
2626
+ }
2627
+ yygotominor.yy3 = yymsp[0].minor.yy3;
2628
+ }
2629
+ //#line 2533 "parse.c"
2630
+ break;
2631
+ case 116: /* multiselect_op ::= UNION ALL */
2632
+ //#line 420 "parse.y"
2633
+ { yygotominor.yy328 = TK_ALL; }
2634
+ //#line 2538 "parse.c"
2635
+ break;
2636
+ case 118: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
2637
+ //#line 424 "parse.y"
2638
+ {
2639
+ yygotominor.yy3 = sqlite3SelectNew( pParse, yymsp[-6].minor.yy14, yymsp[-5].minor.yy65, yymsp[-4].minor.yy132, yymsp[-3].minor.yy14, yymsp[-2].minor.yy132, yymsp[-1].minor.yy14, yymsp[-7].minor.yy328, yymsp[0].minor.yy476.pLimit, yymsp[0].minor.yy476.pOffset );
2640
+ }
2641
+ //#line 2545 "parse.c"
2642
+ break;
2643
+ case 122: /* sclp ::= selcollist COMMA */
2644
+ case 248: /* idxlist_opt ::= LP idxlist RP */ //yytestcase(yyruleno==248);
2645
+ //#line 445 "parse.y"
2646
+ { yygotominor.yy14 = yymsp[-1].minor.yy14; }
2647
+ //#line 2551 "parse.c"
2648
+ break;
2649
+ case 123: /* sclp ::= */
2650
+ case 151: /* orderby_opt ::= */ //yytestcase(yyruleno==151);
2651
+ case 159: /* groupby_opt ::= */ //yytestcase(yyruleno==159);
2652
+ case 241: /* exprlist ::= */ //yytestcase(yyruleno==241);
2653
+ case 247: /* idxlist_opt ::= */ //yytestcase(yyruleno==247);
2654
+ //#line 446 "parse.y"
2655
+ { yygotominor.yy14 = null; }
2656
+ //#line 2560 "parse.c"
2657
+ break;
2658
+ case 124: /* selcollist ::= sclp expr as */
2659
+ //#line 447 "parse.y"
2660
+ {
2661
+ yygotominor.yy14 = sqlite3ExprListAppend( pParse, yymsp[-2].minor.yy14, yymsp[-1].minor.yy346.pExpr );
2662
+ if ( yymsp[0].minor.yy0.n > 0 ) sqlite3ExprListSetName( pParse, yygotominor.yy14, yymsp[0].minor.yy0, 1 );
2663
+ sqlite3ExprListSetSpan( pParse, yygotominor.yy14, yymsp[-1].minor.yy346 );
2664
+ }
2665
+ //#line 2569 "parse.c"
2666
+ break;
2667
+ case 125: /* selcollist ::= sclp STAR */
2668
+ //#line 452 "parse.y"
2669
+ {
2670
+ Expr p = sqlite3Expr( pParse.db, TK_ALL, null );
2671
+ yygotominor.yy14 = sqlite3ExprListAppend( pParse, yymsp[-1].minor.yy14, p );
2672
+ }
2673
+ //#line 2577 "parse.c"
2674
+ break;
2675
+ case 126: /* selcollist ::= sclp nm DOT STAR */
2676
+ //#line 456 "parse.y"
2677
+ {
2678
+ Expr pRight = sqlite3PExpr( pParse, TK_ALL, 0, 0, yymsp[0].minor.yy0 );
2679
+ Expr pLeft = sqlite3PExpr( pParse, TK_ID, 0, 0, yymsp[-2].minor.yy0 );
2680
+ Expr pDot = sqlite3PExpr( pParse, TK_DOT, pLeft, pRight, 0 );
2681
+ yygotominor.yy14 = sqlite3ExprListAppend( pParse, yymsp[-3].minor.yy14, pDot );
2682
+ }
2683
+ //#line 2587 "parse.c"
2684
+ break;
2685
+ case 129: /* as ::= */
2686
+ //#line 469 "parse.y"
2687
+ { yygotominor.yy0.n = 0; }
2688
+ //#line 2592 "parse.c"
2689
+ break;
2690
+ case 130: /* from ::= */
2691
+ //#line 481 "parse.y"
2692
+ { yygotominor.yy65 = new SrcList(); }//sqlite3DbMallocZero(pParse.db, sizeof(*yygotominor.yy65));}
2693
+ //#line 2597 "parse.c"
2694
+ break;
2695
+ case 131: /* from ::= FROM seltablist */
2696
+ //#line 482 "parse.y"
2697
+ {
2698
+ yygotominor.yy65 = yymsp[0].minor.yy65;
2699
+ sqlite3SrcListShiftJoinType( yygotominor.yy65 );
2700
+ }
2701
+ //#line 2605 "parse.c"
2702
+ break;
2703
+ case 132: /* stl_prefix ::= seltablist joinop */
2704
+ //#line 490 "parse.y"
2705
+ {
2706
+ yygotominor.yy65 = yymsp[-1].minor.yy65;
2707
+ if ( ALWAYS( yygotominor.yy65 != null && yygotominor.yy65.nSrc > 0 ) ) yygotominor.yy65.a[yygotominor.yy65.nSrc - 1].jointype = (u8)yymsp[0].minor.yy328;
2708
+ }
2709
+ //#line 2613 "parse.c"
2710
+ break;
2711
+ case 133: /* stl_prefix ::= */
2712
+ //#line 494 "parse.y"
2713
+ { yygotominor.yy65 = null; }
2714
+ //#line 2618 "parse.c"
2715
+ break;
2716
+ case 134: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
2717
+ //#line 495 "parse.y"
2718
+ {
2719
+ yygotominor.yy65 = sqlite3SrcListAppendFromTerm( pParse, yymsp[-6].minor.yy65, yymsp[-5].minor.yy0, yymsp[-4].minor.yy0, yymsp[-3].minor.yy0, 0, yymsp[-1].minor.yy132, yymsp[0].minor.yy408 );
2720
+ sqlite3SrcListIndexedBy( pParse, yygotominor.yy65, yymsp[-2].minor.yy0 );
2721
+ }
2722
+ //#line 2626 "parse.c"
2723
+ break;
2724
+ case 135: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */
2725
+ //#line 501 "parse.y"
2726
+ {
2727
+ yygotominor.yy65 = sqlite3SrcListAppendFromTerm( pParse, yymsp[-6].minor.yy65, 0, 0, yymsp[-2].minor.yy0, yymsp[-4].minor.yy3, yymsp[-1].minor.yy132, yymsp[0].minor.yy408 );
2728
+ }
2729
+ //#line 2633 "parse.c"
2730
+ break;
2731
+ case 136: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
2732
+ //#line 505 "parse.y"
2733
+ {
2734
+ if ( yymsp[-6].minor.yy65 == null && yymsp[-2].minor.yy0.n == 0 && yymsp[-1].minor.yy132 == null && yymsp[0].minor.yy408 == null )
2735
+ {
2736
+ yygotominor.yy65 = yymsp[-4].minor.yy65;
2737
+ }
2738
+ else
2739
+ {
2740
+ Select pSubquery;
2741
+ sqlite3SrcListShiftJoinType( yymsp[-4].minor.yy65 );
2742
+ pSubquery = sqlite3SelectNew( pParse, 0, yymsp[-4].minor.yy65, 0, 0, 0, 0, 0, 0, 0 );
2743
+ yygotominor.yy65 = sqlite3SrcListAppendFromTerm( pParse, yymsp[-6].minor.yy65, 0, 0, yymsp[-2].minor.yy0, pSubquery, yymsp[-1].minor.yy132, yymsp[0].minor.yy408 );
2744
+ }
2745
+ }
2746
+ //#line 2647 "parse.c"
2747
+ break;
2748
+ case 137: /* dbnm ::= */
2749
+ case 146: /* indexed_opt ::= */ //yytestcase(yyruleno==146);
2750
+ //#line 530 "parse.y"
2751
+ { yygotominor.yy0.z = null; yygotominor.yy0.n = 0; }
2752
+ //#line 2653 "parse.c"
2753
+ break;
2754
+ case 139: /* fullname ::= nm dbnm */
2755
+ //#line 535 "parse.y"
2756
+ { yygotominor.yy65 = sqlite3SrcListAppend( pParse.db, 0, yymsp[-1].minor.yy0, yymsp[0].minor.yy0 ); }
2757
+ //#line 2658 "parse.c"
2758
+ break;
2759
+ case 140: /* joinop ::= COMMA|JOIN */
2760
+ //#line 539 "parse.y"
2761
+ { yygotominor.yy328 = JT_INNER; }
2762
+ //#line 2663 "parse.c"
2763
+ break;
2764
+ case 141: /* joinop ::= JOIN_KW JOIN */
2765
+ //#line 540 "parse.y"
2766
+ { yygotominor.yy328 = sqlite3JoinType( pParse, yymsp[-1].minor.yy0, 0, 0 ); }
2767
+ //#line 2668 "parse.c"
2768
+ break;
2769
+ case 142: /* joinop ::= JOIN_KW nm JOIN */
2770
+ //#line 541 "parse.y"
2771
+ { yygotominor.yy328 = sqlite3JoinType( pParse, yymsp[-2].minor.yy0, yymsp[-1].minor.yy0, 0 ); }
2772
+ //#line 2673 "parse.c"
2773
+ break;
2774
+ case 143: /* joinop ::= JOIN_KW nm nm JOIN */
2775
+ //#line 543 "parse.y"
2776
+ { yygotominor.yy328 = sqlite3JoinType( pParse, yymsp[-3].minor.yy0, yymsp[-2].minor.yy0, yymsp[-1].minor.yy0 ); }
2777
+ //#line 2678 "parse.c"
2778
+ break;
2779
+ case 144: /* on_opt ::= ON expr */
2780
+ case 155: /* sortitem ::= expr */ //yytestcase(yyruleno==155);
2781
+ case 162: /* having_opt ::= HAVING expr */ //yytestcase(yyruleno==162);
2782
+ case 169: /* where_opt ::= WHERE expr */ //yytestcase(yyruleno==169);
2783
+ case 236: /* case_else ::= ELSE expr */ //yytestcase(yyruleno==236);
2784
+ case 238: /* case_operand ::= expr */ //yytestcase(yyruleno==238);
2785
+ //#line 547 "parse.y"
2786
+ { yygotominor.yy132 = yymsp[0].minor.yy346.pExpr; }
2787
+ //#line 2688 "parse.c"
2788
+ break;
2789
+ case 145: /* on_opt ::= */
2790
+ case 161: /* having_opt ::= */ //yytestcase(yyruleno==161);
2791
+ case 168: /* where_opt ::= */ //yytestcase(yyruleno==168);
2792
+ case 237: /* case_else ::= */ //yytestcase(yyruleno==237);
2793
+ case 239: /* case_operand ::= */ //yytestcase(yyruleno==239);
2794
+ //#line 548 "parse.y"
2795
+ { yygotominor.yy132 = null; }
2796
+ //#line 2697 "parse.c"
2797
+ break;
2798
+ case 148: /* indexed_opt ::= NOT INDEXED */
2799
+ //#line 563 "parse.y"
2800
+ { yygotominor.yy0.z = null; yygotominor.yy0.n = 1; }
2801
+ //#line 2702 "parse.c"
2802
+ break;
2803
+ case 149: /* using_opt ::= USING LP inscollist RP */
2804
+ case 181: /* inscollist_opt ::= LP inscollist RP */ //yytestcase(yyruleno==181);
2805
+ //#line 567 "parse.y"
2806
+ { yygotominor.yy408 = yymsp[-1].minor.yy408; }
2807
+ //#line 2708 "parse.c"
2808
+ break;
2809
+ case 150: /* using_opt ::= */
2810
+ case 180: /* inscollist_opt ::= */ //yytestcase(yyruleno==180);
2811
+ //#line 568 "parse.y"
2812
+ { yygotominor.yy408 = null; }
2813
+ //#line 2714 "parse.c"
2814
+ break;
2815
+ case 152: /* orderby_opt ::= ORDER BY sortlist */
2816
+ case 160: /* groupby_opt ::= GROUP BY nexprlist */ //yytestcase(yyruleno==160);
2817
+ case 240: /* exprlist ::= nexprlist */ //yytestcase(yyruleno==240);
2818
+ //#line 579 "parse.y"
2819
+ { yygotominor.yy14 = yymsp[0].minor.yy14; }
2820
+ //#line 2721 "parse.c"
2821
+ break;
2822
+ case 153: /* sortlist ::= sortlist COMMA sortitem sortorder */
2823
+ //#line 580 "parse.y"
2824
+ {
2825
+ yygotominor.yy14 = sqlite3ExprListAppend( pParse, yymsp[-3].minor.yy14, yymsp[-1].minor.yy132 );
2826
+ if ( yygotominor.yy14 != null ) yygotominor.yy14.a[yygotominor.yy14.nExpr - 1].sortOrder = (u8)yymsp[0].minor.yy328;
2827
+ }
2828
+ //#line 2729 "parse.c"
2829
+ break;
2830
+ case 154: /* sortlist ::= sortitem sortorder */
2831
+ //#line 584 "parse.y"
2832
+ {
2833
+ yygotominor.yy14 = sqlite3ExprListAppend( pParse, 0, yymsp[-1].minor.yy132 );
2834
+ if ( yygotominor.yy14 != null && ALWAYS( yygotominor.yy14.a != null ) ) yygotominor.yy14.a[0].sortOrder = (u8)yymsp[0].minor.yy328;
2835
+ }
2836
+ //#line 2737 "parse.c"
2837
+ break;
2838
+ case 156: /* sortorder ::= ASC */
2839
+ case 158: /* sortorder ::= */ //yytestcase(yyruleno==158);
2840
+ //#line 592 "parse.y"
2841
+ { yygotominor.yy328 = SQLITE_SO_ASC; }
2842
+ //#line 2743 "parse.c"
2843
+ break;
2844
+ case 157: /* sortorder ::= DESC */
2845
+ //#line 593 "parse.y"
2846
+ { yygotominor.yy328 = SQLITE_SO_DESC; }
2847
+ //#line 2748 "parse.c"
2848
+ break;
2849
+ case 163: /* limit_opt ::= */
2850
+ //#line 619 "parse.y"
2851
+ { yygotominor.yy476.pLimit = null; yygotominor.yy476.pOffset = null; }
2852
+ //#line 2753 "parse.c"
2853
+ break;
2854
+ case 164: /* limit_opt ::= LIMIT expr */
2855
+ //#line 620 "parse.y"
2856
+ { yygotominor.yy476.pLimit = yymsp[0].minor.yy346.pExpr; yygotominor.yy476.pOffset = null; }
2857
+ //#line 2758 "parse.c"
2858
+ break;
2859
+ case 165: /* limit_opt ::= LIMIT expr OFFSET expr */
2860
+ //#line 622 "parse.y"
2861
+ { yygotominor.yy476.pLimit = yymsp[-2].minor.yy346.pExpr; yygotominor.yy476.pOffset = yymsp[0].minor.yy346.pExpr; }
2862
+ //#line 2763 "parse.c"
2863
+ break;
2864
+ case 166: /* limit_opt ::= LIMIT expr COMMA expr */
2865
+ //#line 624 "parse.y"
2866
+ { yygotominor.yy476.pOffset = yymsp[-2].minor.yy346.pExpr; yygotominor.yy476.pLimit = yymsp[0].minor.yy346.pExpr; }
2867
+ //#line 2768 "parse.c"
2868
+ break;
2869
+ case 167: /* cmd ::= DELETE FROM fullname indexed_opt where_opt */
2870
+ //#line 637 "parse.y"
2871
+ {
2872
+ sqlite3SrcListIndexedBy( pParse, yymsp[-2].minor.yy65, yymsp[-1].minor.yy0 );
2873
+ sqlite3DeleteFrom( pParse, yymsp[-2].minor.yy65, yymsp[0].minor.yy132 );
2874
+ }
2875
+ //#line 2776 "parse.c"
2876
+ break;
2877
+ case 170: /* cmd ::= UPDATE orconf fullname indexed_opt SET setlist where_opt */
2878
+ //#line 660 "parse.y"
2879
+ {
2880
+ sqlite3SrcListIndexedBy( pParse, yymsp[-4].minor.yy65, yymsp[-3].minor.yy0 );
2881
+ sqlite3ExprListCheckLength( pParse, yymsp[-1].minor.yy14, "set list" );
2882
+ sqlite3Update( pParse, yymsp[-4].minor.yy65, yymsp[-1].minor.yy14, yymsp[0].minor.yy132, yymsp[-5].minor.yy186 );
2883
+ }
2884
+ //#line 2785 "parse.c"
2885
+ break;
2886
+ case 171: /* setlist ::= setlist COMMA nm EQ expr */
2887
+ //#line 670 "parse.y"
2888
+ {
2889
+ yygotominor.yy14 = sqlite3ExprListAppend( pParse, yymsp[-4].minor.yy14, yymsp[0].minor.yy346.pExpr );
2890
+ sqlite3ExprListSetName( pParse, yygotominor.yy14, yymsp[-2].minor.yy0, 1 );
2891
+ }
2892
+ //#line 2793 "parse.c"
2893
+ break;
2894
+ case 172: /* setlist ::= nm EQ expr */
2895
+ //#line 674 "parse.y"
2896
+ {
2897
+ yygotominor.yy14 = sqlite3ExprListAppend( pParse, 0, yymsp[0].minor.yy346.pExpr );
2898
+ sqlite3ExprListSetName( pParse, yygotominor.yy14, yymsp[-2].minor.yy0, 1 );
2899
+ }
2900
+ //#line 2801 "parse.c"
2901
+ break;
2902
+ case 173: /* cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP */
2903
+ //#line 683 "parse.y"
2904
+ { sqlite3Insert( pParse, yymsp[-5].minor.yy65, yymsp[-1].minor.yy14, 0, yymsp[-4].minor.yy408, yymsp[-7].minor.yy186 ); }
2905
+ //#line 2806 "parse.c"
2906
+ break;
2907
+ case 174: /* cmd ::= insert_cmd INTO fullname inscollist_opt select */
2908
+ //#line 685 "parse.y"
2909
+ { sqlite3Insert( pParse, yymsp[-2].minor.yy65, 0, yymsp[0].minor.yy3, yymsp[-1].minor.yy408, yymsp[-4].minor.yy186 ); }
2910
+ //#line 2811 "parse.c"
2911
+ break;
2912
+ case 175: /* cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES */
2913
+ //#line 687 "parse.y"
2914
+ { sqlite3Insert( pParse, yymsp[-3].minor.yy65, 0, 0, yymsp[-2].minor.yy408, yymsp[-5].minor.yy186 ); }
2915
+ //#line 2816 "parse.c"
2916
+ break;
2917
+ case 176: /* insert_cmd ::= INSERT orconf */
2918
+ //#line 690 "parse.y"
2919
+ { yygotominor.yy186 = yymsp[0].minor.yy186; }
2920
+ //#line 2821 "parse.c"
2921
+ break;
2922
+ case 177: /* insert_cmd ::= REPLACE */
2923
+ //#line 691 "parse.y"
2924
+ { yygotominor.yy186 = OE_Replace; }
2925
+ //#line 2826 "parse.c"
2926
+ break;
2927
+ case 178: /* itemlist ::= itemlist COMMA expr */
2928
+ case 242: /* nexprlist ::= nexprlist COMMA expr */ //yytestcase(yyruleno==242);
2929
+ //#line 698 "parse.y"
2930
+ { yygotominor.yy14 = sqlite3ExprListAppend( pParse, yymsp[-2].minor.yy14, yymsp[0].minor.yy346.pExpr ); }
2931
+ //#line 2832 "parse.c"
2932
+ break;
2933
+ case 179: /* itemlist ::= expr */
2934
+ case 243: /* nexprlist ::= expr */ //yytestcase(yyruleno==243);
2935
+ //#line 700 "parse.y"
2936
+ { yygotominor.yy14 = sqlite3ExprListAppend( pParse, 0, yymsp[0].minor.yy346.pExpr ); }
2937
+ //#line 2838 "parse.c"
2938
+ break;
2939
+ case 182: /* inscollist ::= inscollist COMMA nm */
2940
+ //#line 710 "parse.y"
2941
+ { yygotominor.yy408 = sqlite3IdListAppend( pParse.db, yymsp[-2].minor.yy408, yymsp[0].minor.yy0 ); }
2942
+ //#line 2843 "parse.c"
2943
+ break;
2944
+ case 183: /* inscollist ::= nm */
2945
+ //#line 712 "parse.y"
2946
+ { yygotominor.yy408 = sqlite3IdListAppend( pParse.db, 0, yymsp[0].minor.yy0 ); }
2947
+ //#line 2848 "parse.c"
2948
+ break;
2949
+ case 184: /* expr ::= term */
2950
+ case 212: /* escape ::= ESCAPE expr */ //yytestcase(yyruleno==212);
2951
+ //#line 743 "parse.y"
2952
+ { yygotominor.yy346 = yymsp[0].minor.yy346; }
2953
+ //#line 2854 "parse.c"
2954
+ break;
2955
+ case 185: /* expr ::= LP expr RP */
2956
+ //#line 744 "parse.y"
2957
+ { yygotominor.yy346.pExpr = yymsp[-1].minor.yy346.pExpr; spanSet( yygotominor.yy346, yymsp[-2].minor.yy0, yymsp[0].minor.yy0 ); }
2958
+ //#line 2859 "parse.c"
2959
+ break;
2960
+ case 186: /* term ::= NULL */
2961
+ case 191: /* term ::= INTEGER|FLOAT|BLOB */ //yytestcase(yyruleno==191);
2962
+ case 192: /* term ::= STRING */ //yytestcase(yyruleno==192);
2963
+ //#line 745 "parse.y"
2964
+ { spanExpr( yygotominor.yy346, pParse, yymsp[0].major, yymsp[0].minor.yy0 ); }
2965
+ //#line 2866 "parse.c"
2966
+ break;
2967
+ case 187: /* expr ::= id */
2968
+ case 188: /* expr ::= JOIN_KW */ //yytestcase(yyruleno==188);
2969
+ //#line 746 "parse.y"
2970
+ { spanExpr( yygotominor.yy346, pParse, TK_ID, yymsp[0].minor.yy0 ); }
2971
+ //#line 2872 "parse.c"
2972
+ break;
2973
+ case 189: /* expr ::= nm DOT nm */
2974
+ //#line 748 "parse.y"
2975
+ {
2976
+ Expr temp1 = sqlite3PExpr( pParse, TK_ID, 0, 0, yymsp[-2].minor.yy0 );
2977
+ Expr temp2 = sqlite3PExpr( pParse, TK_ID, 0, 0, yymsp[0].minor.yy0 );
2978
+ yygotominor.yy346.pExpr = sqlite3PExpr( pParse, TK_DOT, temp1, temp2, 0 );
2979
+ spanSet( yygotominor.yy346, yymsp[-2].minor.yy0, yymsp[0].minor.yy0 );
2980
+ }
2981
+ //#line 2882 "parse.c"
2982
+ break;
2983
+ case 190: /* expr ::= nm DOT nm DOT nm */
2984
+ //#line 754 "parse.y"
2985
+ {
2986
+ Expr temp1 = sqlite3PExpr( pParse, TK_ID, 0, 0, yymsp[-4].minor.yy0 );
2987
+ Expr temp2 = sqlite3PExpr( pParse, TK_ID, 0, 0, yymsp[-2].minor.yy0 );
2988
+ Expr temp3 = sqlite3PExpr( pParse, TK_ID, 0, 0, yymsp[0].minor.yy0 );
2989
+ Expr temp4 = sqlite3PExpr( pParse, TK_DOT, temp2, temp3, 0 );
2990
+ yygotominor.yy346.pExpr = sqlite3PExpr( pParse, TK_DOT, temp1, temp4, 0 );
2991
+ spanSet( yygotominor.yy346, yymsp[-4].minor.yy0, yymsp[0].minor.yy0 );
2992
+ }
2993
+ //#line 2894 "parse.c"
2994
+ break;
2995
+ case 193: /* expr ::= REGISTER */
2996
+ //#line 764 "parse.y"
2997
+ {
2998
+ /* When doing a nested parse, one can include terms in an expression
2999
+ ** that look like this: #1 #2 ... These terms refer to registers
3000
+ ** in the virtual machine. #N is the N-th register. */
3001
+ if ( pParse.nested == 0 )
3002
+ {
3003
+ sqlite3ErrorMsg( pParse, "near \"%T\": syntax error", yymsp[0].minor.yy0 );
3004
+ yygotominor.yy346.pExpr = null;
3005
+ }
3006
+ else
3007
+ {
3008
+ yygotominor.yy346.pExpr = sqlite3PExpr( pParse, TK_REGISTER, 0, 0, yymsp[0].minor.yy0 );
3009
+ if ( yygotominor.yy346.pExpr != null ) sqlite3GetInt32( yymsp[0].minor.yy0.z, 1, ref yygotominor.yy346.pExpr.iTable );
3010
+ }
3011
+ spanSet( yygotominor.yy346, yymsp[0].minor.yy0, yymsp[0].minor.yy0 );
3012
+ }
3013
+ //#line 2911 "parse.c"
3014
+ break;
3015
+ case 194: /* expr ::= VARIABLE */
3016
+ //#line 777 "parse.y"
3017
+ {
3018
+ spanExpr( yygotominor.yy346, pParse, TK_VARIABLE, yymsp[0].minor.yy0 );
3019
+ sqlite3ExprAssignVarNumber( pParse, yygotominor.yy346.pExpr );
3020
+ spanSet( yygotominor.yy346, yymsp[0].minor.yy0, yymsp[0].minor.yy0 );
3021
+ }
3022
+ //#line 2920 "parse.c"
3023
+ break;
3024
+ case 195: /* expr ::= expr COLLATE ids */
3025
+ //#line 782 "parse.y"
3026
+ {
3027
+ yygotominor.yy346.pExpr = sqlite3ExprSetColl( pParse, yymsp[-2].minor.yy346.pExpr, yymsp[0].minor.yy0 );
3028
+ yygotominor.yy346.zStart = yymsp[-2].minor.yy346.zStart;
3029
+ yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z.Substring( yymsp[0].minor.yy0.n );
3030
+ }
3031
+ //#line 2929 "parse.c"
3032
+ break;
3033
+ case 196: /* expr ::= CAST LP expr AS typetoken RP */
3034
+ //#line 788 "parse.y"
3035
+ {
3036
+ yygotominor.yy346.pExpr = sqlite3PExpr( pParse, TK_CAST, yymsp[-3].minor.yy346.pExpr, 0, yymsp[-1].minor.yy0 );
3037
+ spanSet( yygotominor.yy346, yymsp[-5].minor.yy0, yymsp[0].minor.yy0 );
3038
+ }
3039
+ //#line 2937 "parse.c"
3040
+ break;
3041
+ case 197: /* expr ::= ID LP distinct exprlist RP */
3042
+ //#line 793 "parse.y"
3043
+ {
3044
+ if ( yymsp[-1].minor.yy14 != null && yymsp[-1].minor.yy14.nExpr > pParse.db.aLimit[SQLITE_LIMIT_FUNCTION_ARG] )
3045
+ {
3046
+ sqlite3ErrorMsg( pParse, "too many arguments on function %T", yymsp[-4].minor.yy0 );
3047
+ }
3048
+ yygotominor.yy346.pExpr = sqlite3ExprFunction( pParse, yymsp[-1].minor.yy14, yymsp[-4].minor.yy0 );
3049
+ spanSet( yygotominor.yy346, yymsp[-4].minor.yy0, yymsp[0].minor.yy0 );
3050
+ if ( yymsp[-2].minor.yy328 != 0 && yygotominor.yy346.pExpr != null )
3051
+ {
3052
+ yygotominor.yy346.pExpr.flags |= EP_Distinct;
3053
+ }
3054
+ }
3055
+ //#line 2951 "parse.c"
3056
+ break;
3057
+ case 198: /* expr ::= ID LP STAR RP */
3058
+ //#line 803 "parse.y"
3059
+ {
3060
+ yygotominor.yy346.pExpr = sqlite3ExprFunction( pParse, 0, yymsp[-3].minor.yy0 );
3061
+ spanSet( yygotominor.yy346, yymsp[-3].minor.yy0, yymsp[0].minor.yy0 );
3062
+ }
3063
+ //#line 2959 "parse.c"
3064
+ break;
3065
+ case 199: /* term ::= CTIME_KW */
3066
+ //#line 807 "parse.y"
3067
+ {
3068
+ /* The CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP values are
3069
+ ** treated as functions that return constants */
3070
+ yygotominor.yy346.pExpr = sqlite3ExprFunction( pParse, 0, yymsp[0].minor.yy0 );
3071
+ if ( yygotominor.yy346.pExpr != null )
3072
+ {
3073
+ yygotominor.yy346.pExpr.op = TK_CONST_FUNC;
3074
+ }
3075
+ spanSet( yygotominor.yy346, yymsp[0].minor.yy0, yymsp[0].minor.yy0 );
3076
+ }
3077
+ //#line 2972 "parse.c"
3078
+ break;
3079
+ case 200: /* expr ::= expr AND expr */
3080
+ case 201: /* expr ::= expr OR expr */ //yytestcase(yyruleno==201);
3081
+ case 202: /* expr ::= expr LT|GT|GE|LE expr */ //yytestcase(yyruleno==202);
3082
+ case 203: /* expr ::= expr EQ|NE expr */ //yytestcase(yyruleno==203);
3083
+ case 204: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ //yytestcase(yyruleno==204);
3084
+ case 205: /* expr ::= expr PLUS|MINUS expr */ //yytestcase(yyruleno==205);
3085
+ case 206: /* expr ::= expr STAR|SLASH|REM expr */ //yytestcase(yyruleno==206);
3086
+ case 207: /* expr ::= expr CONCAT expr */ //yytestcase(yyruleno==207);
3087
+ //#line 834 "parse.y"
3088
+ { spanBinaryExpr( yygotominor.yy346, pParse, yymsp[-1].major, yymsp[-2].minor.yy346, yymsp[0].minor.yy346 ); }
3089
+ //#line 2984 "parse.c"
3090
+ break;
3091
+ case 208: /* likeop ::= LIKE_KW */
3092
+ case 210: /* likeop ::= MATCH */ //yytestcase(yyruleno==210);
3093
+ //#line 847 "parse.y"
3094
+ { yygotominor.yy96.eOperator = yymsp[0].minor.yy0; yygotominor.yy96.not = false; }
3095
+ //#line 2990 "parse.c"
3096
+ break;
3097
+ case 209: /* likeop ::= NOT LIKE_KW */
3098
+ case 211: /* likeop ::= NOT MATCH */ //yytestcase(yyruleno==211);
3099
+ //#line 848 "parse.y"
3100
+ { yygotominor.yy96.eOperator = yymsp[0].minor.yy0; yygotominor.yy96.not = true; }
3101
+ //#line 2996 "parse.c"
3102
+ break;
3103
+ case 213: /* escape ::= */
3104
+ //#line 854 "parse.y"
3105
+ { yygotominor.yy346 = new ExprSpan(); }// memset(yygotominor.yy346, 0, sizeof(yygotominor.yy346)); }
3106
+ //#line 3001 "parse.c"
3107
+ break;
3108
+ case 214: /* expr ::= expr likeop expr escape */
3109
+ //#line 855 "parse.y"
3110
+ {
3111
+ ExprList pList;
3112
+ pList = sqlite3ExprListAppend( pParse, 0, yymsp[-1].minor.yy346.pExpr );
3113
+ pList = sqlite3ExprListAppend( pParse, pList, yymsp[-3].minor.yy346.pExpr );
3114
+ if ( yymsp[0].minor.yy346.pExpr != null )
3115
+ {
3116
+ pList = sqlite3ExprListAppend( pParse, pList, yymsp[0].minor.yy346.pExpr );
3117
+ }
3118
+ yygotominor.yy346.pExpr = sqlite3ExprFunction( pParse, pList, yymsp[-2].minor.yy96.eOperator );
3119
+ if ( yymsp[-2].minor.yy96.not ) yygotominor.yy346.pExpr = sqlite3PExpr( pParse, TK_NOT, yygotominor.yy346.pExpr, 0, 0 );
3120
+ yygotominor.yy346.zStart = yymsp[-3].minor.yy346.zStart;
3121
+ yygotominor.yy346.zEnd = yymsp[-1].minor.yy346.zEnd;
3122
+ if ( yygotominor.yy346.pExpr != null ) yygotominor.yy346.pExpr.flags |= EP_InfixFunc;
3123
+ }
3124
+ //#line 3018 "parse.c"
3125
+ break;
3126
+ case 215: /* expr ::= expr ISNULL|NOTNULL */
3127
+ //#line 885 "parse.y"
3128
+ { spanUnaryPostfix( yygotominor.yy346, pParse, yymsp[0].major, yymsp[-1].minor.yy346, yymsp[0].minor.yy0 ); }
3129
+ //#line 3023 "parse.c"
3130
+ break;
3131
+ case 216: /* expr ::= expr NOT NULL */
3132
+ //#line 886 "parse.y"
3133
+ { spanUnaryPostfix( yygotominor.yy346, pParse, TK_NOTNULL, yymsp[-2].minor.yy346, yymsp[0].minor.yy0 ); }
3134
+ //#line 3028 "parse.c"
3135
+ break;
3136
+ case 217: /* expr ::= expr IS expr */
3137
+ //#line 907 "parse.y"
3138
+ {
3139
+ spanBinaryExpr( yygotominor.yy346, pParse, TK_IS, yymsp[-2].minor.yy346, yymsp[0].minor.yy346 );
3140
+ binaryToUnaryIfNull( pParse, yymsp[0].minor.yy346.pExpr, yygotominor.yy346.pExpr, TK_ISNULL );
3141
+ }
3142
+ //#line 3036 "parse.c"
3143
+ break;
3144
+ case 218: /* expr ::= expr IS NOT expr */
3145
+ //#line 911 "parse.y"
3146
+ {
3147
+ spanBinaryExpr( yygotominor.yy346, pParse, TK_ISNOT, yymsp[-3].minor.yy346, yymsp[0].minor.yy346 );
3148
+ binaryToUnaryIfNull( pParse, yymsp[0].minor.yy346.pExpr, yygotominor.yy346.pExpr, TK_NOTNULL );
3149
+ }
3150
+ //#line 3044 "parse.c"
3151
+ break;
3152
+ case 219: /* expr ::= NOT expr */
3153
+ case 220: /* expr ::= BITNOT expr */ //yytestcase(yyruleno==220);
3154
+ //#line 934 "parse.y"
3155
+ { spanUnaryPrefix( yygotominor.yy346, pParse, yymsp[-1].major, yymsp[0].minor.yy346, yymsp[-1].minor.yy0 ); }
3156
+ //#line 3050 "parse.c"
3157
+ break;
3158
+ case 221: /* expr ::= MINUS expr */
3159
+ //#line 937 "parse.y"
3160
+ { spanUnaryPrefix( yygotominor.yy346, pParse, TK_UMINUS, yymsp[0].minor.yy346, yymsp[-1].minor.yy0 ); }
3161
+ //#line 3055 "parse.c"
3162
+ break;
3163
+ case 222: /* expr ::= PLUS expr */
3164
+ //#line 939 "parse.y"
3165
+ { spanUnaryPrefix( yygotominor.yy346, pParse, TK_UPLUS, yymsp[0].minor.yy346, yymsp[-1].minor.yy0 ); }
3166
+ //#line 3060 "parse.c"
3167
+ break;
3168
+ case 225: /* expr ::= expr between_op expr AND expr */
3169
+ //#line 944 "parse.y"
3170
+ {
3171
+ ExprList pList = sqlite3ExprListAppend( pParse, 0, yymsp[-2].minor.yy346.pExpr );
3172
+ pList = sqlite3ExprListAppend( pParse, pList, yymsp[0].minor.yy346.pExpr );
3173
+ yygotominor.yy346.pExpr = sqlite3PExpr( pParse, TK_BETWEEN, yymsp[-4].minor.yy346.pExpr, 0, 0 );
3174
+ if ( yygotominor.yy346.pExpr != null )
3175
+ {
3176
+ yygotominor.yy346.pExpr.x.pList = pList;
3177
+ }
3178
+ else
3179
+ {
3180
+ sqlite3ExprListDelete( pParse.db, ref pList );
3181
+ }
3182
+ if ( yymsp[-3].minor.yy328 != 0 ) yygotominor.yy346.pExpr = sqlite3PExpr( pParse, TK_NOT, yygotominor.yy346.pExpr, 0, 0 );
3183
+ yygotominor.yy346.zStart = yymsp[-4].minor.yy346.zStart;
3184
+ yygotominor.yy346.zEnd = yymsp[0].minor.yy346.zEnd;
3185
+ }
3186
+ //#line 3077 "parse.c"
3187
+ break;
3188
+ case 228: /* expr ::= expr in_op LP exprlist RP */
3189
+ //#line 961 "parse.y"
3190
+ {
3191
+ yygotominor.yy346.pExpr = sqlite3PExpr( pParse, TK_IN, yymsp[-4].minor.yy346.pExpr, 0, 0 );
3192
+ if ( yygotominor.yy346.pExpr != null )
3193
+ {
3194
+ yygotominor.yy346.pExpr.x.pList = yymsp[-1].minor.yy14;
3195
+ sqlite3ExprSetHeight( pParse, yygotominor.yy346.pExpr );
3196
+ }
3197
+ else
3198
+ {
3199
+ sqlite3ExprListDelete( pParse.db, ref yymsp[-1].minor.yy14 );
3200
+ }
3201
+ if ( yymsp[-3].minor.yy328 != 0 ) yygotominor.yy346.pExpr = sqlite3PExpr( pParse, TK_NOT, yygotominor.yy346.pExpr, 0, 0 );
3202
+ yygotominor.yy346.zStart = yymsp[-4].minor.yy346.zStart;
3203
+ yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z.Substring( yymsp[0].minor.yy0.n );
3204
+ }
3205
+ //#line 3093 "parse.c"
3206
+ break;
3207
+ case 229: /* expr ::= LP select RP */
3208
+ //#line 973 "parse.y"
3209
+ {
3210
+ yygotominor.yy346.pExpr = sqlite3PExpr( pParse, TK_SELECT, 0, 0, 0 );
3211
+ if ( yygotominor.yy346.pExpr != null )
3212
+ {
3213
+ yygotominor.yy346.pExpr.x.pSelect = yymsp[-1].minor.yy3;
3214
+ ExprSetProperty( yygotominor.yy346.pExpr, EP_xIsSelect );
3215
+ sqlite3ExprSetHeight( pParse, yygotominor.yy346.pExpr );
3216
+ }
3217
+ else
3218
+ {
3219
+ sqlite3SelectDelete( pParse.db, ref yymsp[-1].minor.yy3 );
3220
+ }
3221
+ yygotominor.yy346.zStart = yymsp[-2].minor.yy0.z;
3222
+ yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z.Substring( yymsp[0].minor.yy0.n );
3223
+ }
3224
+ //#line 3109 "parse.c"
3225
+ break;
3226
+ case 230: /* expr ::= expr in_op LP select RP */
3227
+ //#line 985 "parse.y"
3228
+ {
3229
+ yygotominor.yy346.pExpr = sqlite3PExpr( pParse, TK_IN, yymsp[-4].minor.yy346.pExpr, 0, 0 );
3230
+ if ( yygotominor.yy346.pExpr != null )
3231
+ {
3232
+ yygotominor.yy346.pExpr.x.pSelect = yymsp[-1].minor.yy3;
3233
+ ExprSetProperty( yygotominor.yy346.pExpr, EP_xIsSelect );
3234
+ sqlite3ExprSetHeight( pParse, yygotominor.yy346.pExpr );
3235
+ }
3236
+ else
3237
+ {
3238
+ sqlite3SelectDelete( pParse.db, ref yymsp[-1].minor.yy3 );
3239
+ }
3240
+ if ( yymsp[-3].minor.yy328 != 0 ) yygotominor.yy346.pExpr = sqlite3PExpr( pParse, TK_NOT, yygotominor.yy346.pExpr, 0, 0 );
3241
+ yygotominor.yy346.zStart = yymsp[-4].minor.yy346.zStart;
3242
+ yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z.Substring( yymsp[0].minor.yy0.n );
3243
+ }
3244
+ //#line 3126 "parse.c"
3245
+ break;
3246
+ case 231: /* expr ::= expr in_op nm dbnm */
3247
+ //#line 998 "parse.y"
3248
+ {
3249
+ SrcList pSrc = sqlite3SrcListAppend( pParse.db, 0, yymsp[-1].minor.yy0, yymsp[0].minor.yy0 );
3250
+ yygotominor.yy346.pExpr = sqlite3PExpr( pParse, TK_IN, yymsp[-3].minor.yy346.pExpr, 0, 0 );
3251
+ if ( yygotominor.yy346.pExpr != null )
3252
+ {
3253
+ yygotominor.yy346.pExpr.x.pSelect = sqlite3SelectNew( pParse, 0, pSrc, 0, 0, 0, 0, 0, 0, 0 );
3254
+ ExprSetProperty( yygotominor.yy346.pExpr, EP_xIsSelect );
3255
+ sqlite3ExprSetHeight( pParse, yygotominor.yy346.pExpr );
3256
+ }
3257
+ else
3258
+ {
3259
+ sqlite3SrcListDelete( pParse.db, ref pSrc );
3260
+ }
3261
+ if ( yymsp[-2].minor.yy328 != 0 ) yygotominor.yy346.pExpr = sqlite3PExpr( pParse, TK_NOT, yygotominor.yy346.pExpr, 0, 0 );
3262
+ yygotominor.yy346.zStart = yymsp[-3].minor.yy346.zStart;
3263
+ yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z != null ? yymsp[0].minor.yy0.z.Substring( yymsp[0].minor.yy0.n ) : yymsp[-1].minor.yy0.z.Substring( yymsp[-1].minor.yy0.n );
3264
+ }
3265
+ //#line 3144 "parse.c"
3266
+ break;
3267
+ case 232: /* expr ::= EXISTS LP select RP */
3268
+ //#line 1012 "parse.y"
3269
+ {
3270
+ Expr p = yygotominor.yy346.pExpr = sqlite3PExpr( pParse, TK_EXISTS, 0, 0, 0 );
3271
+ if ( p != null )
3272
+ {
3273
+ p.x.pSelect = yymsp[-1].minor.yy3;
3274
+ ExprSetProperty( p, EP_xIsSelect );
3275
+ sqlite3ExprSetHeight( pParse, p );
3276
+ }
3277
+ else
3278
+ {
3279
+ sqlite3SelectDelete( pParse.db, ref yymsp[-1].minor.yy3 );
3280
+ }
3281
+ yygotominor.yy346.zStart = yymsp[-3].minor.yy0.z;
3282
+ yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z.Substring( yymsp[0].minor.yy0.n );
3283
+ }
3284
+ //#line 3160 "parse.c"
3285
+ break;
3286
+ case 233: /* expr ::= CASE case_operand case_exprlist case_else END */
3287
+ //#line 1027 "parse.y"
3288
+ {
3289
+ yygotominor.yy346.pExpr = sqlite3PExpr( pParse, TK_CASE, yymsp[-3].minor.yy132, yymsp[-1].minor.yy132, 0 );
3290
+ if ( yygotominor.yy346.pExpr != null )
3291
+ {
3292
+ yygotominor.yy346.pExpr.x.pList = yymsp[-2].minor.yy14;
3293
+ sqlite3ExprSetHeight( pParse, yygotominor.yy346.pExpr );
3294
+ }
3295
+ else
3296
+ {
3297
+ sqlite3ExprListDelete( pParse.db, ref yymsp[-2].minor.yy14 );
3298
+ }
3299
+ yygotominor.yy346.zStart = yymsp[-4].minor.yy0.z;
3300
+ yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z.Substring( yymsp[0].minor.yy0.n );
3301
+ }
3302
+ //#line 3175 "parse.c"
3303
+ break;
3304
+ case 234: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
3305
+ //#line 1040 "parse.y"
3306
+ {
3307
+ yygotominor.yy14 = sqlite3ExprListAppend( pParse, yymsp[-4].minor.yy14, yymsp[-2].minor.yy346.pExpr );
3308
+ yygotominor.yy14 = sqlite3ExprListAppend( pParse, yygotominor.yy14, yymsp[0].minor.yy346.pExpr );
3309
+ }
3310
+ //#line 3183 "parse.c"
3311
+ break;
3312
+ case 235: /* case_exprlist ::= WHEN expr THEN expr */
3313
+ //#line 1044 "parse.y"
3314
+ {
3315
+ yygotominor.yy14 = sqlite3ExprListAppend( pParse, 0, yymsp[-2].minor.yy346.pExpr );
3316
+ yygotominor.yy14 = sqlite3ExprListAppend( pParse, yygotominor.yy14, yymsp[0].minor.yy346.pExpr );
3317
+ }
3318
+ //#line 3191 "parse.c"
3319
+ break;
3320
+ case 244: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP */
3321
+ //#line 1073 "parse.y"
3322
+ {
3323
+ sqlite3CreateIndex( pParse, yymsp[-6].minor.yy0, yymsp[-5].minor.yy0,
3324
+ sqlite3SrcListAppend( pParse.db, 0, yymsp[-3].minor.yy0, 0 ), yymsp[-1].minor.yy14, yymsp[-9].minor.yy328,
3325
+ yymsp[-10].minor.yy0, yymsp[0].minor.yy0, SQLITE_SO_ASC, yymsp[-7].minor.yy328 );
3326
+ }
3327
+ //#line 3200 "parse.c"
3328
+ break;
3329
+ case 245: /* uniqueflag ::= UNIQUE */
3330
+ case 299: /* raisetype ::= ABORT */ //yytestcase(yyruleno==299);
3331
+ //#line 1080 "parse.y"
3332
+ { yygotominor.yy328 = OE_Abort; }
3333
+ //#line 3206 "parse.c"
3334
+ break;
3335
+ case 246: /* uniqueflag ::= */
3336
+ //#line 1081 "parse.y"
3337
+ { yygotominor.yy328 = OE_None; }
3338
+ //#line 3211 "parse.c"
3339
+ break;
3340
+ case 249: /* idxlist ::= idxlist COMMA nm collate sortorder */
3341
+ //#line 1090 "parse.y"
3342
+ {
3343
+ Expr p = null;
3344
+ if ( yymsp[-1].minor.yy0.n > 0 )
3345
+ {
3346
+ p = sqlite3Expr( pParse.db, TK_COLUMN, null );
3347
+ sqlite3ExprSetColl( pParse, p, yymsp[-1].minor.yy0 );
3348
+ }
3349
+ yygotominor.yy14 = sqlite3ExprListAppend( pParse, yymsp[-4].minor.yy14, p );
3350
+ sqlite3ExprListSetName( pParse, yygotominor.yy14, yymsp[-2].minor.yy0, 1 );
3351
+ sqlite3ExprListCheckLength( pParse, yygotominor.yy14, "index" );
3352
+ if ( yygotominor.yy14 != null ) yygotominor.yy14.a[yygotominor.yy14.nExpr - 1].sortOrder = (u8)yymsp[0].minor.yy328;
3353
+ }
3354
+ //#line 3226 "parse.c"
3355
+ break;
3356
+ case 250: /* idxlist ::= nm collate sortorder */
3357
+ //#line 1101 "parse.y"
3358
+ {
3359
+ Expr p = null;
3360
+ if ( yymsp[-1].minor.yy0.n > 0 )
3361
+ {
3362
+ p = sqlite3PExpr( pParse, TK_COLUMN, 0, 0, 0 );
3363
+ sqlite3ExprSetColl( pParse, p, yymsp[-1].minor.yy0 );
3364
+ }
3365
+ yygotominor.yy14 = sqlite3ExprListAppend( pParse, 0, p );
3366
+ sqlite3ExprListSetName( pParse, yygotominor.yy14, yymsp[-2].minor.yy0, 1 );
3367
+ sqlite3ExprListCheckLength( pParse, yygotominor.yy14, "index" );
3368
+ if ( yygotominor.yy14 != null ) yygotominor.yy14.a[yygotominor.yy14.nExpr - 1].sortOrder = (u8)yymsp[0].minor.yy328;
3369
+ }
3370
+ //#line 3241 "parse.c"
3371
+ break;
3372
+ case 251: /* collate ::= */
3373
+ //#line 1114 "parse.y"
3374
+ { yygotominor.yy0.z = null; yygotominor.yy0.n = 0; }
3375
+ //#line 3246 "parse.c"
3376
+ break;
3377
+ case 253: /* cmd ::= DROP INDEX ifexists fullname */
3378
+ //#line 1120 "parse.y"
3379
+ { sqlite3DropIndex( pParse, yymsp[0].minor.yy65, yymsp[-1].minor.yy328 ); }
3380
+ //#line 3251 "parse.c"
3381
+ break;
3382
+ case 254: /* cmd ::= VACUUM */
3383
+ case 255: /* cmd ::= VACUUM nm */ //yytestcase(yyruleno==255);
3384
+ //#line 1126 "parse.y"
3385
+ { sqlite3Vacuum( pParse ); }
3386
+ //#line 3257 "parse.c"
3387
+ break;
3388
+ case 256: /* cmd ::= PRAGMA nm dbnm */
3389
+ //#line 1134 "parse.y"
3390
+ { sqlite3Pragma( pParse, yymsp[-1].minor.yy0, yymsp[0].minor.yy0, 0, 0 ); }
3391
+ //#line 3262 "parse.c"
3392
+ break;
3393
+ case 257: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
3394
+ //#line 1135 "parse.y"
3395
+ { sqlite3Pragma( pParse, yymsp[-3].minor.yy0, yymsp[-2].minor.yy0, yymsp[0].minor.yy0, 0 ); }
3396
+ //#line 3267 "parse.c"
3397
+ break;
3398
+ case 258: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
3399
+ //#line 1136 "parse.y"
3400
+ { sqlite3Pragma( pParse, yymsp[-4].minor.yy0, yymsp[-3].minor.yy0, yymsp[-1].minor.yy0, 0 ); }
3401
+ //#line 3272 "parse.c"
3402
+ break;
3403
+ case 259: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
3404
+ //#line 1138 "parse.y"
3405
+ { sqlite3Pragma( pParse, yymsp[-3].minor.yy0, yymsp[-2].minor.yy0, yymsp[0].minor.yy0, 1 ); }
3406
+ //#line 3277 "parse.c"
3407
+ break;
3408
+ case 260: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
3409
+ //#line 1140 "parse.y"
3410
+ { sqlite3Pragma( pParse, yymsp[-4].minor.yy0, yymsp[-3].minor.yy0, yymsp[-1].minor.yy0, 1 ); }
3411
+ //#line 3282 "parse.c"
3412
+ break;
3413
+ case 271: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
3414
+ //#line 1158 "parse.y"
3415
+ {
3416
+ Token all = new Token();
3417
+ //all.z = yymsp[-3].minor.yy0.z;
3418
+ //all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;
3419
+ all.n = (int)( yymsp[-3].minor.yy0.z.Length - yymsp[0].minor.yy0.z.Length ) + yymsp[0].minor.yy0.n;
3420
+ all.z = yymsp[-3].minor.yy0.z.Substring( 0, all.n );
3421
+ sqlite3FinishTrigger( pParse, yymsp[-1].minor.yy473, all );
3422
+ }
3423
+ //#line 3292 "parse.c"
3424
+ break;
3425
+ case 272: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
3426
+ //#line 1167 "parse.y"
3427
+ {
3428
+ sqlite3BeginTrigger( pParse, yymsp[-7].minor.yy0, yymsp[-6].minor.yy0, yymsp[-5].minor.yy328, yymsp[-4].minor.yy378.a, yymsp[-4].minor.yy378.b, yymsp[-2].minor.yy65, yymsp[0].minor.yy132, yymsp[-10].minor.yy328, yymsp[-8].minor.yy328 );
3429
+ yygotominor.yy0 = ( yymsp[-6].minor.yy0.n == 0 ? yymsp[-7].minor.yy0 : yymsp[-6].minor.yy0 );
3430
+ }
3431
+ //#line 3300 "parse.c"
3432
+ break;
3433
+ case 273: /* trigger_time ::= BEFORE */
3434
+ case 276: /* trigger_time ::= */ //yytestcase(yyruleno==276);
3435
+ //#line 1173 "parse.y"
3436
+ { yygotominor.yy328 = TK_BEFORE; }
3437
+ //#line 3306 "parse.c"
3438
+ break;
3439
+ case 274: /* trigger_time ::= AFTER */
3440
+ //#line 1174 "parse.y"
3441
+ { yygotominor.yy328 = TK_AFTER; }
3442
+ //#line 3311 "parse.c"
3443
+ break;
3444
+ case 275: /* trigger_time ::= INSTEAD OF */
3445
+ //#line 1175 "parse.y"
3446
+ { yygotominor.yy328 = TK_INSTEAD; }
3447
+ //#line 3316 "parse.c"
3448
+ break;
3449
+ case 277: /* trigger_event ::= DELETE|INSERT */
3450
+ case 278: /* trigger_event ::= UPDATE */ //yytestcase(yyruleno==278);
3451
+ //#line 1180 "parse.y"
3452
+ { yygotominor.yy378.a = yymsp[0].major; yygotominor.yy378.b = null; }
3453
+ //#line 3322 "parse.c"
3454
+ break;
3455
+ case 279: /* trigger_event ::= UPDATE OF inscollist */
3456
+ //#line 1182 "parse.y"
3457
+ { yygotominor.yy378.a = TK_UPDATE; yygotominor.yy378.b = yymsp[0].minor.yy408; }
3458
+ //#line 3327 "parse.c"
3459
+ break;
3460
+ case 282: /* when_clause ::= */
3461
+ case 304: /* key_opt ::= */ //yytestcase(yyruleno==304);
3462
+ //#line 1189 "parse.y"
3463
+ { yygotominor.yy132 = null; }
3464
+ //#line 3333 "parse.c"
3465
+ break;
3466
+ case 283: /* when_clause ::= WHEN expr */
3467
+ case 305: /* key_opt ::= KEY expr */ //yytestcase(yyruleno==305);
3468
+ //#line 1190 "parse.y"
3469
+ { yygotominor.yy132 = yymsp[0].minor.yy346.pExpr; }
3470
+ //#line 3339 "parse.c"
3471
+ break;
3472
+ case 284: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
3473
+ //#line 1194 "parse.y"
3474
+ {
3475
+ Debug.Assert( yymsp[-2].minor.yy473 != null );
3476
+ yymsp[-2].minor.yy473.pLast.pNext = yymsp[-1].minor.yy473;
3477
+ yymsp[-2].minor.yy473.pLast = yymsp[-1].minor.yy473;
3478
+ yygotominor.yy473 = yymsp[-2].minor.yy473;
3479
+ }
3480
+ //#line 3349 "parse.c"
3481
+ break;
3482
+ case 285: /* trigger_cmd_list ::= trigger_cmd SEMI */
3483
+ //#line 1200 "parse.y"
3484
+ {
3485
+ Debug.Assert( yymsp[-1].minor.yy473 != null );
3486
+ yymsp[-1].minor.yy473.pLast = yymsp[-1].minor.yy473;
3487
+ yygotominor.yy473 = yymsp[-1].minor.yy473;
3488
+ }
3489
+ //#line 3358 "parse.c"
3490
+ break;
3491
+ case 287: /* trnm ::= nm DOT nm */
3492
+ //#line 1212 "parse.y"
3493
+ {
3494
+ yygotominor.yy0 = yymsp[0].minor.yy0;
3495
+ sqlite3ErrorMsg( pParse,
3496
+ "qualified table names are not allowed on INSERT, UPDATE, and DELETE " +
3497
+ "statements within triggers" );
3498
+ }
3499
+ //#line 3368 "parse.c"
3500
+ break;
3501
+ case 289: /* tridxby ::= INDEXED BY nm */
3502
+ //#line 1224 "parse.y"
3503
+ {
3504
+ sqlite3ErrorMsg( pParse,
3505
+ "the INDEXED BY clause is not allowed on UPDATE or DELETE statements " +
3506
+ "within triggers" );
3507
+ }
3508
+ //#line 3377 "parse.c"
3509
+ break;
3510
+ case 290: /* tridxby ::= NOT INDEXED */
3511
+ //#line 1229 "parse.y"
3512
+ {
3513
+ sqlite3ErrorMsg( pParse,
3514
+ "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements " +
3515
+ "within triggers" );
3516
+ }
3517
+ //#line 3386 "parse.c"
3518
+ break;
3519
+ case 291: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt */
3520
+ //#line 1242 "parse.y"
3521
+ { yygotominor.yy473 = sqlite3TriggerUpdateStep( pParse.db, yymsp[-4].minor.yy0, yymsp[-1].minor.yy14, yymsp[0].minor.yy132, yymsp[-5].minor.yy186 ); }
3522
+ //#line 3391 "parse.c"
3523
+ break;
3524
+ case 292: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt VALUES LP itemlist RP */
3525
+ //#line 1247 "parse.y"
3526
+ { yygotominor.yy473 = sqlite3TriggerInsertStep( pParse.db, yymsp[-5].minor.yy0, yymsp[-4].minor.yy408, yymsp[-1].minor.yy14, null, yymsp[-7].minor.yy186 ); }
3527
+ //#line 3396 "parse.c"
3528
+ break;
3529
+ case 293: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt select */
3530
+ //#line 1250 "parse.y"
3531
+ { yygotominor.yy473 = sqlite3TriggerInsertStep( pParse.db, yymsp[-2].minor.yy0, yymsp[-1].minor.yy408, null, yymsp[0].minor.yy3, yymsp[-4].minor.yy186 ); }
3532
+ //#line 3401 "parse.c"
3533
+ break;
3534
+ case 294: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt */
3535
+ //#line 1254 "parse.y"
3536
+ { yygotominor.yy473 = sqlite3TriggerDeleteStep( pParse.db, yymsp[-2].minor.yy0, yymsp[0].minor.yy132 ); }
3537
+ //#line 3406 "parse.c"
3538
+ break;
3539
+ case 295: /* trigger_cmd ::= select */
3540
+ //#line 1257 "parse.y"
3541
+ { yygotominor.yy473 = sqlite3TriggerSelectStep( pParse.db, yymsp[0].minor.yy3 ); }
3542
+ //#line 3411 "parse.c"
3543
+ break;
3544
+ case 296: /* expr ::= RAISE LP IGNORE RP */
3545
+ //#line 1260 "parse.y"
3546
+ {
3547
+ yygotominor.yy346.pExpr = sqlite3PExpr( pParse, TK_RAISE, 0, 0, 0 );
3548
+ if ( yygotominor.yy346.pExpr != null )
3549
+ {
3550
+ yygotominor.yy346.pExpr.affinity = (char)OE_Ignore;
3551
+ }
3552
+ yygotominor.yy346.zStart = yymsp[-3].minor.yy0.z;
3553
+ yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z.Substring( yymsp[0].minor.yy0.n );
3554
+ }
3555
+ //#line 3423 "parse.c"
3556
+ break;
3557
+ case 297: /* expr ::= RAISE LP raisetype COMMA nm RP */
3558
+ //#line 1268 "parse.y"
3559
+ {
3560
+ yygotominor.yy346.pExpr = sqlite3PExpr( pParse, TK_RAISE, 0, 0, yymsp[-1].minor.yy0 );
3561
+ if ( yygotominor.yy346.pExpr != null )
3562
+ {
3563
+ yygotominor.yy346.pExpr.affinity = (char)yymsp[-3].minor.yy328;
3564
+ }
3565
+ yygotominor.yy346.zStart = yymsp[-5].minor.yy0.z;
3566
+ yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z.Substring( yymsp[0].minor.yy0.n );
3567
+ }
3568
+ //#line 3435 "parse.c"
3569
+ break;
3570
+ case 298: /* raisetype ::= ROLLBACK */
3571
+ //#line 1279 "parse.y"
3572
+ { yygotominor.yy328 = OE_Rollback; }
3573
+ //#line 3440 "parse.c"
3574
+ break;
3575
+ case 300: /* raisetype ::= FAIL */
3576
+ //#line 1281 "parse.y"
3577
+ { yygotominor.yy328 = OE_Fail; }
3578
+ //#line 3445 "parse.c"
3579
+ break;
3580
+ case 301: /* cmd ::= DROP TRIGGER ifexists fullname */
3581
+ //#line 1286 "parse.y"
3582
+ {
3583
+ sqlite3DropTrigger( pParse, yymsp[0].minor.yy65, yymsp[-1].minor.yy328 );
3584
+ }
3585
+ //#line 3452 "parse.c"
3586
+ break;
3587
+ case 302: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
3588
+ //#line 1293 "parse.y"
3589
+ {
3590
+ sqlite3Attach( pParse, yymsp[-3].minor.yy346.pExpr, yymsp[-1].minor.yy346.pExpr, yymsp[0].minor.yy132 );
3591
+ }
3592
+ //#line 3459 "parse.c"
3593
+ break;
3594
+ case 303: /* cmd ::= DETACH database_kw_opt expr */
3595
+ //#line 1296 "parse.y"
3596
+ {
3597
+ sqlite3Detach( pParse, yymsp[0].minor.yy346.pExpr );
3598
+ }
3599
+ //#line 3466 "parse.c"
3600
+ break;
3601
+ case 308: /* cmd ::= REINDEX */
3602
+ //#line 1311 "parse.y"
3603
+ { sqlite3Reindex( pParse, 0, 0 ); }
3604
+ //#line 3471 "parse.c"
3605
+ break;
3606
+ case 309: /* cmd ::= REINDEX nm dbnm */
3607
+ //#line 1312 "parse.y"
3608
+ { sqlite3Reindex( pParse, yymsp[-1].minor.yy0, yymsp[0].minor.yy0 ); }
3609
+ //#line 3476 "parse.c"
3610
+ break;
3611
+ case 310: /* cmd ::= ANALYZE */
3612
+ //#line 1317 "parse.y"
3613
+ { sqlite3Analyze( pParse, 0, 0 ); }
3614
+ //#line 3481 "parse.c"
3615
+ break;
3616
+ case 311: /* cmd ::= ANALYZE nm dbnm */
3617
+ //#line 1318 "parse.y"
3618
+ { sqlite3Analyze( pParse, yymsp[-1].minor.yy0, yymsp[0].minor.yy0 ); }
3619
+ //#line 3486 "parse.c"
3620
+ break;
3621
+ case 312: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
3622
+ //#line 1323 "parse.y"
3623
+ {
3624
+ sqlite3AlterRenameTable( pParse, yymsp[-3].minor.yy65, yymsp[0].minor.yy0 );
3625
+ }
3626
+ //#line 3493 "parse.c"
3627
+ break;
3628
+ case 313: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column */
3629
+ //#line 1326 "parse.y"
3630
+ {
3631
+ sqlite3AlterFinishAddColumn( pParse, yymsp[0].minor.yy0 );
3632
+ }
3633
+ //#line 3500 "parse.c"
3634
+ break;
3635
+ case 314: /* add_column_fullname ::= fullname */
3636
+ //#line 1329 "parse.y"
3637
+ {
3638
+ pParse.db.lookaside.bEnabled = 0;
3639
+ sqlite3AlterBeginAddColumn( pParse, yymsp[0].minor.yy65 );
3640
+ }
3641
+ //#line 3508 "parse.c"
3642
+ break;
3643
+ case 317: /* cmd ::= create_vtab */
3644
+ //#line 1339 "parse.y"
3645
+ { sqlite3VtabFinishParse( pParse, 0 ); }
3646
+ //#line 3513 "parse.c"
3647
+ break;
3648
+ case 318: /* cmd ::= create_vtab LP vtabarglist RP */
3649
+ //#line 1340 "parse.y"
3650
+ { sqlite3VtabFinishParse( pParse, yymsp[0].minor.yy0 ); }
3651
+ //#line 3518 "parse.c"
3652
+ break;
3653
+ case 319: /* create_vtab ::= createkw VIRTUAL TABLE nm dbnm USING nm */
3654
+ //#line 1341 "parse.y"
3655
+ {
3656
+ sqlite3VtabBeginParse( pParse, yymsp[-3].minor.yy0, yymsp[-2].minor.yy0, yymsp[0].minor.yy0 );
3657
+ }
3658
+ //#line 3525 "parse.c"
3659
+ break;
3660
+ case 322: /* vtabarg ::= */
3661
+ //#line 1346 "parse.y"
3662
+ { sqlite3VtabArgInit( pParse ); }
3663
+ //#line 3530 "parse.c"
3664
+ break;
3665
+ case 324: /* vtabargtoken ::= ANY */
3666
+ case 325: /* vtabargtoken ::= lp anylist RP */ //yytestcase(yyruleno==325);
3667
+ case 326: /* lp ::= LP */ //yytestcase(yyruleno==326);
3668
+ //#line 1348 "parse.y"
3669
+ { sqlite3VtabArgExtend( pParse, yymsp[0].minor.yy0 ); }
3670
+ //#line 3537 "parse.c"
3671
+ break;
3672
+ default:
3673
+ /* (0) input ::= cmdlist */
3674
+ //yytestcase(yyruleno==0);
3675
+ /* (1) cmdlist ::= cmdlist ecmd */
3676
+ //yytestcase(yyruleno==1);
3677
+ /* (2) cmdlist ::= ecmd */
3678
+ //yytestcase(yyruleno==2);
3679
+ /* (3) ecmd ::= SEMI */
3680
+ //yytestcase(yyruleno==3);
3681
+ /* (4) ecmd ::= explain cmdx SEMI */
3682
+ //yytestcase(yyruleno==4);
3683
+ /* (10) trans_opt ::= */
3684
+ //yytestcase(yyruleno==10);
3685
+ /* (11) trans_opt ::= TRANSACTION */
3686
+ //yytestcase(yyruleno==11);
3687
+ /* (12) trans_opt ::= TRANSACTION nm */
3688
+ //yytestcase(yyruleno==12);
3689
+ /* (20) savepoint_opt ::= SAVEPOINT */
3690
+ //yytestcase(yyruleno==20);
3691
+ /* (21) savepoint_opt ::= */
3692
+ //yytestcase(yyruleno==21);
3693
+ /* (25) cmd ::= create_table create_table_args */
3694
+ //yytestcase(yyruleno==25);
3695
+ /* (34) columnlist ::= columnlist COMMA column */
3696
+ //yytestcase(yyruleno==34);
3697
+ /* (35) columnlist ::= column */
3698
+ //yytestcase(yyruleno==35);
3699
+ /* (44) type ::= */
3700
+ //yytestcase(yyruleno==44);
3701
+ /* (51) signed ::= plus_num */
3702
+ //yytestcase(yyruleno==51);
3703
+ /* (52) signed ::= minus_num */
3704
+ //yytestcase(yyruleno==52);
3705
+ /* (53) carglist ::= carglist carg */
3706
+ //yytestcase(yyruleno==53);
3707
+ /* (54) carglist ::= */
3708
+ //yytestcase(yyruleno==54);
3709
+ /* (55) carg ::= CONSTRAINT nm ccons */
3710
+ //yytestcase(yyruleno==55);
3711
+ /* (56) carg ::= ccons */
3712
+ //yytestcase(yyruleno==56);
3713
+ /* (62) ccons ::= NULL onconf */
3714
+ //yytestcase(yyruleno==62);
3715
+ /* (90) conslist ::= conslist COMMA tcons */
3716
+ //yytestcase(yyruleno==90);
3717
+ /* (91) conslist ::= conslist tcons */
3718
+ //yytestcase(yyruleno==91);
3719
+ /* (92) conslist ::= tcons */
3720
+ //yytestcase(yyruleno==92);
3721
+ /* (93) tcons ::= CONSTRAINT nm */
3722
+ //yytestcase(yyruleno==93);
3723
+ /* (269) plus_opt ::= PLUS */
3724
+ //yytestcase(yyruleno==269);
3725
+ /* (270) plus_opt ::= */
3726
+ //yytestcase(yyruleno==270);
3727
+ /* (280) foreach_clause ::= */
3728
+ //yytestcase(yyruleno==280);
3729
+ /* (281) foreach_clause ::= FOR EACH ROW */
3730
+ //yytestcase(yyruleno==281);
3731
+ /* (288) tridxby ::= */
3732
+ //yytestcase(yyruleno==288);
3733
+ /* (306) database_kw_opt ::= DATABASE */
3734
+ //yytestcase(yyruleno==306);
3735
+ /* (307) database_kw_opt ::= */
3736
+ //yytestcase(yyruleno==307);
3737
+ /* (315) kwcolumn_opt ::= */
3738
+ //yytestcase(yyruleno==315);
3739
+ /* (316) kwcolumn_opt ::= COLUMNKW */
3740
+ //yytestcase(yyruleno==316);
3741
+ /* (320) vtabarglist ::= vtabarg */
3742
+ //yytestcase(yyruleno==320);
3743
+ /* (321) vtabarglist ::= vtabarglist COMMA vtabarg */
3744
+ //yytestcase(yyruleno==321);
3745
+ /* (323) vtabarg ::= vtabarg vtabargtoken */
3746
+ //yytestcase(yyruleno==323);
3747
+ /* (327) anylist ::= */
3748
+ //yytestcase(yyruleno==327);
3749
+ /* (328) anylist ::= anylist LP anylist RP */
3750
+ //yytestcase(yyruleno==328);
3751
+ /* (329) anylist ::= anylist ANY */
3752
+ //yytestcase(yyruleno==329);
3753
+ break;
3754
+ };
3755
+ yygoto = yyRuleInfo[yyruleno].lhs;
3756
+ yysize = yyRuleInfo[yyruleno].nrhs;
3757
+ yypParser.yyidx -= yysize;
3758
+ yyact = yy_find_reduce_action( yymsp[-yysize].stateno, (YYCODETYPE)yygoto );
3759
+ if ( yyact < YYNSTATE )
3760
+ {
3761
+ #if NDEBUG
3762
+ /* If we are not debugging and the reduce action popped at least
3763
+ ** one element off the stack, then we can push the new element back
3764
+ ** onto the stack here, and skip the stack overflow test in yy_shift().
3765
+ ** That gives a significant speed improvement. */
3766
+ if( yysize!=0 ){
3767
+ yypParser.yyidx++;
3768
+ yymsp._yyidx -= yysize - 1;
3769
+ yymsp[0].stateno = (YYACTIONTYPE)yyact;
3770
+ yymsp[0].major = (YYCODETYPE)yygoto;
3771
+ yymsp[0].minor = yygotominor;
3772
+ }else
3773
+ #endif
3774
+ {
3775
+ yy_shift( yypParser, yyact, yygoto, yygotominor );
3776
+ }
3777
+ }
3778
+ else
3779
+ {
3780
+ Debug.Assert( yyact == YYNSTATE + YYNRULE + 1 );
3781
+ yy_accept( yypParser );
3782
+ }
3783
+ }
3784
+
3785
+ /*
3786
+ ** The following code executes when the parse fails
3787
+ */
3788
+ #if !YYNOERRORRECOVERY
3789
+ static void yy_parse_failed(
3790
+ yyParser yypParser /* The parser */
3791
+ )
3792
+ {
3793
+ Parse pParse = yypParser.pParse; // sqlite3ParserARG_FETCH;
3794
+ #if !NDEBUG
3795
+ if ( yyTraceFILE != null )
3796
+ {
3797
+ Debugger.Break(); // TODO -- fprintf(yyTraceFILE, "%sFail!\n", yyTracePrompt);
3798
+ }
3799
+ #endif
3800
+ while ( yypParser.yyidx >= 0 ) yy_pop_parser_stack( yypParser );
3801
+ /* Here code is inserted which will be executed whenever the
3802
+ ** parser fails */
3803
+ yypParser.pParse = pParse;// sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
3804
+ }
3805
+ #endif //* YYNOERRORRECOVERY */
3806
+
3807
+ /*
3808
+ ** The following code executes when a syntax error first occurs.
3809
+ */
3810
+ static void yy_syntax_error(
3811
+ yyParser yypParser, /* The parser */
3812
+ int yymajor, /* The major type of the error token */
3813
+ YYMINORTYPE yyminor /* The minor type of the error token */
3814
+ )
3815
+ {
3816
+ Parse pParse = yypParser.pParse; // sqlite3ParserARG_FETCH;
3817
+ //#define TOKEN (yyminor.yy0)
3818
+ //#line 32 "parse.y"
3819
+
3820
+ UNUSED_PARAMETER( yymajor ); /* Silence some compiler warnings */
3821
+ Debug.Assert( yyminor.yy0.z.Length > 0 ); //TOKEN.z[0]); /* The tokenizer always gives us a token */
3822
+ sqlite3ErrorMsg( pParse, "near \"%T\": syntax error", yyminor.yy0 );//&TOKEN);
3823
+ pParse.parseError = 1;
3824
+ //#line 3645 "parse.c"
3825
+ yypParser.pParse = pParse; // sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
3826
+ }
3827
+
3828
+ /*
3829
+ ** The following is executed when the parser accepts
3830
+ */
3831
+ static void yy_accept(
3832
+ yyParser yypParser /* The parser */
3833
+ )
3834
+ {
3835
+ Parse pParse = yypParser.pParse; // sqlite3ParserARG_FETCH;
3836
+ #if !NDEBUG
3837
+ if ( yyTraceFILE != null )
3838
+ {
3839
+ fprintf( yyTraceFILE, "%sAccept!\n", yyTracePrompt );
3840
+ }
3841
+ #endif
3842
+ while ( yypParser.yyidx >= 0 ) yy_pop_parser_stack( yypParser );
3843
+ /* Here code is inserted which will be executed whenever the
3844
+ ** parser accepts */
3845
+ yypParser.pParse = pParse;// sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
3846
+ }
3847
+
3848
+ /* The main parser program.
3849
+ ** The first argument is a pointer to a structure obtained from
3850
+ ** "sqlite3ParserAlloc" which describes the current state of the parser.
3851
+ ** The second argument is the major token number. The third is
3852
+ ** the minor token. The fourth optional argument is whatever the
3853
+ ** user wants (and specified in the grammar) and is available for
3854
+ ** use by the action routines.
3855
+ **
3856
+ ** Inputs:
3857
+ ** <ul>
3858
+ ** <li> A pointer to the parser (an opaque structure.)
3859
+ ** <li> The major token number.
3860
+ ** <li> The minor token number.
3861
+ ** <li> An option argument of a grammar-specified type.
3862
+ ** </ul>
3863
+ **
3864
+ ** Outputs:
3865
+ ** None.
3866
+ */
3867
+ static void sqlite3Parser(
3868
+ yyParser yyp, /* The parser */
3869
+ int yymajor, /* The major token code number */
3870
+ sqlite3ParserTOKENTYPE yyminor /* The value for the token */
3871
+ , Parse pParse //sqlite3ParserARG_PDECL /* Optional %extra_argument parameter */
3872
+ )
3873
+ {
3874
+ YYMINORTYPE yyminorunion = new YYMINORTYPE();
3875
+ int yyact; /* The parser action. */
3876
+ bool yyendofinput; /* True if we are at the end of input */
3877
+ #if YYERRORSYMBOL
3878
+ int yyerrorhit = 0; /* True if yymajor has invoked an error */
3879
+ #endif
3880
+ yyParser yypParser; /* The parser */
3881
+
3882
+ /* (re)initialize the parser, if necessary */
3883
+ yypParser = yyp;
3884
+ if ( yypParser.yyidx < 0 )
3885
+ {
3886
+ #if YYSTACKDEPTH//<=0
3887
+ if( yypParser.yystksz <=0 ){
3888
+ memset(yyminorunion, 0, yyminorunion).Length;
3889
+ yyStackOverflow(yypParser, yyminorunion);
3890
+ return;
3891
+ }
3892
+ #endif
3893
+ yypParser.yyidx = 0;
3894
+ yypParser.yyerrcnt = -1;
3895
+ yypParser.yystack[0] = new yyStackEntry();
3896
+ yypParser.yystack[0].stateno = 0;
3897
+ yypParser.yystack[0].major = 0;
3898
+ }
3899
+ yyminorunion.yy0 = yyminor.Copy();
3900
+ yyendofinput = ( yymajor == 0 );
3901
+ yypParser.pParse = pParse;// sqlite3ParserARG_STORE;
3902
+
3903
+ #if !NDEBUG
3904
+ if ( yyTraceFILE != null )
3905
+ {
3906
+ fprintf( yyTraceFILE, "%sInput %s\n", yyTracePrompt, yyTokenName[yymajor] );
3907
+ }
3908
+ #endif
3909
+
3910
+ do
3911
+ {
3912
+ yyact = yy_find_shift_action( yypParser, (YYCODETYPE)yymajor );
3913
+ if ( yyact < YYNSTATE )
3914
+ {
3915
+ Debug.Assert( !yyendofinput ); /* Impossible to shift the $ token */
3916
+ yy_shift( yypParser, yyact, yymajor, yyminorunion );
3917
+ yypParser.yyerrcnt--;
3918
+ yymajor = YYNOCODE;
3919
+ }
3920
+ else if ( yyact < YYNSTATE + YYNRULE )
3921
+ {
3922
+ yy_reduce( yypParser, yyact - YYNSTATE );
3923
+ }
3924
+ else
3925
+ {
3926
+ Debug.Assert( yyact == YY_ERROR_ACTION );
3927
+ #if YYERRORSYMBOL
3928
+ int yymx;
3929
+ #endif
3930
+ #if !NDEBUG
3931
+ if ( yyTraceFILE != null )
3932
+ {
3933
+ Debugger.Break(); // TODO -- fprintf(yyTraceFILE, "%sSyntax Error!\n", yyTracePrompt);
3934
+ }
3935
+ #endif
3936
+ #if YYERRORSYMBOL
3937
+ /* A syntax error has occurred.
3938
+ ** The response to an error depends upon whether or not the
3939
+ ** grammar defines an error token "ERROR".
3940
+ **
3941
+ ** This is what we do if the grammar does define ERROR:
3942
+ **
3943
+ ** * Call the %syntax_error function.
3944
+ **
3945
+ ** * Begin popping the stack until we enter a state where
3946
+ ** it is legal to shift the error symbol, then shift
3947
+ ** the error symbol.
3948
+ **
3949
+ ** * Set the error count to three.
3950
+ **
3951
+ ** * Begin accepting and shifting new tokens. No new error
3952
+ ** processing will occur until three tokens have been
3953
+ ** shifted successfully.
3954
+ **
3955
+ */
3956
+ if( yypParser.yyerrcnt<0 ){
3957
+ yy_syntax_error(yypParser,yymajor,yyminorunion);
3958
+ }
3959
+ yymx = yypParser.yystack[yypParser.yyidx].major;
3960
+ if( yymx==YYERRORSYMBOL || yyerrorhit ){
3961
+ #if !NDEBUG
3962
+ if( yyTraceFILE ){
3963
+ Debug.Assert(false); // TODO -- fprintf(yyTraceFILE,"%sDiscard input token %s\n",
3964
+ yyTracePrompt,yyTokenName[yymajor]);
3965
+ }
3966
+ #endif
3967
+ yy_destructor(yypParser,(YYCODETYPE)yymajor,yyminorunion);
3968
+ yymajor = YYNOCODE;
3969
+ }else{
3970
+ while(
3971
+ yypParser.yyidx >= 0 &&
3972
+ yymx != YYERRORSYMBOL &&
3973
+ (yyact = yy_find_reduce_action(
3974
+ yypParser.yystack[yypParser.yyidx].stateno,
3975
+ YYERRORSYMBOL)) >= YYNSTATE
3976
+ ){
3977
+ yy_pop_parser_stack(yypParser);
3978
+ }
3979
+ if( yypParser.yyidx < 0 || yymajor==0 ){
3980
+ yy_destructor(yypParser, (YYCODETYPE)yymajor,yyminorunion);
3981
+ yy_parse_failed(yypParser);
3982
+ yymajor = YYNOCODE;
3983
+ }else if( yymx!=YYERRORSYMBOL ){
3984
+ YYMINORTYPE u2;
3985
+ u2.YYERRSYMDT = 0;
3986
+ yy_shift(yypParser,yyact,YYERRORSYMBOL,u2);
3987
+ }
3988
+ }
3989
+ yypParser.yyerrcnt = 3;
3990
+ yyerrorhit = 1;
3991
+ #elif (YYNOERRORRECOVERY)
3992
+ /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
3993
+ ** do any kind of error recovery. Instead, simply invoke the syntax
3994
+ ** error routine and continue going as if nothing had happened.
3995
+ **
3996
+ ** Applications can set this macro (for example inside %include) if
3997
+ ** they intend to abandon the parse upon the first syntax error seen.
3998
+ */
3999
+ yy_syntax_error(yypParser,yymajor,yyminorunion);
4000
+ yy_destructor(yypParser,(YYCODETYPE)yymajor,yyminorunion);
4001
+ yymajor = YYNOCODE;
4002
+ #else // * YYERRORSYMBOL is not defined */
4003
+ /* This is what we do if the grammar does not define ERROR:
4004
+ **
4005
+ ** * Report an error message, and throw away the input token.
4006
+ **
4007
+ ** * If the input token is $, then fail the parse.
4008
+ **
4009
+ ** As before, subsequent error messages are suppressed until
4010
+ ** three input tokens have been successfully shifted.
4011
+ */
4012
+ if ( yypParser.yyerrcnt <= 0 )
4013
+ {
4014
+ yy_syntax_error( yypParser, yymajor, yyminorunion );
4015
+ }
4016
+ yypParser.yyerrcnt = 3;
4017
+ yy_destructor( yypParser, (YYCODETYPE)yymajor, yyminorunion );
4018
+ if ( yyendofinput )
4019
+ {
4020
+ yy_parse_failed( yypParser );
4021
+ }
4022
+ yymajor = YYNOCODE;
4023
+ #endif
4024
+ }
4025
+ } while ( yymajor != YYNOCODE && yypParser.yyidx >= 0 );
4026
+ return;
4027
+ }
4028
+ public class yymsp
4029
+ {
4030
+ public yyParser _yyParser;
4031
+ public int _yyidx;
4032
+ // CONSTRUCTOR
4033
+ public yymsp( ref yyParser pointer_to_yyParser, int yyidx ) //' Parser and Stack Index
4034
+ {
4035
+ this._yyParser = pointer_to_yyParser;
4036
+ this._yyidx = yyidx;
4037
+ }
4038
+ // Default Value
4039
+ public yyStackEntry this[int offset]
4040
+ {
4041
+ get { return _yyParser.yystack[_yyidx + offset]; }
4042
+ }
4043
+ }
4044
+ }
4045
+ }